I am building 3 ec2 instances. They are basically the same, however I need to be able to customize an environment context on each one (they all get deployed to the same aws account, vpc, region, subnet).
I defined an ec2 resource and can use resource_count to deploy 3 instances.
How can I differentiate them from each other? ex. Populate a file in a home dir that will contain the environment.
Or do I need to create 3 separate resources?
In the past I could a variable, that would be different for each environment, but I was deploying each instance to a separate “environment”.
I also might need to assign a different IAM role based on the environment (but not a requirement).