terraform init -reconfigure
terraform init -migrate-state
- Mesma coisa que o migrate-state, mas não pede confirmação
terraform init -force-copy
- Arquivos que o terraform mudaria
- Alterações que o terraform fez no seu código
- Formatação é valida? só funciona depois do terraform init
- Ver o plano que o terraform pretende fazer
- Aplicar terraform no provider
terraform apply --destroy
terraform apply -auto-approve
terraform plan -out plan.out
terraform apply -out plan.out -destroy
export TF_VAR_container_name=container-envvar
terraform output -raw {storage_account_id}
terraform state mv aws_s3_bucket.bucket_1 aws_s3_bucket.bucket_um
terraform state pull > state.tfstate
terraform state push --force state.tfstate
terraform state replace-provider registry.terraform.io/hashicorp/aws-v2 registry.terraform.io/hashicorp/aws
terraform state show aws_s3_bucket.bucket_1
terraform state rm aws_s3_bucket.bucket_1
terraform import aws_s3_bucket.bucket_um alexgalhardo-terraform-commands-1
terraform force-unlock ID_STATE_LOCK
terraform workspace --help
terraform workspace new dev
terraform workspace select prod
terraform workspace delete dev