From 900f700cf3992201349eef52410522252bf788c4 Mon Sep 17 00:00:00 2001 From: nicholaschiasson Date: Sat, 19 Oct 2024 13:50:21 +0100 Subject: [PATCH 1/6] fix(aws_route53): cannot use CfnParameter.valueAsNumber for L2 RecordSet weight --- ...efaultTestDeployAssertB313B703.assets.json | 19 + ...aultTestDeployAssertB313B703.template.json | 314 ++++++++++++ .../cdk.out | 1 + .../integ.json | 12 + .../manifest.json | 187 +++++++ ...ecord-weight-from-cfnparameter.assets.json | 19 + ...ord-weight-from-cfnparameter.template.json | 475 ++++++++++++++++++ .../tree.json | 397 +++++++++++++++ .../integ.record-weight-from-cfnparameter.ts | 44 ++ .../aws-cdk-lib/aws-route53/lib/record-set.ts | 2 +- .../aws-route53/test/record-set.test.ts | 62 ++- 11 files changed, 1530 insertions(+), 2 deletions(-) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/cdk.out create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/integ.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/manifest.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/tree.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.assets.json new file mode 100644 index 0000000000000..af2bf518084e3 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.assets.json @@ -0,0 +1,19 @@ +{ + "version": "38.0.1", + "files": { + "3af2cf653e741676340b5160ba8e02dc8c5fc5dfa4ac558c521eda8474bf7deb": { + "source": { + "path": "Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "3af2cf653e741676340b5160ba8e02dc8c5fc5dfa4ac558c521eda8474bf7deb.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.template.json new file mode 100644 index 0000000000000..723b713d45146 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.template.json @@ -0,0 +1,314 @@ +{ + "Resources": { + "CDKMetadata": { + "Type": "AWS::CDK::Metadata", + "Properties": { + "Analytics": "v2:deflate64:H4sIAAAAAAAA/zPQM9AzUEwsL9ZNTsnWzclM0qsOLklMztZxTssLSi3OLy1KTgWxnfPzUjJLMvPzanXy8lNS9bKK9cuMDPQMzYG6s4ozM3WLSvNKMnNT9YIgNADUHT34WAAAAA==" + }, + "Metadata": { + "aws:cdk:path": "Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/CDKMetadata/Default" + }, + "Condition": "CDKMetadataAvailable" + } + }, + "Conditions": { + "CDKMetadataAvailable": { + "Fn::Or": [ + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "af-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-3" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-4" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-northwest-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-2" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "il-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "sa-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-1" + ] + } + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-2" + ] + } + ] + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/cdk.out new file mode 100644 index 0000000000000..c6e612584e352 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"38.0.1"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/integ.json new file mode 100644 index 0000000000000..c30c931da4d49 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "38.0.1", + "testCases": { + "Route53RecordWeightFromCfnParameterInteg/DefaultTest": { + "stacks": [ + "record-weight-from-cfnparameter" + ], + "assertionStack": "Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert", + "assertionStackName": "Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/manifest.json new file mode 100644 index 0000000000000..499d48f273e5d --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/manifest.json @@ -0,0 +1,187 @@ +{ + "version": "38.0.1", + "artifacts": { + "record-weight-from-cfnparameter.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "record-weight-from-cfnparameter.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "record-weight-from-cfnparameter": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "record-weight-from-cfnparameter.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "notificationArns": [], + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f31b955cf926ccd8b253b95178911440228fdb6c8c302c2129929764634e16da.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "record-weight-from-cfnparameter.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "record-weight-from-cfnparameter.assets" + ], + "metadata": { + "/record-weight-from-cfnparameter/HostedZone/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "HostedZoneDB99F866" + } + ], + "/record-weight-from-cfnparameter/RecordWeight0": [ + { + "type": "aws:cdk:logicalId", + "data": "RecordWeight0" + } + ], + "/record-weight-from-cfnparameter/RecordWeight1": [ + { + "type": "aws:cdk:logicalId", + "data": "RecordWeight1" + } + ], + "/record-weight-from-cfnparameter/RecordWeight2": [ + { + "type": "aws:cdk:logicalId", + "data": "RecordWeight2" + } + ], + "/record-weight-from-cfnparameter/RecordWeight3": [ + { + "type": "aws:cdk:logicalId", + "data": "RecordWeight3" + } + ], + "/record-weight-from-cfnparameter/WeightedRecord0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "WeightedRecord0183C6356" + } + ], + "/record-weight-from-cfnparameter/WeightedRecord1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "WeightedRecord1901777B1" + } + ], + "/record-weight-from-cfnparameter/WeightedRecord2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "WeightedRecord2D4D415A2" + } + ], + "/record-weight-from-cfnparameter/WeightedRecord3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "WeightedRecord328406D0A" + } + ], + "/record-weight-from-cfnparameter/CDKMetadata/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "CDKMetadata" + } + ], + "/record-weight-from-cfnparameter/CDKMetadata/Condition": [ + { + "type": "aws:cdk:logicalId", + "data": "CDKMetadataAvailable" + } + ], + "/record-weight-from-cfnparameter/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/record-weight-from-cfnparameter/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "record-weight-from-cfnparameter" + }, + "Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "notificationArns": [], + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3af2cf653e741676340b5160ba8e02dc8c5fc5dfa4ac558c521eda8474bf7deb.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.assets" + ], + "metadata": { + "/Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/CDKMetadata/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "CDKMetadata" + } + ], + "/Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/CDKMetadata/Condition": [ + { + "type": "aws:cdk:logicalId", + "data": "CDKMetadataAvailable" + } + ], + "/Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.assets.json new file mode 100644 index 0000000000000..5cdc0e88248da --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.assets.json @@ -0,0 +1,19 @@ +{ + "version": "38.0.1", + "files": { + "f31b955cf926ccd8b253b95178911440228fdb6c8c302c2129929764634e16da": { + "source": { + "path": "record-weight-from-cfnparameter.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "f31b955cf926ccd8b253b95178911440228fdb6c8c302c2129929764634e16da.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.template.json new file mode 100644 index 0000000000000..064caae2ea758 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.template.json @@ -0,0 +1,475 @@ +{ + "Resources": { + "HostedZoneDB99F866": { + "Type": "AWS::Route53::HostedZone", + "Properties": { + "Name": "cdk.dev." + }, + "Metadata": { + "aws:cdk:path": "record-weight-from-cfnparameter/HostedZone/Resource" + } + }, + "WeightedRecord0183C6356": { + "Type": "AWS::Route53::RecordSet", + "Properties": { + "HostedZoneId": { + "Ref": "HostedZoneDB99F866" + }, + "Name": "www.cdk.dev.", + "ResourceRecords": [ + "1.2.3.4" + ], + "SetIdentifier": { + "Fn::Join": [ + "", + [ + "WEIGHT_", + { + "Ref": "RecordWeight0" + }, + "_ID_recordweightedRecord080EC42DE" + ] + ] + }, + "TTL": "10", + "Type": "A", + "Weight": { + "Ref": "RecordWeight0" + } + }, + "Metadata": { + "aws:cdk:path": "record-weight-from-cfnparameter/WeightedRecord0/Resource" + } + }, + "WeightedRecord1901777B1": { + "Type": "AWS::Route53::RecordSet", + "Properties": { + "HostedZoneId": { + "Ref": "HostedZoneDB99F866" + }, + "Name": "www.cdk.dev.", + "ResourceRecords": [ + "2.3.4.5" + ], + "SetIdentifier": { + "Fn::Join": [ + "", + [ + "WEIGHT_", + { + "Ref": "RecordWeight1" + }, + "_ID_recordweightedRecord118B8FA43" + ] + ] + }, + "TTL": "10", + "Type": "A", + "Weight": { + "Ref": "RecordWeight1" + } + }, + "Metadata": { + "aws:cdk:path": "record-weight-from-cfnparameter/WeightedRecord1/Resource" + } + }, + "WeightedRecord2D4D415A2": { + "Type": "AWS::Route53::RecordSet", + "Properties": { + "HostedZoneId": { + "Ref": "HostedZoneDB99F866" + }, + "Name": "www.cdk.dev.", + "ResourceRecords": [ + "3.4.5.6" + ], + "SetIdentifier": { + "Fn::Join": [ + "", + [ + "WEIGHT_", + { + "Ref": "RecordWeight2" + }, + "_ID_recordweightedRecord29D395B6F" + ] + ] + }, + "TTL": "10", + "Type": "A", + "Weight": { + "Ref": "RecordWeight2" + } + }, + "Metadata": { + "aws:cdk:path": "record-weight-from-cfnparameter/WeightedRecord2/Resource" + } + }, + "WeightedRecord328406D0A": { + "Type": "AWS::Route53::RecordSet", + "Properties": { + "HostedZoneId": { + "Ref": "HostedZoneDB99F866" + }, + "Name": "www.cdk.dev.", + "ResourceRecords": [ + "4.5.6.7" + ], + "SetIdentifier": { + "Fn::Join": [ + "", + [ + "WEIGHT_", + { + "Ref": "RecordWeight3" + }, + "_ID_recordweightedRecord38AAB01D6" + ] + ] + }, + "TTL": "10", + "Type": "A", + "Weight": { + "Ref": "RecordWeight3" + } + }, + "Metadata": { + "aws:cdk:path": "record-weight-from-cfnparameter/WeightedRecord3/Resource" + } + }, + "CDKMetadata": { + "Type": "AWS::CDK::Metadata", + "Properties": { + "Analytics": "v2:deflate64:H4sIAAAAAAAA/02OvQ7CMBCDn4U9OUIRYkZdGKt2Y0FpckjXn5yUXGCo+u60ZGGy/VmWbMCAOdhP0s6PeqIelk6sG9WGnpGz4OUMS5P7idydk6B/cEBVv8JfurXoOPqdFtehrHtqbLQzCsZSJc7R/cY1B09CHFYV2CMM6fiuDJyu25khEemYg9CM0Bb9AmpStzOnAAAA" + }, + "Metadata": { + "aws:cdk:path": "record-weight-from-cfnparameter/CDKMetadata/Default" + }, + "Condition": "CDKMetadataAvailable" + } + }, + "Parameters": { + "RecordWeight0": { + "Type": "Number", + "Default": 0, + "MaxValue": 255, + "MinValue": 0 + }, + "RecordWeight1": { + "Type": "Number", + "Default": 0, + "MaxValue": 255, + "MinValue": 0 + }, + "RecordWeight2": { + "Type": "Number", + "Default": 0, + "MaxValue": 255, + "MinValue": 0 + }, + "RecordWeight3": { + "Type": "Number", + "Default": 0, + "MaxValue": 255, + "MinValue": 0 + }, + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Conditions": { + "CDKMetadataAvailable": { + "Fn::Or": [ + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "af-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-3" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-4" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-northwest-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-2" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "il-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "sa-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-1" + ] + } + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-2" + ] + } + ] + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/tree.json new file mode 100644 index 0000000000000..33ec549b1ae99 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/tree.json @@ -0,0 +1,397 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "record-weight-from-cfnparameter": { + "id": "record-weight-from-cfnparameter", + "path": "record-weight-from-cfnparameter", + "children": { + "HostedZone": { + "id": "HostedZone", + "path": "record-weight-from-cfnparameter/HostedZone", + "children": { + "Resource": { + "id": "Resource", + "path": "record-weight-from-cfnparameter/HostedZone/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Route53::HostedZone", + "aws:cdk:cloudformation:props": { + "name": "cdk.dev." + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_route53.CfnHostedZone", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_route53.PublicHostedZone", + "version": "0.0.0" + } + }, + "RecordWeight0": { + "id": "RecordWeight0", + "path": "record-weight-from-cfnparameter/RecordWeight0", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "RecordWeight1": { + "id": "RecordWeight1", + "path": "record-weight-from-cfnparameter/RecordWeight1", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "RecordWeight2": { + "id": "RecordWeight2", + "path": "record-weight-from-cfnparameter/RecordWeight2", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "RecordWeight3": { + "id": "RecordWeight3", + "path": "record-weight-from-cfnparameter/RecordWeight3", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "WeightedRecord0": { + "id": "WeightedRecord0", + "path": "record-weight-from-cfnparameter/WeightedRecord0", + "children": { + "Resource": { + "id": "Resource", + "path": "record-weight-from-cfnparameter/WeightedRecord0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", + "aws:cdk:cloudformation:props": { + "hostedZoneId": { + "Ref": "HostedZoneDB99F866" + }, + "name": "www.cdk.dev.", + "resourceRecords": [ + "1.2.3.4" + ], + "setIdentifier": { + "Fn::Join": [ + "", + [ + "WEIGHT_", + { + "Ref": "RecordWeight0" + }, + "_ID_recordweightedRecord080EC42DE" + ] + ] + }, + "ttl": "10", + "type": "A", + "weight": { + "Ref": "RecordWeight0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_route53.CfnRecordSet", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_route53.ARecord", + "version": "0.0.0" + } + }, + "WeightedRecord1": { + "id": "WeightedRecord1", + "path": "record-weight-from-cfnparameter/WeightedRecord1", + "children": { + "Resource": { + "id": "Resource", + "path": "record-weight-from-cfnparameter/WeightedRecord1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", + "aws:cdk:cloudformation:props": { + "hostedZoneId": { + "Ref": "HostedZoneDB99F866" + }, + "name": "www.cdk.dev.", + "resourceRecords": [ + "2.3.4.5" + ], + "setIdentifier": { + "Fn::Join": [ + "", + [ + "WEIGHT_", + { + "Ref": "RecordWeight1" + }, + "_ID_recordweightedRecord118B8FA43" + ] + ] + }, + "ttl": "10", + "type": "A", + "weight": { + "Ref": "RecordWeight1" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_route53.CfnRecordSet", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_route53.ARecord", + "version": "0.0.0" + } + }, + "WeightedRecord2": { + "id": "WeightedRecord2", + "path": "record-weight-from-cfnparameter/WeightedRecord2", + "children": { + "Resource": { + "id": "Resource", + "path": "record-weight-from-cfnparameter/WeightedRecord2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", + "aws:cdk:cloudformation:props": { + "hostedZoneId": { + "Ref": "HostedZoneDB99F866" + }, + "name": "www.cdk.dev.", + "resourceRecords": [ + "3.4.5.6" + ], + "setIdentifier": { + "Fn::Join": [ + "", + [ + "WEIGHT_", + { + "Ref": "RecordWeight2" + }, + "_ID_recordweightedRecord29D395B6F" + ] + ] + }, + "ttl": "10", + "type": "A", + "weight": { + "Ref": "RecordWeight2" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_route53.CfnRecordSet", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_route53.ARecord", + "version": "0.0.0" + } + }, + "WeightedRecord3": { + "id": "WeightedRecord3", + "path": "record-weight-from-cfnparameter/WeightedRecord3", + "children": { + "Resource": { + "id": "Resource", + "path": "record-weight-from-cfnparameter/WeightedRecord3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", + "aws:cdk:cloudformation:props": { + "hostedZoneId": { + "Ref": "HostedZoneDB99F866" + }, + "name": "www.cdk.dev.", + "resourceRecords": [ + "4.5.6.7" + ], + "setIdentifier": { + "Fn::Join": [ + "", + [ + "WEIGHT_", + { + "Ref": "RecordWeight3" + }, + "_ID_recordweightedRecord38AAB01D6" + ] + ] + }, + "ttl": "10", + "type": "A", + "weight": { + "Ref": "RecordWeight3" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_route53.CfnRecordSet", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_route53.ARecord", + "version": "0.0.0" + } + }, + "CDKMetadata": { + "id": "CDKMetadata", + "path": "record-weight-from-cfnparameter/CDKMetadata", + "children": { + "Default": { + "id": "Default", + "path": "record-weight-from-cfnparameter/CDKMetadata/Default", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnResource", + "version": "0.0.0" + } + }, + "Condition": { + "id": "Condition", + "path": "record-weight-from-cfnparameter/CDKMetadata/Condition", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnCondition", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "record-weight-from-cfnparameter/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "record-weight-from-cfnparameter/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "Route53RecordWeightFromCfnParameterInteg": { + "id": "Route53RecordWeightFromCfnParameterInteg", + "path": "Route53RecordWeightFromCfnParameterInteg", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "Route53RecordWeightFromCfnParameterInteg/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "Route53RecordWeightFromCfnParameterInteg/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert", + "children": { + "CDKMetadata": { + "id": "CDKMetadata", + "path": "Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/CDKMetadata", + "children": { + "Default": { + "id": "Default", + "path": "Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/CDKMetadata/Default", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnResource", + "version": "0.0.0" + } + }, + "Condition": { + "id": "Condition", + "path": "Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/CDKMetadata/Condition", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnCondition", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.ts new file mode 100644 index 0000000000000..2f8dacb1bf9f0 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.ts @@ -0,0 +1,44 @@ +import { App, CfnParameter, Duration, Stack, StackProps } from 'aws-cdk-lib'; +import { Construct } from 'constructs'; +import * as route53 from 'aws-cdk-lib/aws-route53'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; + +class TestStack extends Stack { + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + + const hostedZone = new route53.PublicHostedZone(this, 'HostedZone', { + zoneName: 'cdk.dev', + }); + + const weightParameterProps = { + type: 'Number', + default: 0, + minValue: 0, + maxValue: 255, + }; + + [ + { target: '1.2.3.4', weight: new CfnParameter(this, 'RecordWeight0', weightParameterProps) }, + { target: '2.3.4.5', weight: new CfnParameter(this, 'RecordWeight1', weightParameterProps) }, + { target: '3.4.5.6', weight: new CfnParameter(this, 'RecordWeight2', weightParameterProps) }, + { target: '4.5.6.7', weight: new CfnParameter(this, 'RecordWeight3', weightParameterProps) }, + ].forEach((data, index) => { + new route53.ARecord(this, `WeightedRecord${index}`, { + zone: hostedZone, + recordName: 'www', + weight: data.weight.valueAsNumber, + ttl: Duration.seconds(10), + target: route53.RecordTarget.fromIpAddresses(data.target), + }); + }); + } +} + +const app = new App(); +const stack = new TestStack(app, 'record-weight-from-cfnparameter'); + +new IntegTest(app, 'Route53RecordWeightFromCfnParameterInteg', { + testCases: [stack], +}); +app.synth(); diff --git a/packages/aws-cdk-lib/aws-route53/lib/record-set.ts b/packages/aws-cdk-lib/aws-route53/lib/record-set.ts index 6706443b1f260..021affdd2b1de 100644 --- a/packages/aws-cdk-lib/aws-route53/lib/record-set.ts +++ b/packages/aws-cdk-lib/aws-route53/lib/record-set.ts @@ -296,7 +296,7 @@ export class RecordSet extends Resource implements IRecordSet { constructor(scope: Construct, id: string, props: RecordSetProps) { super(scope, id); - if (props.weight && (props.weight < 0 || props.weight > 255)) { + if (props.weight && !Token.isUnresolved(props.weight) && (props.weight < 0 || props.weight > 255)) { throw new Error(`weight must be between 0 and 255 inclusive, got: ${props.weight}`); } if (props.setIdentifier && (props.setIdentifier.length < 1 || props.setIdentifier.length > 128)) { diff --git a/packages/aws-cdk-lib/aws-route53/test/record-set.test.ts b/packages/aws-cdk-lib/aws-route53/test/record-set.test.ts index 20abd698ee68b..f66b283b1aaca 100644 --- a/packages/aws-cdk-lib/aws-route53/test/record-set.test.ts +++ b/packages/aws-cdk-lib/aws-route53/test/record-set.test.ts @@ -4,7 +4,7 @@ import * as cloudfront from '../../aws-cloudfront'; import * as origins from '../../aws-cloudfront-origins'; import * as iam from '../../aws-iam'; import * as targets from '../../aws-route53-targets'; -import { Duration, RemovalPolicy, Stack } from '../../core'; +import { CfnParameter, Duration, RemovalPolicy, Stack } from '../../core'; import * as route53 from '../lib'; describe('record set', () => { @@ -1248,6 +1248,66 @@ describe('record set', () => { }); }); + test('with weight provided by CfnParameter', () => { + // GIVEN + const stack = new Stack(); + + const zone = new route53.HostedZone(stack, 'HostedZone', { + zoneName: 'myzone', + }); + + const weightParameter = new CfnParameter(stack, 'RecordWeight', { + type: 'Number', + default: 0, + minValue: 0, + maxValue: 255, + }); + + // WHEN + new route53.RecordSet(stack, 'RecordSet', { + zone, + recordName: 'www', + recordType: route53.RecordType.CNAME, + target: route53.RecordTarget.fromValues('zzz'), + weight: weightParameter.valueAsNumber, + }); + + // THEN + Template.fromStack(stack).hasParameter('RecordWeight', { + Type: 'Number', + Default: 0, + MinValue: 0, + MaxValue: 255, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::Route53::RecordSet', { + Name: 'www.myzone.', + Type: 'CNAME', + HostedZoneId: { + Ref: 'HostedZoneDB99F866', + }, + ResourceRecords: [ + 'zzz', + ], + TTL: '1800', + Weight: { + Ref: 'RecordWeight', + }, + SetIdentifier: { + 'Fn::Join': [ + '', + [ + 'WEIGHT_', + { + Ref: 'RecordWeight', + }, + '_ID_RecordSet', + ], + ], + }, + }); + }); + test.each([ [-1], [256], From 44f4f657a22b38c5ac136360082bf47d1e582ab5 Mon Sep 17 00:00:00 2001 From: Nicholas Omer Chiasson Date: Thu, 24 Oct 2024 23:13:10 +0000 Subject: [PATCH 2/6] Update integ test --- ...efaultTestDeployAssertB313B703.assets.json | 4 +- ...aultTestDeployAssertB313B703.template.json | 2 +- .../manifest.json | 20 +++++----- ...ecord-weight-from-cfnparameter.assets.json | 4 +- ...ord-weight-from-cfnparameter.template.json | 26 ++++++------ .../tree.json | 40 +++++++++---------- .../integ.record-weight-from-cfnparameter.ts | 2 +- 7 files changed, 49 insertions(+), 49 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.assets.json index af2bf518084e3..401084031d4be 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.assets.json @@ -1,7 +1,7 @@ { "version": "38.0.1", "files": { - "3af2cf653e741676340b5160ba8e02dc8c5fc5dfa4ac558c521eda8474bf7deb": { + "dd422c7ef7456abdbbf2e9b18c750ce262025988c67dc32d98218d53614783aa": { "source": { "path": "Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3af2cf653e741676340b5160ba8e02dc8c5fc5dfa4ac558c521eda8474bf7deb.json", + "objectKey": "dd422c7ef7456abdbbf2e9b18c750ce262025988c67dc32d98218d53614783aa.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.template.json index 723b713d45146..54b58f2119219 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.template.json @@ -3,7 +3,7 @@ "CDKMetadata": { "Type": "AWS::CDK::Metadata", "Properties": { - "Analytics": "v2:deflate64:H4sIAAAAAAAA/zPQM9AzUEwsL9ZNTsnWzclM0qsOLklMztZxTssLSi3OLy1KTgWxnfPzUjJLMvPzanXy8lNS9bKK9cuMDPQMzYG6s4ozM3WLSvNKMnNT9YIgNADUHT34WAAAAA==" + "Analytics": "v2:deflate64:H4sIAAAAAAAA/yXGuw2AIBAA0Fno4Tyt7NkAJ0DA5ECPhI8Wxt2NsXoPAQGFvapyPqmdVriXZl2SemMTau7Fhe86s6dGmR/J2QeIdTgnhHEGFLESqdK50RHA/L4dFigbWAAAAA==" }, "Metadata": { "aws:cdk:path": "Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/CDKMetadata/Default" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/manifest.json index 499d48f273e5d..06ee57cfb9cc2 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/manifest.json @@ -19,7 +19,7 @@ "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f31b955cf926ccd8b253b95178911440228fdb6c8c302c2129929764634e16da.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/24621e779b3b62c4e28e85db4bf2bbaa80f572df06130a9963c0eafeeb2b5a92.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -65,28 +65,28 @@ "data": "RecordWeight3" } ], - "/record-weight-from-cfnparameter/WeightedRecord0/Resource": [ + "/record-weight-from-cfnparameter/RecordWeightedFromCfnParameter0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "WeightedRecord0183C6356" + "data": "RecordWeightedFromCfnParameter0FB5DFC65" } ], - "/record-weight-from-cfnparameter/WeightedRecord1/Resource": [ + "/record-weight-from-cfnparameter/RecordWeightedFromCfnParameter1/Resource": [ { "type": "aws:cdk:logicalId", - "data": "WeightedRecord1901777B1" + "data": "RecordWeightedFromCfnParameter11D8E5896" } ], - "/record-weight-from-cfnparameter/WeightedRecord2/Resource": [ + "/record-weight-from-cfnparameter/RecordWeightedFromCfnParameter2/Resource": [ { "type": "aws:cdk:logicalId", - "data": "WeightedRecord2D4D415A2" + "data": "RecordWeightedFromCfnParameter2B12A1DFB" } ], - "/record-weight-from-cfnparameter/WeightedRecord3/Resource": [ + "/record-weight-from-cfnparameter/RecordWeightedFromCfnParameter3/Resource": [ { "type": "aws:cdk:logicalId", - "data": "WeightedRecord328406D0A" + "data": "RecordWeightedFromCfnParameter3D5E67423" } ], "/record-weight-from-cfnparameter/CDKMetadata/Default": [ @@ -134,7 +134,7 @@ "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3af2cf653e741676340b5160ba8e02dc8c5fc5dfa4ac558c521eda8474bf7deb.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/dd422c7ef7456abdbbf2e9b18c750ce262025988c67dc32d98218d53614783aa.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.assets.json index 5cdc0e88248da..b7552c2bdcd48 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.assets.json @@ -1,7 +1,7 @@ { "version": "38.0.1", "files": { - "f31b955cf926ccd8b253b95178911440228fdb6c8c302c2129929764634e16da": { + "24621e779b3b62c4e28e85db4bf2bbaa80f572df06130a9963c0eafeeb2b5a92": { "source": { "path": "record-weight-from-cfnparameter.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f31b955cf926ccd8b253b95178911440228fdb6c8c302c2129929764634e16da.json", + "objectKey": "24621e779b3b62c4e28e85db4bf2bbaa80f572df06130a9963c0eafeeb2b5a92.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.template.json index 064caae2ea758..9551b693720c4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.template.json @@ -9,7 +9,7 @@ "aws:cdk:path": "record-weight-from-cfnparameter/HostedZone/Resource" } }, - "WeightedRecord0183C6356": { + "RecordWeightedFromCfnParameter0FB5DFC65": { "Type": "AWS::Route53::RecordSet", "Properties": { "HostedZoneId": { @@ -27,7 +27,7 @@ { "Ref": "RecordWeight0" }, - "_ID_recordweightedRecord080EC42DE" + "_ID_recordweigParameter04970FE98" ] ] }, @@ -38,10 +38,10 @@ } }, "Metadata": { - "aws:cdk:path": "record-weight-from-cfnparameter/WeightedRecord0/Resource" + "aws:cdk:path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter0/Resource" } }, - "WeightedRecord1901777B1": { + "RecordWeightedFromCfnParameter11D8E5896": { "Type": "AWS::Route53::RecordSet", "Properties": { "HostedZoneId": { @@ -59,7 +59,7 @@ { "Ref": "RecordWeight1" }, - "_ID_recordweightedRecord118B8FA43" + "_ID_recordweigParameter1EB51A657" ] ] }, @@ -70,10 +70,10 @@ } }, "Metadata": { - "aws:cdk:path": "record-weight-from-cfnparameter/WeightedRecord1/Resource" + "aws:cdk:path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter1/Resource" } }, - "WeightedRecord2D4D415A2": { + "RecordWeightedFromCfnParameter2B12A1DFB": { "Type": "AWS::Route53::RecordSet", "Properties": { "HostedZoneId": { @@ -91,7 +91,7 @@ { "Ref": "RecordWeight2" }, - "_ID_recordweightedRecord29D395B6F" + "_ID_recordweigParameter208409FED" ] ] }, @@ -102,10 +102,10 @@ } }, "Metadata": { - "aws:cdk:path": "record-weight-from-cfnparameter/WeightedRecord2/Resource" + "aws:cdk:path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter2/Resource" } }, - "WeightedRecord328406D0A": { + "RecordWeightedFromCfnParameter3D5E67423": { "Type": "AWS::Route53::RecordSet", "Properties": { "HostedZoneId": { @@ -123,7 +123,7 @@ { "Ref": "RecordWeight3" }, - "_ID_recordweightedRecord38AAB01D6" + "_ID_recordweigParameter3841525F4" ] ] }, @@ -134,13 +134,13 @@ } }, "Metadata": { - "aws:cdk:path": "record-weight-from-cfnparameter/WeightedRecord3/Resource" + "aws:cdk:path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter3/Resource" } }, "CDKMetadata": { "Type": "AWS::CDK::Metadata", "Properties": { - "Analytics": "v2:deflate64:H4sIAAAAAAAA/02OvQ7CMBCDn4U9OUIRYkZdGKt2Y0FpckjXn5yUXGCo+u60ZGGy/VmWbMCAOdhP0s6PeqIelk6sG9WGnpGz4OUMS5P7idydk6B/cEBVv8JfurXoOPqdFtehrHtqbLQzCsZSJc7R/cY1B09CHFYV2CMM6fiuDJyu25khEemYg9CM0Bb9AmpStzOnAAAA" + "Analytics": "v2:deflate64:H4sIAAAAAAAA/02Luw7CMBAEvyW9fZggJFqUhjJKOhrk2Id0efgk+0yKKP+Oghuq3ZnVGjBgKrsm7fykZxpg68W6Sdk1vSJnwesFtjYPM7kHJ0H/5ICqeYc/unfoOPrDltaj7Ae1NtoFBWOZEufofueGgychDrsK7BHGdPrUBs43MNWYiHTMQWhB6Ep+AaNZotCnAAAA" }, "Metadata": { "aws:cdk:path": "record-weight-from-cfnparameter/CDKMetadata/Default" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/tree.json index 33ec549b1ae99..59f30749810be 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/tree.json @@ -64,13 +64,13 @@ "version": "0.0.0" } }, - "WeightedRecord0": { - "id": "WeightedRecord0", - "path": "record-weight-from-cfnparameter/WeightedRecord0", + "RecordWeightedFromCfnParameter0": { + "id": "RecordWeightedFromCfnParameter0", + "path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter0", "children": { "Resource": { "id": "Resource", - "path": "record-weight-from-cfnparameter/WeightedRecord0/Resource", + "path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter0/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", "aws:cdk:cloudformation:props": { @@ -89,7 +89,7 @@ { "Ref": "RecordWeight0" }, - "_ID_recordweightedRecord080EC42DE" + "_ID_recordweigParameter04970FE98" ] ] }, @@ -111,13 +111,13 @@ "version": "0.0.0" } }, - "WeightedRecord1": { - "id": "WeightedRecord1", - "path": "record-weight-from-cfnparameter/WeightedRecord1", + "RecordWeightedFromCfnParameter1": { + "id": "RecordWeightedFromCfnParameter1", + "path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter1", "children": { "Resource": { "id": "Resource", - "path": "record-weight-from-cfnparameter/WeightedRecord1/Resource", + "path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter1/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", "aws:cdk:cloudformation:props": { @@ -136,7 +136,7 @@ { "Ref": "RecordWeight1" }, - "_ID_recordweightedRecord118B8FA43" + "_ID_recordweigParameter1EB51A657" ] ] }, @@ -158,13 +158,13 @@ "version": "0.0.0" } }, - "WeightedRecord2": { - "id": "WeightedRecord2", - "path": "record-weight-from-cfnparameter/WeightedRecord2", + "RecordWeightedFromCfnParameter2": { + "id": "RecordWeightedFromCfnParameter2", + "path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter2", "children": { "Resource": { "id": "Resource", - "path": "record-weight-from-cfnparameter/WeightedRecord2/Resource", + "path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter2/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", "aws:cdk:cloudformation:props": { @@ -183,7 +183,7 @@ { "Ref": "RecordWeight2" }, - "_ID_recordweightedRecord29D395B6F" + "_ID_recordweigParameter208409FED" ] ] }, @@ -205,13 +205,13 @@ "version": "0.0.0" } }, - "WeightedRecord3": { - "id": "WeightedRecord3", - "path": "record-weight-from-cfnparameter/WeightedRecord3", + "RecordWeightedFromCfnParameter3": { + "id": "RecordWeightedFromCfnParameter3", + "path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter3", "children": { "Resource": { "id": "Resource", - "path": "record-weight-from-cfnparameter/WeightedRecord3/Resource", + "path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter3/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", "aws:cdk:cloudformation:props": { @@ -230,7 +230,7 @@ { "Ref": "RecordWeight3" }, - "_ID_recordweightedRecord38AAB01D6" + "_ID_recordweigParameter3841525F4" ] ] }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.ts index 2f8dacb1bf9f0..689b97a64aca5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.ts @@ -24,7 +24,7 @@ class TestStack extends Stack { { target: '3.4.5.6', weight: new CfnParameter(this, 'RecordWeight2', weightParameterProps) }, { target: '4.5.6.7', weight: new CfnParameter(this, 'RecordWeight3', weightParameterProps) }, ].forEach((data, index) => { - new route53.ARecord(this, `WeightedRecord${index}`, { + new route53.ARecord(this, `RecordWeightedFromCfnParameter${index}`, { zone: hostedZone, recordName: 'www', weight: data.weight.valueAsNumber, From 59916398cdac22a91a43c8b1c60fedf494d46c9a Mon Sep 17 00:00:00 2001 From: Nicholas Omer Chiasson Date: Fri, 25 Oct 2024 08:54:12 +0000 Subject: [PATCH 3/6] Fix integration test --- ...efaultTestDeployAssertB313B703.assets.json | 4 +- ...aultTestDeployAssertB313B703.template.json | 278 ----------------- .../manifest.json | 28 +- ...ecord-weight-from-cfnparameter.assets.json | 4 +- ...ord-weight-from-cfnparameter.template.json | 291 ------------------ .../tree.json | 52 ---- 6 files changed, 6 insertions(+), 651 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.assets.json index 401084031d4be..7490b2af331b6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.assets.json @@ -1,7 +1,7 @@ { "version": "38.0.1", "files": { - "dd422c7ef7456abdbbf2e9b18c750ce262025988c67dc32d98218d53614783aa": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { "path": "Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd422c7ef7456abdbbf2e9b18c750ce262025988c67dc32d98218d53614783aa.json", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.template.json index 54b58f2119219..ad9d0fb73d1dd 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.template.json @@ -1,282 +1,4 @@ { - "Resources": { - "CDKMetadata": { - "Type": "AWS::CDK::Metadata", - "Properties": { - "Analytics": "v2:deflate64:H4sIAAAAAAAA/yXGuw2AIBAA0Fno4Tyt7NkAJ0DA5ECPhI8Wxt2NsXoPAQGFvapyPqmdVriXZl2SemMTau7Fhe86s6dGmR/J2QeIdTgnhHEGFLESqdK50RHA/L4dFigbWAAAAA==" - }, - "Metadata": { - "aws:cdk:path": "Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/CDKMetadata/Default" - }, - "Condition": "CDKMetadataAvailable" - } - }, - "Conditions": { - "CDKMetadataAvailable": { - "Fn::Or": [ - { - "Fn::Or": [ - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "af-south-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ap-east-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ap-northeast-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ap-northeast-2" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ap-northeast-3" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ap-south-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ap-south-2" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ap-southeast-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ap-southeast-2" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ap-southeast-3" - ] - } - ] - }, - { - "Fn::Or": [ - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ap-southeast-4" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ca-central-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ca-west-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "cn-north-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "cn-northwest-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "eu-central-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "eu-central-2" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "eu-north-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "eu-south-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "eu-south-2" - ] - } - ] - }, - { - "Fn::Or": [ - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "eu-west-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "eu-west-2" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "eu-west-3" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "il-central-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "me-central-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "me-south-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "sa-east-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "us-east-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "us-east-2" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "us-west-1" - ] - } - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "us-west-2" - ] - } - ] - } - }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/manifest.json index 06ee57cfb9cc2..73fe02989ebb3 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/manifest.json @@ -19,7 +19,7 @@ "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/24621e779b3b62c4e28e85db4bf2bbaa80f572df06130a9963c0eafeeb2b5a92.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a45fab474cff7ba97e8d31e7eb404ad1526a3bac8e68dbc1951fcc7c99fe2a53.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -89,18 +89,6 @@ "data": "RecordWeightedFromCfnParameter3D5E67423" } ], - "/record-weight-from-cfnparameter/CDKMetadata/Default": [ - { - "type": "aws:cdk:logicalId", - "data": "CDKMetadata" - } - ], - "/record-weight-from-cfnparameter/CDKMetadata/Condition": [ - { - "type": "aws:cdk:logicalId", - "data": "CDKMetadataAvailable" - } - ], "/record-weight-from-cfnparameter/BootstrapVersion": [ { "type": "aws:cdk:logicalId", @@ -134,7 +122,7 @@ "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/dd422c7ef7456abdbbf2e9b18c750ce262025988c67dc32d98218d53614783aa.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -150,18 +138,6 @@ "Route53RecordWeightFromCfnParameterIntegDefaultTestDeployAssertB313B703.assets" ], "metadata": { - "/Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/CDKMetadata/Default": [ - { - "type": "aws:cdk:logicalId", - "data": "CDKMetadata" - } - ], - "/Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/CDKMetadata/Condition": [ - { - "type": "aws:cdk:logicalId", - "data": "CDKMetadataAvailable" - } - ], "/Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/BootstrapVersion": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.assets.json index b7552c2bdcd48..29d991a127f86 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.assets.json @@ -1,7 +1,7 @@ { "version": "38.0.1", "files": { - "24621e779b3b62c4e28e85db4bf2bbaa80f572df06130a9963c0eafeeb2b5a92": { + "a45fab474cff7ba97e8d31e7eb404ad1526a3bac8e68dbc1951fcc7c99fe2a53": { "source": { "path": "record-weight-from-cfnparameter.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "24621e779b3b62c4e28e85db4bf2bbaa80f572df06130a9963c0eafeeb2b5a92.json", + "objectKey": "a45fab474cff7ba97e8d31e7eb404ad1526a3bac8e68dbc1951fcc7c99fe2a53.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.template.json index 9551b693720c4..8f14a21601af3 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.template.json @@ -4,9 +4,6 @@ "Type": "AWS::Route53::HostedZone", "Properties": { "Name": "cdk.dev." - }, - "Metadata": { - "aws:cdk:path": "record-weight-from-cfnparameter/HostedZone/Resource" } }, "RecordWeightedFromCfnParameter0FB5DFC65": { @@ -36,9 +33,6 @@ "Weight": { "Ref": "RecordWeight0" } - }, - "Metadata": { - "aws:cdk:path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter0/Resource" } }, "RecordWeightedFromCfnParameter11D8E5896": { @@ -68,9 +62,6 @@ "Weight": { "Ref": "RecordWeight1" } - }, - "Metadata": { - "aws:cdk:path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter1/Resource" } }, "RecordWeightedFromCfnParameter2B12A1DFB": { @@ -100,9 +91,6 @@ "Weight": { "Ref": "RecordWeight2" } - }, - "Metadata": { - "aws:cdk:path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter2/Resource" } }, "RecordWeightedFromCfnParameter3D5E67423": { @@ -132,20 +120,7 @@ "Weight": { "Ref": "RecordWeight3" } - }, - "Metadata": { - "aws:cdk:path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter3/Resource" } - }, - "CDKMetadata": { - "Type": "AWS::CDK::Metadata", - "Properties": { - "Analytics": "v2:deflate64:H4sIAAAAAAAA/02Luw7CMBAEvyW9fZggJFqUhjJKOhrk2Id0efgk+0yKKP+Oghuq3ZnVGjBgKrsm7fykZxpg68W6Sdk1vSJnwesFtjYPM7kHJ0H/5ICqeYc/unfoOPrDltaj7Ae1NtoFBWOZEufofueGgychDrsK7BHGdPrUBs43MNWYiHTMQWhB6Ep+AaNZotCnAAAA" - }, - "Metadata": { - "aws:cdk:path": "record-weight-from-cfnparameter/CDKMetadata/Default" - }, - "Condition": "CDKMetadataAvailable" } }, "Parameters": { @@ -179,272 +154,6 @@ "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" } }, - "Conditions": { - "CDKMetadataAvailable": { - "Fn::Or": [ - { - "Fn::Or": [ - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "af-south-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ap-east-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ap-northeast-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ap-northeast-2" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ap-northeast-3" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ap-south-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ap-south-2" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ap-southeast-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ap-southeast-2" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ap-southeast-3" - ] - } - ] - }, - { - "Fn::Or": [ - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ap-southeast-4" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ca-central-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "ca-west-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "cn-north-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "cn-northwest-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "eu-central-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "eu-central-2" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "eu-north-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "eu-south-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "eu-south-2" - ] - } - ] - }, - { - "Fn::Or": [ - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "eu-west-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "eu-west-2" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "eu-west-3" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "il-central-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "me-central-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "me-south-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "sa-east-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "us-east-1" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "us-east-2" - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "us-west-1" - ] - } - ] - }, - { - "Fn::Equals": [ - { - "Ref": "AWS::Region" - }, - "us-west-2" - ] - } - ] - } - }, "Rules": { "CheckBootstrapVersion": { "Assertions": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/tree.json index 59f30749810be..62d57a5daa2c9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/tree.json @@ -252,32 +252,6 @@ "version": "0.0.0" } }, - "CDKMetadata": { - "id": "CDKMetadata", - "path": "record-weight-from-cfnparameter/CDKMetadata", - "children": { - "Default": { - "id": "Default", - "path": "record-weight-from-cfnparameter/CDKMetadata/Default", - "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" - } - }, - "Condition": { - "id": "Condition", - "path": "record-weight-from-cfnparameter/CDKMetadata/Condition", - "constructInfo": { - "fqn": "aws-cdk-lib.CfnCondition", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "record-weight-from-cfnparameter/BootstrapVersion", @@ -320,32 +294,6 @@ "id": "DeployAssert", "path": "Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert", "children": { - "CDKMetadata": { - "id": "CDKMetadata", - "path": "Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/CDKMetadata", - "children": { - "Default": { - "id": "Default", - "path": "Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/CDKMetadata/Default", - "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" - } - }, - "Condition": { - "id": "Condition", - "path": "Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/CDKMetadata/Condition", - "constructInfo": { - "fqn": "aws-cdk-lib.CfnCondition", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/BootstrapVersion", From fc84fcf9eaf7997ecb4e3e05abc9fa1213318138 Mon Sep 17 00:00:00 2001 From: Nicholas Omer Chiasson Date: Sun, 27 Oct 2024 13:40:06 +0000 Subject: [PATCH 4/6] Stabilizing integ test for record set weight from param --- .../manifest.json | 54 +++++++++++++++---- ...ecord-weight-from-cfnparameter.assets.json | 4 +- ...ord-weight-from-cfnparameter.template.json | 16 +++--- .../tree.json | 48 ++++++++--------- .../integ.record-weight-from-cfnparameter.ts | 2 +- .../aws-cdk-lib/aws-route53/lib/record-set.ts | 5 +- 6 files changed, 84 insertions(+), 45 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/manifest.json index 73fe02989ebb3..2bec5691b4714 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/manifest.json @@ -19,7 +19,7 @@ "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a45fab474cff7ba97e8d31e7eb404ad1526a3bac8e68dbc1951fcc7c99fe2a53.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/301b5b33e5e387daebea8b387f5d80fd6b29eadc0ea88a23bee6b15a7b159ee9.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -65,28 +65,28 @@ "data": "RecordWeight3" } ], - "/record-weight-from-cfnparameter/RecordWeightedFromCfnParameter0/Resource": [ + "/record-weight-from-cfnparameter/RecordWithParamWeight0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "RecordWeightedFromCfnParameter0FB5DFC65" + "data": "RecordWithParamWeight01950FDF7" } ], - "/record-weight-from-cfnparameter/RecordWeightedFromCfnParameter1/Resource": [ + "/record-weight-from-cfnparameter/RecordWithParamWeight1/Resource": [ { "type": "aws:cdk:logicalId", - "data": "RecordWeightedFromCfnParameter11D8E5896" + "data": "RecordWithParamWeight182FF0BDE" } ], - "/record-weight-from-cfnparameter/RecordWeightedFromCfnParameter2/Resource": [ + "/record-weight-from-cfnparameter/RecordWithParamWeight2/Resource": [ { "type": "aws:cdk:logicalId", - "data": "RecordWeightedFromCfnParameter2B12A1DFB" + "data": "RecordWithParamWeight2C5120D0E" } ], - "/record-weight-from-cfnparameter/RecordWeightedFromCfnParameter3/Resource": [ + "/record-weight-from-cfnparameter/RecordWithParamWeight3/Resource": [ { "type": "aws:cdk:logicalId", - "data": "RecordWeightedFromCfnParameter3D5E67423" + "data": "RecordWithParamWeight37D431545" } ], "/record-weight-from-cfnparameter/BootstrapVersion": [ @@ -100,6 +100,42 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "RecordWeightedFromParameter04394A234": [ + { + "type": "aws:cdk:logicalId", + "data": "RecordWeightedFromParameter04394A234", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "RecordWeightedFromParameter18B61ED39": [ + { + "type": "aws:cdk:logicalId", + "data": "RecordWeightedFromParameter18B61ED39", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "RecordWeightedFromParameter29583BE12": [ + { + "type": "aws:cdk:logicalId", + "data": "RecordWeightedFromParameter29583BE12", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "RecordWeightedFromParameter3511F1BB5": [ + { + "type": "aws:cdk:logicalId", + "data": "RecordWeightedFromParameter3511F1BB5", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "record-weight-from-cfnparameter" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.assets.json index 29d991a127f86..710b315e75cf4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.assets.json @@ -1,7 +1,7 @@ { "version": "38.0.1", "files": { - "a45fab474cff7ba97e8d31e7eb404ad1526a3bac8e68dbc1951fcc7c99fe2a53": { + "301b5b33e5e387daebea8b387f5d80fd6b29eadc0ea88a23bee6b15a7b159ee9": { "source": { "path": "record-weight-from-cfnparameter.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a45fab474cff7ba97e8d31e7eb404ad1526a3bac8e68dbc1951fcc7c99fe2a53.json", + "objectKey": "301b5b33e5e387daebea8b387f5d80fd6b29eadc0ea88a23bee6b15a7b159ee9.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.template.json index 8f14a21601af3..dc4d98afa2aaf 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.template.json @@ -6,7 +6,7 @@ "Name": "cdk.dev." } }, - "RecordWeightedFromCfnParameter0FB5DFC65": { + "RecordWithParamWeight01950FDF7": { "Type": "AWS::Route53::RecordSet", "Properties": { "HostedZoneId": { @@ -24,7 +24,7 @@ { "Ref": "RecordWeight0" }, - "_ID_recordweigParameter04970FE98" + "_ID_recordweightParamWeight059BCC4E1" ] ] }, @@ -35,7 +35,7 @@ } } }, - "RecordWeightedFromCfnParameter11D8E5896": { + "RecordWithParamWeight182FF0BDE": { "Type": "AWS::Route53::RecordSet", "Properties": { "HostedZoneId": { @@ -53,7 +53,7 @@ { "Ref": "RecordWeight1" }, - "_ID_recordweigParameter1EB51A657" + "_ID_recordweightParamWeight1304B1475" ] ] }, @@ -64,7 +64,7 @@ } } }, - "RecordWeightedFromCfnParameter2B12A1DFB": { + "RecordWithParamWeight2C5120D0E": { "Type": "AWS::Route53::RecordSet", "Properties": { "HostedZoneId": { @@ -82,7 +82,7 @@ { "Ref": "RecordWeight2" }, - "_ID_recordweigParameter208409FED" + "_ID_recordweightParamWeight25B9D18F1" ] ] }, @@ -93,7 +93,7 @@ } } }, - "RecordWeightedFromCfnParameter3D5E67423": { + "RecordWithParamWeight37D431545": { "Type": "AWS::Route53::RecordSet", "Properties": { "HostedZoneId": { @@ -111,7 +111,7 @@ { "Ref": "RecordWeight3" }, - "_ID_recordweigParameter3841525F4" + "_ID_recordweightParamWeight37DA83B23" ] ] }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/tree.json index 62d57a5daa2c9..ffd8d88ab9f97 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/tree.json @@ -64,13 +64,13 @@ "version": "0.0.0" } }, - "RecordWeightedFromCfnParameter0": { - "id": "RecordWeightedFromCfnParameter0", - "path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter0", + "RecordWithParamWeight0": { + "id": "RecordWithParamWeight0", + "path": "record-weight-from-cfnparameter/RecordWithParamWeight0", "children": { "Resource": { "id": "Resource", - "path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter0/Resource", + "path": "record-weight-from-cfnparameter/RecordWithParamWeight0/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", "aws:cdk:cloudformation:props": { @@ -89,7 +89,7 @@ { "Ref": "RecordWeight0" }, - "_ID_recordweigParameter04970FE98" + "_ID_recordweightParamWeight059BCC4E1" ] ] }, @@ -107,17 +107,17 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_route53.ARecord", + "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" } }, - "RecordWeightedFromCfnParameter1": { - "id": "RecordWeightedFromCfnParameter1", - "path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter1", + "RecordWithParamWeight1": { + "id": "RecordWithParamWeight1", + "path": "record-weight-from-cfnparameter/RecordWithParamWeight1", "children": { "Resource": { "id": "Resource", - "path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter1/Resource", + "path": "record-weight-from-cfnparameter/RecordWithParamWeight1/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", "aws:cdk:cloudformation:props": { @@ -136,7 +136,7 @@ { "Ref": "RecordWeight1" }, - "_ID_recordweigParameter1EB51A657" + "_ID_recordweightParamWeight1304B1475" ] ] }, @@ -154,17 +154,17 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_route53.ARecord", + "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" } }, - "RecordWeightedFromCfnParameter2": { - "id": "RecordWeightedFromCfnParameter2", - "path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter2", + "RecordWithParamWeight2": { + "id": "RecordWithParamWeight2", + "path": "record-weight-from-cfnparameter/RecordWithParamWeight2", "children": { "Resource": { "id": "Resource", - "path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter2/Resource", + "path": "record-weight-from-cfnparameter/RecordWithParamWeight2/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", "aws:cdk:cloudformation:props": { @@ -183,7 +183,7 @@ { "Ref": "RecordWeight2" }, - "_ID_recordweigParameter208409FED" + "_ID_recordweightParamWeight25B9D18F1" ] ] }, @@ -201,17 +201,17 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_route53.ARecord", + "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" } }, - "RecordWeightedFromCfnParameter3": { - "id": "RecordWeightedFromCfnParameter3", - "path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter3", + "RecordWithParamWeight3": { + "id": "RecordWithParamWeight3", + "path": "record-weight-from-cfnparameter/RecordWithParamWeight3", "children": { "Resource": { "id": "Resource", - "path": "record-weight-from-cfnparameter/RecordWeightedFromCfnParameter3/Resource", + "path": "record-weight-from-cfnparameter/RecordWithParamWeight3/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", "aws:cdk:cloudformation:props": { @@ -230,7 +230,7 @@ { "Ref": "RecordWeight3" }, - "_ID_recordweigParameter3841525F4" + "_ID_recordweightParamWeight37DA83B23" ] ] }, @@ -248,7 +248,7 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_route53.ARecord", + "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.ts index 689b97a64aca5..6d2d2160aa059 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.ts @@ -24,7 +24,7 @@ class TestStack extends Stack { { target: '3.4.5.6', weight: new CfnParameter(this, 'RecordWeight2', weightParameterProps) }, { target: '4.5.6.7', weight: new CfnParameter(this, 'RecordWeight3', weightParameterProps) }, ].forEach((data, index) => { - new route53.ARecord(this, `RecordWeightedFromCfnParameter${index}`, { + new route53.ARecord(this, `RecordWithParamWeight${index}`, { zone: hostedZone, recordName: 'www', weight: data.weight.valueAsNumber, diff --git a/packages/aws-cdk-lib/aws-route53/lib/record-set.ts b/packages/aws-cdk-lib/aws-route53/lib/record-set.ts index 021affdd2b1de..592da5b7ce790 100644 --- a/packages/aws-cdk-lib/aws-route53/lib/record-set.ts +++ b/packages/aws-cdk-lib/aws-route53/lib/record-set.ts @@ -406,7 +406,10 @@ export class RecordSet extends Resource implements IRecordSet { } if (this.weight !== undefined) { - const idPrefix = `WEIGHT_${this.weight}_ID_`; + const idPrefix = `WEIGHT_${Token.isUnresolved(this.weight) + ? Token.asString(this.weight) + : this.weight + }_ID_`; return this.createIdentifier(idPrefix); } From 77a8fc519742d0d82d8a0953e8e92bc31484b660 Mon Sep 17 00:00:00 2001 From: Nicholas Omer Chiasson Date: Sun, 27 Oct 2024 14:27:43 +0000 Subject: [PATCH 5/6] Forcing length of record set identifier --- packages/aws-cdk-lib/aws-route53/lib/record-set.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/aws-cdk-lib/aws-route53/lib/record-set.ts b/packages/aws-cdk-lib/aws-route53/lib/record-set.ts index 592da5b7ce790..ef5982da54610 100644 --- a/packages/aws-cdk-lib/aws-route53/lib/record-set.ts +++ b/packages/aws-cdk-lib/aws-route53/lib/record-set.ts @@ -406,11 +406,15 @@ export class RecordSet extends Resource implements IRecordSet { } if (this.weight !== undefined) { - const idPrefix = `WEIGHT_${Token.isUnresolved(this.weight) - ? Token.asString(this.weight) - : this.weight - }_ID_`; - return this.createIdentifier(idPrefix); + if (Token.isUnresolved(this.weight)) { + const replacement = 'XXX'; // XXX simply because 255 is the highest value for a record weight + const idPrefix = `WEIGHT_${replacement}_ID_`; + const idTemplate = this.createIdentifier(idPrefix); + return idTemplate.replace(replacement, Token.asString(this.weight)); + } else { + const idPrefix = `WEIGHT_${this.weight}_ID_`; + return this.createIdentifier(idPrefix); + } } if (this.region) { From 78364da8aabd8759fa5db4a2062e27bbf4cc797d Mon Sep 17 00:00:00 2001 From: Nicholas Omer Chiasson Date: Sun, 27 Oct 2024 21:41:05 +0000 Subject: [PATCH 6/6] Hopefully a good snapshot --- .../manifest.json | 38 +------- ...ecord-weight-from-cfnparameter.assets.json | 4 +- ...ord-weight-from-cfnparameter.template.json | 8 +- .../tree.json | 96 +++++++++---------- 4 files changed, 55 insertions(+), 91 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/manifest.json index 2bec5691b4714..097e080ec6024 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/manifest.json @@ -19,7 +19,7 @@ "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/301b5b33e5e387daebea8b387f5d80fd6b29eadc0ea88a23bee6b15a7b159ee9.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9603704f36aac4a47218ab44a07a0ea096d4ef0e4c35203a39f72aef7b709c33.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -100,42 +100,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "RecordWeightedFromParameter04394A234": [ - { - "type": "aws:cdk:logicalId", - "data": "RecordWeightedFromParameter04394A234", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "RecordWeightedFromParameter18B61ED39": [ - { - "type": "aws:cdk:logicalId", - "data": "RecordWeightedFromParameter18B61ED39", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "RecordWeightedFromParameter29583BE12": [ - { - "type": "aws:cdk:logicalId", - "data": "RecordWeightedFromParameter29583BE12", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "RecordWeightedFromParameter3511F1BB5": [ - { - "type": "aws:cdk:logicalId", - "data": "RecordWeightedFromParameter3511F1BB5", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "record-weight-from-cfnparameter" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.assets.json index 710b315e75cf4..739fa4bf65e2e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.assets.json @@ -1,7 +1,7 @@ { "version": "38.0.1", "files": { - "301b5b33e5e387daebea8b387f5d80fd6b29eadc0ea88a23bee6b15a7b159ee9": { + "9603704f36aac4a47218ab44a07a0ea096d4ef0e4c35203a39f72aef7b709c33": { "source": { "path": "record-weight-from-cfnparameter.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "301b5b33e5e387daebea8b387f5d80fd6b29eadc0ea88a23bee6b15a7b159ee9.json", + "objectKey": "9603704f36aac4a47218ab44a07a0ea096d4ef0e4c35203a39f72aef7b709c33.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.template.json index dc4d98afa2aaf..6a96397fb1b62 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/record-weight-from-cfnparameter.template.json @@ -24,7 +24,7 @@ { "Ref": "RecordWeight0" }, - "_ID_recordweightParamWeight059BCC4E1" + "_ID_recordweightfromcfnpaecordWithParamWeight059BCC4E1" ] ] }, @@ -53,7 +53,7 @@ { "Ref": "RecordWeight1" }, - "_ID_recordweightParamWeight1304B1475" + "_ID_recordweightfromcfnpaecordWithParamWeight1304B1475" ] ] }, @@ -82,7 +82,7 @@ { "Ref": "RecordWeight2" }, - "_ID_recordweightParamWeight25B9D18F1" + "_ID_recordweightfromcfnpaecordWithParamWeight25B9D18F1" ] ] }, @@ -111,7 +111,7 @@ { "Ref": "RecordWeight3" }, - "_ID_recordweightParamWeight37DA83B23" + "_ID_recordweightfromcfnpaecordWithParamWeight37DA83B23" ] ] }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/tree.json index ffd8d88ab9f97..17c358fac61fc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.record-weight-from-cfnparameter.js.snapshot/tree.json @@ -22,46 +22,46 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_route53.CfnHostedZone", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_route53.PublicHostedZone", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "RecordWeight0": { "id": "RecordWeight0", "path": "record-weight-from-cfnparameter/RecordWeight0", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "RecordWeight1": { "id": "RecordWeight1", "path": "record-weight-from-cfnparameter/RecordWeight1", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "RecordWeight2": { "id": "RecordWeight2", "path": "record-weight-from-cfnparameter/RecordWeight2", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "RecordWeight3": { "id": "RecordWeight3", "path": "record-weight-from-cfnparameter/RecordWeight3", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "RecordWithParamWeight0": { @@ -89,7 +89,7 @@ { "Ref": "RecordWeight0" }, - "_ID_recordweightParamWeight059BCC4E1" + "_ID_recordweightfromcfnpaecordWithParamWeight059BCC4E1" ] ] }, @@ -101,14 +101,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_route53.CfnRecordSet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "RecordWithParamWeight1": { @@ -136,7 +136,7 @@ { "Ref": "RecordWeight1" }, - "_ID_recordweightParamWeight1304B1475" + "_ID_recordweightfromcfnpaecordWithParamWeight1304B1475" ] ] }, @@ -148,14 +148,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_route53.CfnRecordSet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "RecordWithParamWeight2": { @@ -183,7 +183,7 @@ { "Ref": "RecordWeight2" }, - "_ID_recordweightParamWeight25B9D18F1" + "_ID_recordweightfromcfnpaecordWithParamWeight25B9D18F1" ] ] }, @@ -195,14 +195,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_route53.CfnRecordSet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "RecordWithParamWeight3": { @@ -230,7 +230,7 @@ { "Ref": "RecordWeight3" }, - "_ID_recordweightParamWeight37DA83B23" + "_ID_recordweightfromcfnpaecordWithParamWeight37DA83B23" ] ] }, @@ -242,36 +242,36 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_route53.CfnRecordSet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "record-weight-from-cfnparameter/BootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "record-weight-from-cfnparameter/CheckBootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "Route53RecordWeightFromCfnParameterInteg": { @@ -287,7 +287,7 @@ "path": "Route53RecordWeightFromCfnParameterInteg/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -298,22 +298,22 @@ "id": "BootstrapVersion", "path": "Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "Route53RecordWeightFromCfnParameterInteg/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } }, @@ -333,13 +333,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.4.2" } } } \ No newline at end of file