How are people who are using immutable infrastructure handling configuration changes between their different environments? I can't workout a nice way to create one AMI per role and use it in all environments.
What I mean is how do I build a single ami that I can deploy to development, staging and production, but that points to the correct ELB, etc. for that environment. At the minute the only options I can think of are:
- Build an AMI per environment per role (production web server, prod. app server, staging web server, ...). This seems to defeat the purpose of II in having the same image pushed to all environments.
- Build an almost complete AMI and do the final configuration after launching it but before adding it to the ELB. This seems to be close but I feel like there is something missing.
Is there anyway for me to pass a set of parameters to an AMI when it's being created or something else? How are others using immutable infrastructure?
Thanks.