location of terraform tfstate.tf file
Jump to turn (9)
- 1location of terraform tfstate.tf file
- 2where is it stored when using azure pipelne
- 3working directory of your pipeline agent on the machine where the pipeline is ru
- 4/opt/hostedtoolcache/terraform/1.3.9/x64/terraform apply -auto-approve
- 5access build host
- 6trigger: none pool: vmImage: ubuntu-latest variables: backendrg: 'terraform' bac
- 7it's not putting the state file in the backend
- 8rewrite the yaml script to move the state file to the back end
- 9make the apply stage use azure backend storage
- User
location of terraform tfstate.tf file
- Assistant
The location of the
terraform.tfstatefile can be specified by the user in the Terraform configuration file. By default, when you runterraform apply, theterraform.tfstatefile is created in the same directory as the Terraform configuration file.If you want to specify a different location for the
terraform.tfstatefile, you can use the-stateoption when runningterraform applyorterraform plan, like this:bashterraform apply -state=path/to/terraform.tfstateYou can also specify the location of the
terraform.tfstatefile in the Terraform configuration file by adding the following block to the file:lua