Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ENV vars to utils provider. Update utils provider versions #50

Merged
merged 2 commits into from
Jun 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/backend/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module "backend" {
stack = var.stack
component = var.component
ignore_errors = var.ignore_errors
env = var.env

context = module.this.context
}
6 changes: 6 additions & 0 deletions examples/backend/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion examples/backend/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ terraform {
}
utils = {
source = "cloudposse/utils"
version = ">= 0.17.24"
version = ">= 0.17.26"
}
}
}
2 changes: 1 addition & 1 deletion examples/complete/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ terraform {
}
utils = {
source = "cloudposse/utils"
version = ">= 0.17.24"
version = ">= 0.17.26"
}
}
}
11 changes: 11 additions & 0 deletions examples/remote-state/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ module "remote_state_using_stack" {
val2 = "default-value"
}

env = {
ATMOS_CLI_CONFIG_PATH = path.module
}

context = module.this.context
}
Expand All @@ -22,6 +25,10 @@ module "remote_state_using_context" {
environment = "ue2"
stage = "dev"

env = {
ATMOS_CLI_CONFIG_PATH = path.module
}

context = module.this.context
}

Expand All @@ -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
}
2 changes: 1 addition & 1 deletion examples/remote-state/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ terraform {
}
utils = {
source = "cloudposse/utils"
version = ">= 0.17.24"
version = ">= 0.17.26"
}
}
}
2 changes: 2 additions & 0 deletions examples/spacelift/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
6 changes: 6 additions & 0 deletions examples/spacelift/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion examples/spacelift/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ terraform {
}
utils = {
source = "cloudposse/utils"
version = ">= 0.17.24"
version = ">= 0.17.26"
}
}
}
2 changes: 1 addition & 1 deletion examples/stack/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ terraform {
}
utils = {
source = "cloudposse/utils"
version = ">= 0.17.24"
version = ">= 0.17.26"
}
}
}
2 changes: 1 addition & 1 deletion examples/stacks/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ terraform {
}
utils = {
source = "cloudposse/utils"
version = ">= 0.17.24"
version = ">= 0.17.26"
}
}
}
1 change: 1 addition & 0 deletions modules/backend/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 6 additions & 0 deletions modules/backend/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion modules/backend/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ terraform {
}
utils = {
source = "cloudposse/utils"
version = ">= 0.17.24"
version = ">= 0.17.26"
}
}
}
2 changes: 1 addition & 1 deletion modules/env/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ terraform {
}
utils = {
source = "cloudposse/utils"
version = ">= 0.17.24"
version = ">= 0.17.26"
}
}
}
1 change: 1 addition & 0 deletions modules/remote-state/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 6 additions & 0 deletions modules/remote-state/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion modules/remote-state/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ terraform {
}
utils = {
source = "cloudposse/utils"
version = ">= 0.17.24"
version = ">= 0.17.26"
}
}
}
2 changes: 1 addition & 1 deletion modules/settings/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ terraform {
}
utils = {
source = "cloudposse/utils"
version = ">= 0.17.24"
version = ">= 0.17.26"
}
}
}
1 change: 1 addition & 0 deletions modules/spacelift/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 6 additions & 0 deletions modules/spacelift/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion modules/spacelift/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ terraform {
}
utils = {
source = "cloudposse/utils"
version = ">= 0.17.24"
version = ">= 0.17.26"
}
}
}
2 changes: 1 addition & 1 deletion modules/vars/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ terraform {
}
utils = {
source = "cloudposse/utils"
version = ">= 0.17.24"
version = ">= 0.17.26"
}
}
}