Skip to content

Commit be030f4

Browse files
Add ENV vars to utils provider. Update utils provider versions (#50)
* Add ENV vars to `utils` provider. Update `utils` provider versions * Auto Format Co-authored-by: cloudpossebot <11232728+cloudpossebot@users.noreply.github.com>
1 parent 325d23c commit be030f4

23 files changed

Lines changed: 59 additions & 12 deletions

File tree

examples/backend/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module "backend" {
44
stack = var.stack
55
component = var.component
66
ignore_errors = var.ignore_errors
7+
env = var.env
78

89
context = module.this.context
910
}

examples/backend/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,9 @@ variable "ignore_errors" {
1414
description = "Set to true to ignore errors from the 'utils' provider (if the component is not found in the stack)"
1515
default = false
1616
}
17+
18+
variable "env" {
19+
type = map(string)
20+
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"
21+
default = null
22+
}

examples/backend/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ terraform {
1212
}
1313
utils = {
1414
source = "cloudposse/utils"
15-
version = ">= 0.17.24"
15+
version = ">= 0.17.26"
1616
}
1717
}
1818
}

examples/complete/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ terraform {
1212
}
1313
utils = {
1414
source = "cloudposse/utils"
15-
version = ">= 0.17.24"
15+
version = ">= 0.17.26"
1616
}
1717
}
1818
}

examples/remote-state/main.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ module "remote_state_using_stack" {
1010
val2 = "default-value"
1111
}
1212

13+
env = {
14+
ATMOS_CLI_CONFIG_PATH = path.module
15+
}
1316

1417
context = module.this.context
1518
}
@@ -22,6 +25,10 @@ module "remote_state_using_context" {
2225
environment = "ue2"
2326
stage = "dev"
2427

28+
env = {
29+
ATMOS_CLI_CONFIG_PATH = path.module
30+
}
31+
2532
context = module.this.context
2633
}
2734

@@ -41,5 +48,9 @@ module "remote_state_using_context_ignore_errors" {
4148
default_output = "default-value"
4249
}
4350

51+
env = {
52+
ATMOS_CLI_CONFIG_PATH = path.module
53+
}
54+
4455
context = module.this.context
4556
}

examples/remote-state/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ terraform {
1212
}
1313
utils = {
1414
source = "cloudposse/utils"
15-
version = ">= 0.17.24"
15+
version = ">= 0.17.26"
1616
}
1717
}
1818
}

examples/spacelift/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ module "spacelift" {
66
component_deps_processing_enabled = var.component_deps_processing_enabled
77
imports_processing_enabled = var.imports_processing_enabled
88

9+
env = var.env
10+
911
context = module.this.context
1012
}

examples/spacelift/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,9 @@ variable "stack_config_path_template" {
2121
description = "Stack config path template"
2222
default = "stacks/%s.yaml"
2323
}
24+
25+
variable "env" {
26+
type = map(string)
27+
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"
28+
default = null
29+
}

examples/spacelift/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ terraform {
1212
}
1313
utils = {
1414
source = "cloudposse/utils"
15-
version = ">= 0.17.24"
15+
version = ">= 0.17.26"
1616
}
1717
}
1818
}

examples/stack/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ terraform {
1212
}
1313
utils = {
1414
source = "cloudposse/utils"
15-
version = ">= 0.17.24"
15+
version = ">= 0.17.26"
1616
}
1717
}
1818
}

0 commit comments

Comments
 (0)