From 60b4a1ec488b32fca34b675ee91bcb8c24b41fac Mon Sep 17 00:00:00 2001 From: Bartek Grzybowski Date: Mon, 14 Sep 2020 12:40:45 +0200 Subject: Rewrite terragrunt files into canonical format so they pass validation Change-Id: I3e748f0027429c2ee384467d9d61c1a87cce8fc3 Issue-ID: INT-1713 Signed-off-by: Bartek Grzybowski --- terragrunt/openlab/RegionOne/stage/env.hcl | 8 ++++---- terragrunt/openlab/account.hcl | 10 +++++----- terragrunt/openlab/terragrunt.hcl | 28 ++++++++++++++-------------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/terragrunt/openlab/RegionOne/stage/env.hcl b/terragrunt/openlab/RegionOne/stage/env.hcl index b3208c8..cb68eb2 100644 --- a/terragrunt/openlab/RegionOne/stage/env.hcl +++ b/terragrunt/openlab/RegionOne/stage/env.hcl @@ -1,14 +1,14 @@ # Set common variables for the environment. This is automatically pulled in in the root terragrunt.hcl configuration to # feed forward to the child modules. locals { - environment = "" # name of the environment you use. e.g stage, prod or qa - network = "" # name of the network to connect with the Internet + environment = "" # name of the environment you use. e.g stage, prod or qa + network = "" # name of the network to connect with the Internet # Rancher and Kubernetes # To access a VM, 'ssh -i ssh_private_key_path kubernetes_user@one-of-the-external-ips' # a key pair for accessing VMs - ssh_public_key = "" # OpenSSH formated string is required - ssh_private_key_path = "" # e.g ~/.ssh/id_rsa + ssh_public_key = "" # OpenSSH formated string is required + ssh_private_key_path = "" # e.g ~/.ssh/id_rsa kubernetes_version = "v1.15.11-rancher1-2" kubernetes_user = "ubuntu" diff --git a/terragrunt/openlab/account.hcl b/terragrunt/openlab/account.hcl index 19d1b8c..27c5cf0 100644 --- a/terragrunt/openlab/account.hcl +++ b/terragrunt/openlab/account.hcl @@ -2,10 +2,10 @@ # terragrunt.hcl configuration. # For Openstack, please fill in the values below locals { - user_name = "${get_env("user_name", "")}" # Expose environmental variables for your account - password = "${get_env("password", "")}" - project_id = "${get_env("project_id", "")}" - auth_url = "${get_env("auth_url","")}" - backend = "" # Remote state backend. gcs for google or s3 for Amazon + user_name = "${get_env("user_name", "")}" # Expose environmental variables for your account + password = "${get_env("password", "")}" + project_id = "${get_env("project_id", "")}" + auth_url = "${get_env("auth_url", "")}" + backend = "" # Remote state backend. gcs for google or s3 for Amazon backend_state = "" # GCP storage bucket or AWS S3 } diff --git a/terragrunt/openlab/terragrunt.hcl b/terragrunt/openlab/terragrunt.hcl index 7c55ea3..c97b495 100644 --- a/terragrunt/openlab/terragrunt.hcl +++ b/terragrunt/openlab/terragrunt.hcl @@ -9,14 +9,14 @@ locals { environment_vars = read_terragrunt_config(find_in_parent_folders("env.hcl")) # Extract the variables we need for easy access - user_name = local.account_vars.locals.user_name - password = local.account_vars.locals.password - auth_url = local.account_vars.locals.auth_url - project_id = local.account_vars.locals.project_id - backend = local.account_vars.locals.backend + user_name = local.account_vars.locals.user_name + password = local.account_vars.locals.password + auth_url = local.account_vars.locals.auth_url + project_id = local.account_vars.locals.project_id + backend = local.account_vars.locals.backend backend_state = local.account_vars.locals.backend_state - region = local.region_vars.locals.region - environment = local.environment_vars.locals.environment + region = local.region_vars.locals.region + environment = local.environment_vars.locals.environment } remote_state { @@ -28,16 +28,16 @@ remote_state { } config = { - bucket = "${local.backend_state}" - prefix = "${path_relative_to_include()}/terraform.tfstate" + bucket = "${local.backend_state}" + prefix = "${path_relative_to_include()}/terraform.tfstate" } } # test/terragrunt.hcl generate "provider" { - path = "provider.tf" + path = "provider.tf" if_exists = "overwrite_terragrunt" - contents = <