Skip to content

Commit

Permalink
chore: change bootstrap SSM prefix to "cdk-bootstrap" (#9929)
Browse files Browse the repository at this point in the history
It used to be `aws-cdk-bootstrap` but we're not allowed to start
strings with the letters `aws`, those names are reserved.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
rix0rrr authored Aug 24, 2020
1 parent e980c00 commit fdddb10
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ function addBootstrapVersionRule(stack: Stack, requiredVersion: number, qualifie
const param = new CfnParameter(stack, 'BootstrapVersion', {
type: 'AWS::SSM::Parameter::Value<String>',
description: 'Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store.',
default: `/aws-cdk-bootstrap/${qualifier}/version`,
default: `/cdk-bootstrap/${qualifier}/version`,
});

// There is no >= check in CloudFormation, so we have to check the number
Expand All @@ -499,4 +499,4 @@ function range(startIncl: number, endExcl: number) {
ret.push(i);
}
return ret;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export = {
// THEN -- the S3 url is advertised on the stack artifact
const stackArtifact = asm.getStackArtifact('Stack');

const templateHash = '19e1e8612660f79362e091714ab7b3583961936d762c75be8b8083c3af40850a';
const templateHash = '040a6374d4c48c0db867f1d4f95c69b12d28e69c3b8a9903a1db1ec651dcf480';

test.equals(stackArtifact.stackTemplateAssetObjectUrl, `s3://cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}/${templateHash}`);

Expand Down Expand Up @@ -70,7 +70,7 @@ export = {
// THEN
const template = app.synth().getStackByName('Stack').template;
test.deepEqual(template?.Parameters?.BootstrapVersion?.Type, 'AWS::SSM::Parameter::Value<String>');
test.deepEqual(template?.Parameters?.BootstrapVersion?.Default, '/aws-cdk-bootstrap/hnb659fds/version');
test.deepEqual(template?.Parameters?.BootstrapVersion?.Default, '/cdk-bootstrap/hnb659fds/version');

const assertions = template?.Rules?.CheckBootstrapVersion?.Assertions ?? [];
test.deepEqual(assertions.length, 1);
Expand Down Expand Up @@ -220,4 +220,4 @@ function readAssetManifest(asm: cxapi.CloudAssembly): cxschema.AssetManifest {
if (!manifestArtifact) { throw new Error('no asset manifest in assembly'); }

return JSON.parse(fs.readFileSync(manifestArtifact.file, { encoding: 'utf-8' }));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/aws-cdk-bootstrap/hnb659fds/version",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store."
}
},
Expand Down Expand Up @@ -1694,4 +1694,4 @@
}
}
}
}
}
4 changes: 2 additions & 2 deletions packages/@aws-cdk/pipelines/test/integ.pipeline.expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/aws-cdk-bootstrap/hnb659fds/version",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store."
}
},
Expand Down Expand Up @@ -1390,4 +1390,4 @@
}
}
}
}
}
4 changes: 2 additions & 2 deletions packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ Resources:
Properties:
Type: String
Name:
Fn::Sub: '/aws-cdk-bootstrap/${Qualifier}/version'
Fn::Sub: '/cdk-bootstrap/${Qualifier}/version'
Value: 4
Outputs:
BucketName:
Expand Down Expand Up @@ -401,4 +401,4 @@ Outputs:
Description: The version of the bootstrap resources that are currently mastered
in this stack
Value:
Fn::GetAtt: [CdkBootstrapVersion, Value]
Fn::GetAtt: [CdkBootstrapVersion, Value]

0 comments on commit fdddb10

Please sign in to comment.