This is really interesting. I'm a big user of remote state but the S3 bucket and DynamoDB table are shared between lots of components so they're created as a set of minimal bootstrap resources in another project. There's then a wrapper tool which delivers the values wherever Terraform is invoked.
I use workspaces to manage different environments rather than different sets of resources.
Always very keen to see how other people organise their Terraform. How do you find this method? Any drawbacks?
My professional interests are cloud and big data technologies, machine learning, and software development. I like to read source code and research papers to understand how stuff works.
Pronoun: He
Thank you for your comment! Would you mind sharing the wrapper tool? Is it open source? The method shown in this post only works if you are using the DynamoDB table and S3 bucket exclusively, I guess. When sharing the remote state resources I assume you specify a different S3 key in every project and create a new DynamoDB table for each project centrally?
I personally found the workspaces and symbolic links pretty awkward to use and I'd go with committing the local state to version control. I wanted to give it a try though and thought it's worth sharing :)
The wrapper code is open but it's not well documented enough or supported outside the organisation in which it's used just yet for it to be properly open-source: github.com/mergermarket/cdflow
You're welcome to take a look and marvel at the lack of warranty.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is really interesting. I'm a big user of remote state but the S3 bucket and DynamoDB table are shared between lots of components so they're created as a set of minimal bootstrap resources in another project. There's then a wrapper tool which delivers the values wherever Terraform is invoked.
I use workspaces to manage different environments rather than different sets of resources.
Always very keen to see how other people organise their Terraform. How do you find this method? Any drawbacks?
Hi Graham,
Thank you for your comment! Would you mind sharing the wrapper tool? Is it open source? The method shown in this post only works if you are using the DynamoDB table and S3 bucket exclusively, I guess. When sharing the remote state resources I assume you specify a different S3 key in every project and create a new DynamoDB table for each project centrally?
I personally found the workspaces and symbolic links pretty awkward to use and I'd go with committing the local state to version control. I wanted to give it a try though and thought it's worth sharing :)
Hey Frank,
The wrapper code is open but it's not well documented enough or supported outside the organisation in which it's used just yet for it to be properly open-source: github.com/mergermarket/cdflow
You're welcome to take a look and marvel at the lack of warranty.