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: | ||
− | [[Terraform]] [[S3]] | + | [[Terraform]] [[S3]] backend. |
* https://www.terraform.io/docs/language/settings/backends/s3.html | * https://www.terraform.io/docs/language/settings/backends/s3.html | ||
− | + | == 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 15: | ||
* <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 | ||
− | * <code> | + | * <code>key</code>: path to the [[state file]] inside the [[S3 Bucket]]. https://www.terraform.io/docs/language/settings/backends/s3.html#key |
Successfully configured the backend "s3"! Terraform will automatically | Successfully configured the backend "s3"! Terraform will automatically | ||
Line 47: | Line 22: | ||
== 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 == | ||
Line 58: | Line 29: | ||
* [[Bucket versioning]] | * [[Bucket versioning]] | ||
* [[Remote state backends to manage Terraform state]] | * [[Remote state backends to manage Terraform state]] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == |
Advertising: