zivildienst/infrastructure/modules/storage/remote_state.tf

21 lines
937 B
Terraform
Raw Normal View History

2021-01-19 08:10:28 +00:00
locals {
environment = lookup(jsondecode(file("../../config.json")), "terraform_packer_environment", "")
project = lookup(jsondecode(file("../../secrets.json")), "terraform_gitlab_backend_project", "")
username = lookup(jsondecode(file("../../secrets.json")), "terraform_gitlab_backend_username", "")
password = lookup(jsondecode(file("../../secrets.json")), "terraform_gitlab_backend_password", "")
}
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"
username=local.username
password=local.password
lock_method="POST"
unlock_method="DELETE"
retry_wait_min="5"
}
}