Difference between revisions of "Terraform backends"
Jump to navigation
Jump to search
↑ https://www.terraform.io/docs/language/settings/backends/s3.html#key
Line 4: | Line 4: | ||
* [[Terraform S3 backend]] | * [[Terraform S3 backend]] | ||
* [[Terraform S3 backend: dynamodb table]] | * [[Terraform S3 backend: dynamodb table]] | ||
− | |||
* [[local]] | * [[local]] | ||
* [[consul]] | * [[consul]] | ||
Line 10: | Line 9: | ||
* [[COS]]: [[Tencent Cloud Object Storage (COS)]] | * [[COS]]: [[Tencent Cloud Object Storage (COS)]] | ||
* [[Kubernetes]] | * [[Kubernetes]] | ||
− | |||
* [[pg]] ([[PostgreSQL]]) | * [[pg]] ([[PostgreSQL]]) | ||
* [[gcs]] | * [[gcs]] | ||
Line 18: | Line 16: | ||
* [[etcd]] | * [[etcd]] | ||
* [[Manta]] | * [[Manta]] | ||
+ | * [[swift]] | ||
https://www.terraform.io/language/settings/backends/s3 | https://www.terraform.io/language/settings/backends/s3 |
Revision as of 17:47, 12 September 2022
https://www.terraform.io/language/settings/backends
- Terraform S3 backend
- Terraform S3 backend: dynamodb table
- local
- consul
- remote
- COS: Tencent Cloud Object Storage (COS)
- Kubernetes
- pg (PostgreSQL)
- gcs
Deprecated:
https://www.terraform.io/language/settings/backends/s3
S3 Example with DynamoDB
terraform { backend "s3" { bucket = "your-terraform-states" key[1] = "terraform.tfstate" region = "us-west-2" dynamodb_table = "your-terraform-states" profile = "your-profile" workspace_key_prefix = "your-workspace" } }
Example using variables:
terraform { backend "s3" { bucket = "$(aws-backend-bucket)" key = "yourkeyname/$(AWS_ACCOUNTNAME)/$(AWS_MYREGION)" region = "$(AWS_MYREGION)" dynamodb_table = "$(aws-backend-dynamoDbTable)" encrypt = true role_arn = "$(aws-cicd-role-arn)" } }
Related terms
terraform workspace
terraform state [pull | push]
AWS_PROFILE
profile
https://www.terraform.io/docs/language/settings/backends/s3.html#profileaws s3api create-bucket
andaws s3 mb
- Terraform providers:
provider.tf
- Terraform Associate: Handle backend authentication methods
local
backend- Workspaces and locking
- Remote state backends to manage Terraform state
Terraform has been successfully initialized!
See also
- Terraform backends:
S3
,Terraform S3 backend: dynamodb table
,GCS, remote
- Terraform, OpenTofu, Terrakube.org, Installation, Terraform AWS, Terraform GCP, Terraform commands, Terraform Cloud, Terraform Enterprise (TFE), HCL, HIL, meta-arguments, providers, modules, resource, provisioners, data sources, backends: remote backends, examples, configuration files, state files, variables, types, Terraform Registry, conditionals:
depends_on
, functions, Blocks, dynamic blocks, errors, Terragrunt, Terraformer, Terratest, Terraform certifications, Terraform map type, Terraform Associate, Terraform: list type,TF_VAR_, TF_LOG
, Terraform provider versioning, Terraform Style Conventions, Required version, Terraform plugin, Terraform Named Values, tags, Changelog,tfsec, tflint
, Operators, Expressions:for, splat
, Debugging, Namespaces, Terraform Landing Zones, CDKTF, Atmos
Advertising: