We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I tried these examples
But they don't actually create StringList of comma-separated values like this
StringList
item1,item2
instead they create a JSON representation of the Terraform list
["item1","item2"]
Before you submit an issue, please perform the following first:
.terraform
rm -rf .terraform/
terraform init
Module version [Required]: latest
Terraform version: >= 1.7.4
Provider version(s): aws 5.68.0
variable "env" { default = "dev" } variable "application" { default = "test" } variable "parameters" { type = map(object({ value = optional(any) values = optional(list(any), []) description = optional(string) allowed_pattern = optional(string) data_type = optional(string) })) default = { values = ["item1","item2"] } } locals { parameters = { for key, value in var.parameters : format("/%s/%s/%s", var.env, var.application, upper(key)) => value } } provider "aws" { region = var.region } module "ssm_parameters" { for_each = merge(local.parameters, var.additional_parameters) source = "terraform-aws-modules/ssm-parameter/aws" name = each.key value = try(tostring(each.value.value), null) values = try(each.value.values, []) description = try(each.value.description, null) allowed_pattern = try(each.value.allowed_pattern, null) data_type = try(each.value.data_type, null) }
Steps to reproduce the behavior:
Not using workspace. .terraform directory was cleared.
["item1", "item2"]
The text was updated successfully, but these errors were encountered:
I'm running into this issue as well, what's the reasoning behind JSON encoding all values when the type is StringList ? This behavior is surprising; according to the AWS documentation, parameters of type StringList should be plain old comma-separated list of values, not JSON: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html#what-is-a-parameter
Sorry, something went wrong.
No branches or pull requests
Description
I tried these examples
But they don't actually create
StringList
of comma-separated values like thisinstead they create a JSON representation of the Terraform list
Before you submit an issue, please perform the following first:
.terraform
directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!):rm -rf .terraform/
terraform init
Versions
Module version [Required]: latest
Terraform version: >= 1.7.4
Provider version(s): aws 5.68.0
Reproduction Code [Required]
Steps to reproduce the behavior:
Not using workspace.
.terraform
directory was cleared.Expected behavior
Actual behavior
Terminal Output Screenshot(s)
Additional context
The text was updated successfully, but these errors were encountered: