Editing Terraform S3 backend
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | |||
− | |||
− | + | * [[S3]] https://www.terraform.io/docs/language/settings/backends/s3.html | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | * [[Remote state backends to manage Terraform state]] | |
− | |||
− | |||
− | |||
− | |||
− | == Example | + | == Example == |
terraform { | terraform { | ||
backend "s3" { | backend "s3" { | ||
[[bucket]] = "your-terraform-states" | [[bucket]] = "your-terraform-states" | ||
− | + | key = "terraform.tfstate" | |
region = "[[us-west-2]]" | region = "[[us-west-2]]" | ||
[[dynamodb_table]] = "your-terraform-states" | [[dynamodb_table]] = "your-terraform-states" | ||
Line 40: | Line 18: | ||
* <code>[[profile]]</code>: https://www.terraform.io/docs/language/settings/backends/s3.html#profile | * <code>[[profile]]</code>: https://www.terraform.io/docs/language/settings/backends/s3.html#profile | ||
− | * | + | * key: |
Successfully configured the backend "s3"! Terraform will automatically | Successfully configured the backend "s3"! Terraform will automatically | ||
Line 47: | Line 25: | ||
== S3 backend errors == | == S3 backend errors == | ||
− | * | + | * [[Error: Backend configuration changed]] |
− | * | + | * [[Error: Failed to get existing workspaces: S3 bucket does not exist.]]: <code>[[aws s3 mb]]</code> |
− | |||
− | |||
− | |||
− | |||
== Related terms == | == Related terms == | ||
* <code>[[terraform init]]</code> | * <code>[[terraform init]]</code> | ||
* [[Bucket versioning]] | * [[Bucket versioning]] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == | ||
− | |||
* {{Terraform backends}} | * {{Terraform backends}} | ||
[[Category:Terraform]] | [[Category:Terraform]] |
Advertising: