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 | ||
− | == Basic S3 | + | == Basic S3 example in [[backend.tf]] == |
terraform { | terraform { | ||
backend "s3" { | backend "s3" { | ||
[[bucket]] = "[[aws s3 ls|your-terraform-states]]" | [[bucket]] = "[[aws s3 ls|your-terraform-states]]" | ||
[[Terraform S3 backend|key]]<ref>https://www.terraform.io/docs/language/settings/backends/s3.html#key</ref> = "[[terraform.tfstate]]" | [[Terraform S3 backend|key]]<ref>https://www.terraform.io/docs/language/settings/backends/s3.html#key</ref> = "[[terraform.tfstate]]" | ||
− | [[ | + | [[profile]] = "your-profile" |
} | } | ||
} | } | ||
Line 17: | Line 17: | ||
[[key]] = "path/to/my/key" | [[key]] = "path/to/my/key" | ||
[[region]] = "us-east-1" | [[region]] = "us-east-1" | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
} | } | ||
Line 40: | Line 33: | ||
== 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 55: | Line 44: | ||
* <code>[[aws s3 ls]]</code> | * <code>[[aws s3 ls]]</code> | ||
* <code>[[provider.tf]]</code> | * <code>[[provider.tf]]</code> | ||
− | |||
== See also == | == See also == |
Advertising: