Comments (6)
@rtomlinson-latacora this sounds like maybe you're initializing the state backend, but then not importing the state. Please note this workflow is different from every other terraform module invocation. We have documented the process here: https://github.com/cloudposse/terraform-aws-tfstate-backend#usage and we've scripted it here: https://github.com/cloudposse/terraform-root-modules/blob/master/aws/tfstate-backend/scripts/init.sh
Basically, the process is you provision the backends using terraform but without remote state. Then you re-run terraform init
with backends configured and it will prompt to import the backend state to S3.
from terraform-aws-tfstate-backend.
@osterman If I'm understanding this correctly, the point of the script is to make the backend resources part of state. That is effectively what the second terraform init
is doing. All resources that you later add, will also be a part of this state. You have one state file which has the backend resources plus anything else you add to your deployments. Thank you for your time btw
from terraform-aws-tfstate-backend.
That's sounds correct. One backend can be shared by multiple projects. Just use different key prefixes (e.g. us-west-2/vpc/terraform.tfstate
). We recommend using one bucket per AWS account. Also, for true terraform-HA don't even share the bucket across regions.
from terraform-aws-tfstate-backend.
Okay, I think I'm sorta understanding how you would namespace the other backends. I'll just do a little experiment to confirm. Since you're storing the state file that manages the dynamodb and bucket for the backend itself in said bucket, you'd obviously run into problems when trying to delete the backend. And since deleting the backend shouldn't need to occur often I'm assuming that this is just a management cost that you'd have to deal with in the event that you actually need to do something with the backend.
from terraform-aws-tfstate-backend.
@rtomlinson-latacora here's the process of destroying the bucket: https://github.com/cloudposse/terraform-root-modules/blob/master/aws/tfstate-backend/scripts/destroy.sh
from terraform-aws-tfstate-backend.
@rtomlinson-latacora thanks for reporting your issues with the coldstart process and destruction. If you have further issues, please let us know! I'm going to close this issue for now.
from terraform-aws-tfstate-backend.
Related Issues (20)
- Dependency Dashboard
- darwin_arm64 still not supported HOT 5
- KMS encryption HOT 1
- Logging bucket generates a name with a duplicate HOT 4
- Using this module without without specifying an external context label module generates invalid resource names
- Upgrading from <0.33.1 to >=0.33.1 requires state move for bucket HOT 2
- terraform-provider-aws v4.0 incompatibility HOT 2
- Allow making changes to the s3 bucket policy
- terraform apply completes successfully with "Warning: Argument is deprecated" HOT 5
- Unable to be used with terraform workspaces HOT 2
- Reimplement with "cloudposse/terraform-aws-s3-bucket" to standardize parameters/features
- Add delete_protection to DynamoDB table HOT 3
- No compatibility with terraform v1.6 HOT 1
- Add lifecycle configuration to delete objects under a certain size to remove destroyed states
- Bucket replication managed by this module HOT 4
- Feature Request - Allow a parameter for the name of DynamoDB table HOT 1
- Error creating S3 bucket ... the region 'us-east-1' is wrong; expecting 'eu-central-1' HOT 3
- Remove the `read_capacity` and `write_capacity` from lifecycle change ignore
- Add support for multiple terraform backend config files HOT 6
- DynamoDB label attributes inconsistent due to null label module HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-aws-tfstate-backend.