diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 01fa9e4be..bd3f24b15 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -77,7 +77,7 @@ jobs: - name: Terraform deploy run: | pushd ./terraform/tests/ - TF_VAR_model_name="test" terraform apply -target null_resource.simple_deployment_juju_wait_deployment -auto-approve + terraform apply -var "model=test" -target null_resource.simple_deployment_juju_wait_deployment -auto-approve popd lib-check: diff --git a/terraform/tests/simple_deployment.tf b/terraform/tests/simple_deployment.tf index fff1e98a1..c01f6f03e 100644 --- a/terraform/tests/simple_deployment.tf +++ b/terraform/tests/simple_deployment.tf @@ -1,7 +1,7 @@ module "mongodb" { source = "../" app_name = var.app_name - juju_model_name = var.juju_model_name + model = var.model units = var.simple_mongodb_units config = { profile = "testing" @@ -14,6 +14,7 @@ module "mongodb" { resource "null_resource" "simple_deployment_juju_wait_deployment" { provisioner "local-exec" { command = <<-EOT + juju-wait -v --model ${var.model} EOT } } diff --git a/terraform/tests/variables.tf b/terraform/tests/variables.tf index 17c3af34a..ccdbe2a41 100644 --- a/terraform/tests/variables.tf +++ b/terraform/tests/variables.tf @@ -1,4 +1,4 @@ -variable "juju_model_name" { +variable "model" { description = "Model name" type = string }