AWS tags using salt cloud

34 views
Skip to first unread message

Tim Dunphy

unread,
Sep 28, 2016, 10:47:09 AM9/28/16
to Salt-users
Hello,

 I'm trying to get tagging to work correctly in salt cloud. This is the profile that I'm trying to use:

ec2_private_win_app1_c4.2xlarge:
  provider: company-nonpod-us-east-1
  image: ami-87513090
  size: c4.2xlarge
  network_interfaces:
   - DeviceIndex: 0
     PrivateIpAddresses:
       - Primary: True
     #auto assign public ip (not EIP)
     AssociatePublicIpAddress: False
     SubnetId: subnet-xxxxxxxx
     SecurityGroupId: sg-xxxxxxxx
     tag:
      - {'Engagement': 'xxxxxxxxxxxx'}
      - {'Owner': 'Tim Dunphy'}
      - {'Name': 'production'}
     block_device_mappings:
        - DeviceName: /dev/sda1
          Ebs.VolumeSize: 120
          Ebs.VolumeType: gp2
        - DeviceName: /dev/sdf
          Ebs.VolumeSize: 100
          Ebs.VolumeType: gp2


The instances spin up fine. However tagging doesn't seem to work at all. When I go into the tags section for the ec2 instance, the tags just aren't there. What can I do to get tags to work for AWS using salt cloud?

Thanks

Charles McLaughlin

unread,
Sep 29, 2016, 12:27:02 PM9/29/16
to Salt-users
That should just be a dictionary, not a list of dictionaries:

tag: {'Engagement': 'xxxxxxxxxxxx', 'Owner': 'Tim Dunphy', 'Name': 'production'}

Tim Dunphy

unread,
Sep 29, 2016, 12:48:26 PM9/29/16
to salt-...@googlegroups.com
ok, got it! I'll give that a try. Thank you!

--
You received this message because you are subscribed to a topic in the Google Groups "Salt-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/salt-users/NyY6UYqLt8A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to salt-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

Tim Dunphy

unread,
Sep 29, 2016, 1:48:21 PM9/29/16
to Salt-users
Hi Charles,

 That works perfectly! Thanks you so much!


Tim
Reply all
Reply to author
Forward
0 new messages