Philip Nelson [2017-06-24 07:52 -0500] :
> Using terraform in separate "hackish" skeletons as you call it is
> really a fully supported technique. We call this layers, and you pull
> information from one layer into another via a data
> "terraform_remote_state" resource. I'd be curious if others have
> unique ways to solve your particular question, there are likely other
> options. With a layered approach though, in a terraform run you'd
> create the parts that will linger on and use output blocks to output
> the arn of the ebs volumes. in your temporary machine layer, you'd
> use data "terraform_remote_state", retrieve the arn of the previously
> created output and continue on your way.
> On Sat, Jun 24, 2017 at 7:02 AM, 'Niklaas Baudet von Gersdorff' via
> Terraform <[1]
terrafo...@googlegroups.com> wrote:
David Maze [2017-06-24 09:36 -0700] :
> I'll second this: the last big Terraform project I set up had some
> persistent data that we really didn't want to accidentally destroy
> and we split it up in exactly this way (the network was in one
> Terraform project, the databases in a second, the application in a
> third) so that if we ran "terraform destroy" on the blue copy of the
> blue/green application pair there was zero risk of taking the
> database with it. The higher layers found the lower layers via
> terraform_remote_state.
Rob Coward [2017-06-25 00:34 -0700] :
> This is exactly how we structure our terraform deploys. One project
> to deploy the network layer infrastructure, another to create
> long-lived ebs volumes and a third to create instances mounting the
> ebs volumes, referencing back to the terraform remote state for
> previous stacks to dynamically get details about the vpc_id,
> subnet_id, ebs_volume_id etc.
> On Saturday, 24 June 2017 17:36:56 UTC+1, David Maze wrote:
I see. Thanks a lot for your input and the heads-up! Your
feedback is very helpful.
I'll take a closer look on "layers", "output blocks", and
"terraform_remote_state". Glad to see that my initial thought
leads towards the right direction although I didn't see that. :-)
Niklaas