GitLab-managed Terraform/OpenTofu state
to-be-continuous/terraform component
Migrate from gitlab opentofu component
to to-be-continuous/terraform:
- Create MR
- Change CI component in
.gitlab-ci.yml - Change remote state name from
defaulttoproductionin i.e.main.tf - Copy remote state file from
defaulttoproduction:- Run
tf init -migrate-state, answeryes(a copy of the remote statedefaultwill be pushed to the remote statproduction
- Run
- Push MR
- Change CI component in
- After merging, manually remove the remote state file
default