Some clients will want to build/publish all artifacts used, while most will want to use what is released from upstream.
ATM all the lifecycled stuff is in a single module, though that would not be useful to a client project. It would be better to break up specific functionality into separate modules, or leave some of the resources in the root of the example
We already have an asg module, but there are going to be issues with the initial_lifecycle_hook block. TF 0.12.x would address that. For now, we might want to just have two asg modules, merging them after we update the codebase to support 0.12.x
Separate the cloud init from the ASG it is applied to, those should be de-coupled, as we will run different init on a client
The IAM resources should be separated from the ASG itself
Using cloudwatch here might be useful for debugging the example, but makes the code less reusable, so I would drop that.
Overall, an example should provide guidance on what is needed, but also help reduce the amount of copy/paste - eg, grab these modules and you are good. ATM there is too much that we would need to change when applying to a client project, but the updates noted above ought to help clear that up.
We want the example to primarily focus on what is required to run lifecycled.
It's not necessary now, but just as a heads up, I'll want to squash down the commits (can be more than 1 commit, but should be a clear logical flow without the sausage making)..
It would also be great to add to this PR, some example output or screenshots that confirm the lifecycle hooks are functional.
As a first pass, getting an example working, this looks great!
Reviewing in detail, I would recommend the following updates:
asg
module, but there are going to be issues with theinitial_lifecycle_hook
block. TF 0.12.x would address that. For now, we might want to just have twoasg
modules, merging them after we update the codebase to support0.12.x
It's not necessary now, but just as a heads up, I'll want to squash down the commits (can be more than 1 commit, but should be a clear logical flow without the sausage making)..
It would also be great to add to this PR, some example output or screenshots that confirm the lifecycle hooks are functional.