Andremoniy
Andremoniy

Reputation: 34920

Assign tags to the particular resource within CloudFormation template

I want to assign some tags to the particular resource in my CloudFormation template. Let's say, I want to do that for the VPNGateway. I do not see any specific form for that in the Template Designer, so, I guess, I should manually add an appropriate key-value inside JSON template description.

Let's say that template block for this VPNGateway looks like:

   "XXXXXX": {
            "Type": "AWS::EC2::VPNGateway",
            "Properties": {},
            "Metadata": {
                "AWS::CloudFormation::Designer": {
                    "id": "xxxxx-yyyy-zzzzz"
                }
            }
        }

Where I should place here tags information? For instance, I want to add tag with key "test:key" and value "test:value".

Upvotes: 0

Views: 151

Answers (1)

Andremoniy
Andremoniy

Reputation: 34920

It should be done in the Properties block:

        "Properties": {
            "Tags": [
                {
                    "Key": "test:key",
                    "Value": "test:value"
                }
            ]
        },

Upvotes: 1

Related Questions