diff --git a/infrastructure/modules/storage/remote_state.tf b/infrastructure/modules/storage/remote_state.tf index b9da03c..28f826e 100644 --- a/infrastructure/modules/storage/remote_state.tf +++ b/infrastructure/modules/storage/remote_state.tf @@ -8,9 +8,9 @@ locals { data "terraform_remote_state" "environment" { backend = "http" config = { - address="https://gitlab.com/api/v4/projects/22967934/terraform/state/production-environment" - lock_address="https://gitlab.com/api/v4/projects/22967934/terraform/state/production-environment/lock" - unlock_address="https://gitlab.com/api/v4/projects/22967934/terraform/state/production-environment/lock" + address="https://gitlab.com/api/v4/projects/${local.project}/terraform/state/${local.environment}-environment" + lock_address="https://gitlab.com/api/v4/projects/${local.project}/terraform/state/${local.environment}-environment/lock" + unlock_address="https://gitlab.com/api/v4/projects/${local.project}/terraform/state/${local.environment}-environment/lock" username=local.username password=local.password lock_method="POST"