-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use wrapper module to work around upstream issue
- Loading branch information
Showing
2 changed files
with
78 additions
and
67 deletions.
There are no files selected for viewing
68 changes: 1 addition & 67 deletions
68
common/configuration/tests/non_string_values/test_object.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
common/configuration/tests/non_string_values/wrapper/main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
terraform { | ||
experiments = [module_variable_optional_attrs] | ||
} | ||
|
||
variable "test_configuration" { | ||
type = map(object({ | ||
test_string = optional(string) | ||
test_list_string = optional(list(string)) | ||
test_map_string = optional(map(string)) | ||
test_list_object = optional(list(object({ | ||
key = string | ||
}))) | ||
test_object = optional(object({ | ||
key = string | ||
})) | ||
})) | ||
description = "Map with per workspace module configuration." | ||
default = { | ||
apps = { | ||
test_string = "from_apps" | ||
|
||
test_list_string = [ | ||
"from_apps" | ||
] | ||
|
||
test_map_string = { | ||
key = "from_apps" | ||
} | ||
|
||
test_list_object = [{ | ||
key = "from_apps" | ||
}] | ||
|
||
test_object = { | ||
key = "from_apps" | ||
} | ||
} | ||
|
||
ops = { | ||
test_string = "from_ops" | ||
|
||
test_list_string = [ | ||
"from_ops" | ||
] | ||
|
||
test_map_string = { | ||
key = "from_ops" | ||
} | ||
|
||
test_list_object = [{ | ||
key = "from_ops" | ||
}] | ||
|
||
test_object = { | ||
key = "from_ops" | ||
} | ||
} | ||
|
||
loc = { | ||
test_list_object = [{ | ||
key = "from_loc" | ||
}] | ||
} | ||
} | ||
} | ||
|
||
module "mut_object" { | ||
source = "../../.." | ||
|
||
configuration = var.test_configuration | ||
|
||
base_key = "apps" | ||
} | ||
|
||
output "merged" { | ||
value = module.mut_object.merged | ||
} |