Aws-cdk: CDK need have a way to put tags on the staging bucket created by bootstrap

Created on 27 Mar 2020  路  4Comments  路  Source: aws/aws-cdk


CDK need allow user create tags set for the resources that boostrap creates.

Use Case


Big company has the tagging policy for bucket. Any resource without proper tagged will be quarantined.

Proposed Solution

Reuse the stack tag paramter and allow it post on all resources it create.

Other

  • [ ] :wave: I may be able to implement this feature request
  • [ ] :warning: This feature might incur a breaking change

This is a :rocket: Feature Request

feature-request needs-triage packagtools

Most helpful comment

@chenzhendong this functionality is supported today

cdk bootstrap --tags key=value

This will tag the CloudFormation stack as well as the S3 bucket that it creates

you can read more about it in our documentation.

Feel free to re-open the issue if you still have any unanswered questions.

All 4 comments

@chenzhendong this functionality is supported today

cdk bootstrap --tags key=value

This will tag the CloudFormation stack as well as the S3 bucket that it creates

you can read more about it in our documentation.

Feel free to re-open the issue if you still have any unanswered questions.

It would be nice to add document for the sample format, I don't know the format would like which one of below
cdk bootstrap --tags key1=value1,key2=value2
cdk bootstrap --tags [key1=value1,key2=value2]
cdk bootstrap --tags ["key1=value1","key2=value2"]
cdk bootstrap --tags key1=value1 --tags key2=value2

that's good feedback, we should be able to improve on the sample snippets.

I think this is what you want.

cdk bootstrap --tags key1=value1 --tags key2=value2

Let me know how it goes!

When using the above command I am getting error

[Container] 2020/11/05 10:01:41 Running command npm run cdk-bootstrap --tags assetId=206136 ${ENVIRONMENT} ${REGION}

52 | 聽
53 | > [email protected] cdk-bootstrap /codebuild/output/src698655178/src/iac/cdk/cdk_ecs
54 | > func() { cdk bootstrap -c environment=$1 -c region=$2; }; func "assetId=206136" "DEV" "us-east-1"
55 | 聽
56 | npx: installed 8 in 1.216s
57 | Cannot read property 'environmentType' of undefined
58 | Subprocess exited with error 1
59 | npm ERR! code ELIFECYCLE

Was this page helpful?
0 / 5 - 0 ratings

Related issues

v-do picture v-do  路  3Comments

EduardTheThird picture EduardTheThird  路  3Comments

eladb picture eladb  路  3Comments

eladb picture eladb  路  3Comments

kawamoto picture kawamoto  路  3Comments