I am looking to use automise to setup amazon EC2 instances. It seems it can do most of what we need. However, it is common practice to setup an EC2 instance with tags. Those tags control properties of the instance. For instance, we have a tag called “Staging” whose values can either be “Production” or “Development”. If its production, certain things have to happen that do not happen in development. Is there an action for reading the instance tags?
Here is some info about it
We don’t have any tagging actions or tags support at this stage. I had a look at the documentation, and it doesn’t look to be too difficult. I have made a start on this, hopefully we should have something in a week or so (juggling many tasks).
Cool. What we would need is the ability to request the value of a tag for the currently running instance, and store that value in a variable.
As an aside, how would I get the instance ID of the instance I am currently running on?
I can always do it via executing an HTTP call as described in
but do you have something built in already?
You should be able to get the instance id through the instance identity document
I’ll see if we can wrap this in an action to make it easier to use.
Ya, I know I can do it via an HTTP Powershell call. But if I wanted to use powershell I would not be using automise
Just bear in mind that it is impossible for us to wrap every amazon endpoint in an action, there will be times where you need to fallback to powershell (which can be done inside Automise using the Run script action, or script events on other actions).
Understood. I dont want every endpoint action, just the useful ones
I have added 2 new actions
EC2 Tag Resources
EC2 Get Resource Tags
The HTTP Get File action that should allow you to get the instance-id inside the instance
Thank you. We will give them a try ASAP.