Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple tags cdk bootstrap

According to this github-repo, it's possible to add multiple --tags when bootstrapping an AWS environment by running cdk bootstrap. I have tried finding answers online and have tried to solve it in multiple ways, but none has worked so far. This is the relevant part of my bootstrapping bash-script:

#! /usr/bin/env bash

cdk bootstrap --profile $AWS_PROFILE aws://XXXXXXXXXX/eu-west-1 \
            --toolkit-stack-name some-toolkit-name \
            --bootstrap-bucket-name some-s3-bucket-name \
            --tags key1=value1,key2=value2

For example the result from the above, is 1 tag key1=value1,key2, not sure what happened with value2 here. Below I outline other ways I have tried without success:

--tags (key1=value1, key2=value2) 
--tags {"key1":"value1","key2":"value2"} 
--tags {"key1"="value1","key2"="value2"} 
--tags key1=value1 key2=value2
--tags key1=value1 --tags key2=value2
'--tags key1=value1,key2=value2'
--tags 'key1=value1,key2=value2'
--tags 'key1=value1 key2=value2'
--tags "key1=value1 key2=value2"
--tags "key1=value1,key2=value2"
--tags [key1=value1,key2=value2]
--tags "Key=key1,Value=value1 Key=key2,Value=value2"
--tags "Key"="key1","Value"="value1" "Key"="key2","Value"="value2"
--tags Key=key1,Value=value1 Key=key2,Value=value2

My aws --version is aws-cli/2.0.59, and my cdk --version is 1.115.0.

like image 810
armara Avatar asked Oct 20 '25 19:10

armara


1 Answers

It got solved by writing --tags twice on two separate lines, like such

--tags key1=value1 \
--tags key2=value2
like image 100
armara Avatar answered Oct 22 '25 09:10

armara



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!