question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

All properties of DatabaseClusterAttributes should not be required

See original GitHub issue

Note: for support questions, please first reference our documentation, then use Stackoverflow. This repository’s issues are intended for feature requests and bug reports.

DatabaseCluster.from­Database­Cluster­Attributes() takes the DatabaseClusterAttributes interface as a props argument for filtering purposes. But, since every property of the interface is required, the method from­Database­Cluster­Attributes() not very useful.

  • What is the expected behavior (or behavior of feature suggested)?

All properties of DatabaseClusterAttributes should be optional except for a few essential ones, if any.

  • What is the motivation / use case for changing the behavior or adding this feature?

Currently, there is no way to refer to existing DB from CDK app. DatabaseCluster.from­Database­Cluster­Attributes() is the only one I’m aware of, but I cannot use it because all fields are required.

  • Please tell us about your environment:

    • CDK CLI Version: 1.3.0 (build bba9914)
    • Module Version: 1.3.0
    • OS: OSX Mojave
    • Language: TypeScript
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
skinny85commented, Dec 1, 2021

@kundkingan same ask as above 😉.

0reactions
tomjowittcommented, Feb 15, 2022

I am still getting this error with the Go CDK:

cdk version
2.10.0 (build e5b301f)
	db := awsrds.DatabaseInstance_FromDatabaseInstanceAttributes(
		stack,
		jsii.String("xxxxRDSLookup"),
		&awsrds.DatabaseInstanceAttributes{
			InstanceIdentifier:      jsii.String("xxxxxxxx"),
		},
	)

Which results in the error:

panic: "Missing required properties for monocdk.aws_rds.DatabaseInstanceAttributes: instanceEndpointAddress, port, securityGroups"

I also tried adding nil values which didn’t fix it.

	db := awsrds.DatabaseInstance_FromDatabaseInstanceAttributes(
		stack,
		jsii.String("xxxxRDSLookup"),
		&awsrds.DatabaseInstanceAttributes{
			InstanceEndpointAddress: nil,
			InstanceIdentifier:      jsii.String("xxxxxxxx"),
			Port:                    nil,
			SecurityGroups:          nil,
		},
	)
Read more comments on GitHub >

github_iconTop Results From Across the Web

interface DatabaseClusterAttributes · AWS CDK
Properties that describe an existing cluster instance. Example. // The code below shows an example of how to instantiate this type. // The...
Read more >
awslabs/aws-cdk - Gitter
Hi everyone, I can't seem to get this work. container.add_port_mappings(ecs.PortMapping(container_port=90)). TypeError: init() missing 1 required keyword-only ...
Read more >
DigitalOcean API Docs
Programmatically manage Droplets and other DigitalOcean resources using conventional HTTP requests. All of the functionality in the DigitalOcean Control ...
Read more >
cdk-assets | Yarn - Package Manager
They are subject to non-backward compatible changes or removal in any future ... All notable changes to this project will be documented in...
Read more >
awsrds - Go Packages
After you restore a DB cluster with a `SnapshotIdentifier` property, you must specify the same `SnapshotIdentifier` property for any future updates to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found