diff --git a/examples/backend/main.tf b/examples/backend/main.tf index e9078bb..e23286b 100644 --- a/examples/backend/main.tf +++ b/examples/backend/main.tf @@ -4,6 +4,7 @@ module "backend" { stack = var.stack component = var.component ignore_errors = var.ignore_errors + env = var.env context = module.this.context } diff --git a/examples/backend/variables.tf b/examples/backend/variables.tf index 7cee275..102c281 100644 --- a/examples/backend/variables.tf +++ b/examples/backend/variables.tf @@ -14,3 +14,9 @@ variable "ignore_errors" { description = "Set to true to ignore errors from the 'utils' provider (if the component is not found in the stack)" default = false } + +variable "env" { + type = map(string) + description = "Map of ENV vars in the format `key=value`. These ENV vars will be set in the `utils` provider before executing the data source" + default = null +} diff --git a/examples/backend/versions.tf b/examples/backend/versions.tf index 3583638..0502f5b 100644 --- a/examples/backend/versions.tf +++ b/examples/backend/versions.tf @@ -12,7 +12,7 @@ terraform { } utils = { source = "cloudposse/utils" - version = ">= 0.17.24" + version = ">= 0.17.26" } } } diff --git a/examples/complete/versions.tf b/examples/complete/versions.tf index 3583638..0502f5b 100644 --- a/examples/complete/versions.tf +++ b/examples/complete/versions.tf @@ -12,7 +12,7 @@ terraform { } utils = { source = "cloudposse/utils" - version = ">= 0.17.24" + version = ">= 0.17.26" } } } diff --git a/examples/remote-state/main.tf b/examples/remote-state/main.tf index e44a40c..c1487c3 100644 --- a/examples/remote-state/main.tf +++ b/examples/remote-state/main.tf @@ -10,6 +10,9 @@ module "remote_state_using_stack" { val2 = "default-value" } + env = { + ATMOS_CLI_CONFIG_PATH = path.module + } context = module.this.context } @@ -22,6 +25,10 @@ module "remote_state_using_context" { environment = "ue2" stage = "dev" + env = { + ATMOS_CLI_CONFIG_PATH = path.module + } + context = module.this.context } @@ -41,5 +48,9 @@ module "remote_state_using_context_ignore_errors" { default_output = "default-value" } + env = { + ATMOS_CLI_CONFIG_PATH = path.module + } + context = module.this.context } diff --git a/examples/remote-state/versions.tf b/examples/remote-state/versions.tf index 3583638..0502f5b 100644 --- a/examples/remote-state/versions.tf +++ b/examples/remote-state/versions.tf @@ -12,7 +12,7 @@ terraform { } utils = { source = "cloudposse/utils" - version = ">= 0.17.24" + version = ">= 0.17.26" } } } diff --git a/examples/spacelift/main.tf b/examples/spacelift/main.tf index df102b5..17d3fd9 100644 --- a/examples/spacelift/main.tf +++ b/examples/spacelift/main.tf @@ -6,5 +6,7 @@ module "spacelift" { component_deps_processing_enabled = var.component_deps_processing_enabled imports_processing_enabled = var.imports_processing_enabled + env = var.env + context = module.this.context } diff --git a/examples/spacelift/variables.tf b/examples/spacelift/variables.tf index 1dc3354..a1c8ad1 100644 --- a/examples/spacelift/variables.tf +++ b/examples/spacelift/variables.tf @@ -21,3 +21,9 @@ variable "stack_config_path_template" { description = "Stack config path template" default = "stacks/%s.yaml" } + +variable "env" { + type = map(string) + description = "Map of ENV vars in the format `key=value`. These ENV vars will be set in the `utils` provider before executing the data source" + default = null +} diff --git a/examples/spacelift/versions.tf b/examples/spacelift/versions.tf index 3583638..0502f5b 100644 --- a/examples/spacelift/versions.tf +++ b/examples/spacelift/versions.tf @@ -12,7 +12,7 @@ terraform { } utils = { source = "cloudposse/utils" - version = ">= 0.17.24" + version = ">= 0.17.26" } } } diff --git a/examples/stack/versions.tf b/examples/stack/versions.tf index 3583638..0502f5b 100644 --- a/examples/stack/versions.tf +++ b/examples/stack/versions.tf @@ -12,7 +12,7 @@ terraform { } utils = { source = "cloudposse/utils" - version = ">= 0.17.24" + version = ">= 0.17.26" } } } diff --git a/examples/stacks/versions.tf b/examples/stacks/versions.tf index 3583638..0502f5b 100644 --- a/examples/stacks/versions.tf +++ b/examples/stacks/versions.tf @@ -12,7 +12,7 @@ terraform { } utils = { source = "cloudposse/utils" - version = ">= 0.17.24" + version = ">= 0.17.26" } } } diff --git a/modules/backend/main.tf b/modules/backend/main.tf index d29baa6..f29bcc6 100644 --- a/modules/backend/main.tf +++ b/modules/backend/main.tf @@ -5,6 +5,7 @@ data "utils_component_config" "config" { environment = module.always.environment stage = module.always.stage ignore_errors = var.ignore_errors + env = var.env } locals { diff --git a/modules/backend/variables.tf b/modules/backend/variables.tf index 7cee275..102c281 100644 --- a/modules/backend/variables.tf +++ b/modules/backend/variables.tf @@ -14,3 +14,9 @@ variable "ignore_errors" { description = "Set to true to ignore errors from the 'utils' provider (if the component is not found in the stack)" default = false } + +variable "env" { + type = map(string) + description = "Map of ENV vars in the format `key=value`. These ENV vars will be set in the `utils` provider before executing the data source" + default = null +} diff --git a/modules/backend/versions.tf b/modules/backend/versions.tf index 3583638..0502f5b 100644 --- a/modules/backend/versions.tf +++ b/modules/backend/versions.tf @@ -12,7 +12,7 @@ terraform { } utils = { source = "cloudposse/utils" - version = ">= 0.17.24" + version = ">= 0.17.26" } } } diff --git a/modules/env/versions.tf b/modules/env/versions.tf index 3583638..0502f5b 100644 --- a/modules/env/versions.tf +++ b/modules/env/versions.tf @@ -12,7 +12,7 @@ terraform { } utils = { source = "cloudposse/utils" - version = ">= 0.17.24" + version = ">= 0.17.26" } } } diff --git a/modules/remote-state/main.tf b/modules/remote-state/main.tf index aef060a..5d61840 100644 --- a/modules/remote-state/main.tf +++ b/modules/remote-state/main.tf @@ -5,6 +5,7 @@ data "utils_component_config" "config" { environment = module.always.environment stage = module.always.stage ignore_errors = var.ignore_errors + env = var.env } locals { diff --git a/modules/remote-state/variables.tf b/modules/remote-state/variables.tf index 8f6c453..611568c 100644 --- a/modules/remote-state/variables.tf +++ b/modules/remote-state/variables.tf @@ -38,3 +38,9 @@ variable "ignore_errors" { description = "Set to true to ignore errors from the 'utils' provider (if the component is not found in the stack)" default = false } + +variable "env" { + type = map(string) + description = "Map of ENV vars in the format `key=value`. These ENV vars will be set in the `utils` provider before executing the data source" + default = null +} diff --git a/modules/remote-state/versions.tf b/modules/remote-state/versions.tf index 3583638..0502f5b 100644 --- a/modules/remote-state/versions.tf +++ b/modules/remote-state/versions.tf @@ -12,7 +12,7 @@ terraform { } utils = { source = "cloudposse/utils" - version = ">= 0.17.24" + version = ">= 0.17.26" } } } diff --git a/modules/settings/versions.tf b/modules/settings/versions.tf index 3583638..0502f5b 100644 --- a/modules/settings/versions.tf +++ b/modules/settings/versions.tf @@ -12,7 +12,7 @@ terraform { } utils = { source = "cloudposse/utils" - version = ">= 0.17.24" + version = ">= 0.17.26" } } } diff --git a/modules/spacelift/main.tf b/modules/spacelift/main.tf index 6ac5162..36f81ea 100644 --- a/modules/spacelift/main.tf +++ b/modules/spacelift/main.tf @@ -3,6 +3,7 @@ data "utils_spacelift_stack_config" "spacelift_stacks" { process_component_deps = var.component_deps_processing_enabled process_imports = var.imports_processing_enabled stack_config_path_template = var.stack_config_path_template + env = var.env } locals { diff --git a/modules/spacelift/variables.tf b/modules/spacelift/variables.tf index 1dc3354..a1c8ad1 100644 --- a/modules/spacelift/variables.tf +++ b/modules/spacelift/variables.tf @@ -21,3 +21,9 @@ variable "stack_config_path_template" { description = "Stack config path template" default = "stacks/%s.yaml" } + +variable "env" { + type = map(string) + description = "Map of ENV vars in the format `key=value`. These ENV vars will be set in the `utils` provider before executing the data source" + default = null +} diff --git a/modules/spacelift/versions.tf b/modules/spacelift/versions.tf index 3583638..0502f5b 100644 --- a/modules/spacelift/versions.tf +++ b/modules/spacelift/versions.tf @@ -12,7 +12,7 @@ terraform { } utils = { source = "cloudposse/utils" - version = ">= 0.17.24" + version = ">= 0.17.26" } } } diff --git a/modules/vars/versions.tf b/modules/vars/versions.tf index 3583638..0502f5b 100644 --- a/modules/vars/versions.tf +++ b/modules/vars/versions.tf @@ -12,7 +12,7 @@ terraform { } utils = { source = "cloudposse/utils" - version = ">= 0.17.24" + version = ">= 0.17.26" } } }