Skip to content

Commit

Permalink
fix(rds): SnapshotCredentials.fromSecret() takes a Secret, not `I…
Browse files Browse the repository at this point in the history
…Secret` (aws#19639)

Fixes aws#19409

----

### All Submissions:

* [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [ ] Did you use `cdk-integ` to deploy the infrastructure and generate the snapshot (i.e. `cdk-integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
skinny85 authored Mar 31, 2022
1 parent 9c712cc commit a74d82e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 9 additions & 5 deletions allowed-breaking-changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,20 @@ strengthened:@aws-cdk/aws-stepfunctions-tasks.BatchSubmitJobProps
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.cluster
strengthened:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps

# Remove IO2 from autoscaling EbsDeviceVolumeType. This value is not supported
# Remove IO2 from autoscaling EbsDeviceVolumeType. This value is not supported
# at the moment and was not supported in the past.
removed:@aws-cdk/aws-autoscaling.EbsDeviceVolumeType.IO2

# Remove autoTerminationPolicy from stepfunctions-tasks EmrCreateClusterProps. This value is not supported by stepfunctions at the moment and was not supported in the past.
removed:@aws-cdk/aws-stepfunctions-tasks.EmrCreateCluster.AutoTerminationPolicyProperty
removed:@aws-cdk/aws-stepfunctions-tasks.EmrCreateClusterProps.autoTerminationPolicy

# Changed property securityGroupId to optional because either securityGroupId or
# Changed property securityGroupId to optional because either securityGroupId or
# securityGroupName is required. Therefore securityGroupId is no longer mandatory.
weakened:@aws-cdk/cloud-assembly-schema.SecurityGroupContextQuery

# refactor autoscaling lifecycle hook target bind() methods to make role optional by
# having bind() methods create the role if it isn't passed to them
# having bind() methods create the role if it isn't passed to them
incompatible-argument:@aws-cdk/aws-autoscaling-hooktargets.FunctionHook.bind
incompatible-argument:@aws-cdk/aws-autoscaling-hooktargets.QueueHook.bind
incompatible-argument:@aws-cdk/aws-autoscaling-hooktargets.TopicHook.bind
Expand All @@ -106,7 +106,7 @@ removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.maxRecord
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.parallelizationFactor
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.reportBatchItemFailures
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.retryAttempts
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.tumblingWindow
removed:@aws-cdk/aws-lambda-event-sources.ManagedKafkaEventSourceProps.tumblingWindow
removed:@aws-cdk/aws-lambda-event-sources.SelfManagedKafkaEventSourceProps.bisectBatchOnError
removed:@aws-cdk/aws-lambda-event-sources.SelfManagedKafkaEventSourceProps.maxRecordAge
removed:@aws-cdk/aws-lambda-event-sources.SelfManagedKafkaEventSourceProps.parallelizationFactor
Expand All @@ -125,4 +125,8 @@ changed-type:@aws-cdk/aws-elasticloadbalancingv2.NetworkLoadBalancer.vpc
# removed methods and properties related to event bridge notifications for S3 buckets as they are not yet supported (19 Jan 2022)
removed:@aws-cdk/aws-s3.Bucket.enableEventBridgeNotification
removed:@aws-cdk/aws-s3.BucketBase.enableEventBridgeNotification
removed:@aws-cdk/aws-s3.BucketProps.eventBridgeEnabled
removed:@aws-cdk/aws-s3.BucketProps.eventBridgeEnabled

# changed the type of RDS's SnapshotCredentials.secret from Secret to ISecret,
# shouldn't matter
changed-type:@aws-cdk/aws-rds.SnapshotCredentials.secret
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-rds/lib/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ export abstract class SnapshotCredentials {
* }
* ```
*/
public static fromSecret(secret: secretsmanager.Secret): SnapshotCredentials {
public static fromSecret(secret: secretsmanager.ISecret): SnapshotCredentials {
return {
generatePassword: false,
password: secret.secretValueFromJson('password'),
Expand Down Expand Up @@ -435,7 +435,7 @@ export abstract class SnapshotCredentials {
*
* @default - none
*/
public abstract readonly secret?: secretsmanager.Secret;
public abstract readonly secret?: secretsmanager.ISecret;

/**
* The characters to exclude from the generated password.
Expand Down

0 comments on commit a74d82e

Please sign in to comment.