Satheesh Subramanian
Satheesh Subramanian

Reputation: 11

Resource Tagging on EC2 instance, getting an error "Key not found in Tags properties" while creating stack

Resources:
  EC2Instance:
    Type: AWS::EC2::Instance
    Properties:
      Tags:
      - Key: Name
        Value: rwdex-nonprod-dev-ecp-host1
      - Key: Application
        Value: rwdex
      - key: Consumer
        Value: rwdex-nonprod-admi
      - Key: Costcenter
        Value: 10005883  
      - Key: Division
        Value: MRL
      - Key: Environment
        Value: Development  

Upvotes: 0

Views: 3327

Answers (2)

Sarma
Sarma

Reputation: 440

Simple! Many parts of CloudFormation templates are CASE-SENSITIVE. For your 3rd Tag (specifically, "key: Consumer" ).. .. the LHS is ALL lower-case 'key'! Fix the LHS to 'Title-Case' .. as in 'Key' (capital K).

Upvotes: 2

ben5556
ben5556

Reputation: 3018

Correct format is as below

Tags:
  -
    Key: Name
    Value: rwdex-nonprod-dev-ecp-host1

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-ec2.html#scenario-ec2-instance

Upvotes: 1

Related Questions