Skip to content

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 default to production in i.e. main.tf
    • Copy remote state file from default to production:
      • Run tf init -migrate-state, answer yes (a copy of the remote state default will be pushed to the remote stat production
    • Push MR
  • After merging, manually remove the remote state file default