What I am intending to do:
Add an AWS SSM parameter containing a range of IPs to be used in terraform
What I’ve done:
- Created a StringList parameter in the SSM Parameter store called “range_of_ips”, the value in that parameter is written like this: “192.168.15.0/24”, “172.17.2.0/22” and so on.
- Added the following to terraform (in my data.tf file):
data "aws_ssm_parameter" "range_of_ips" {
name = "range_of_ips"
type = "StringList"
Then used this later in the terraform code like this (in my locals.tf file):
my_ip_ranges = [data.aws_ssm_parameter.range_of_ips]
I am getting the following error during validation:
type = “StringList”
│
│ Can’t configure a value for “type”: its value will be decided automatically based on the result of applying this configuration.
this is the latest error as I have tried variations of StringList, “StringList”, and adding ARN to the data resource… different errors every time.
What is the correct way to do this? The documentation isn’t clear. Is it not possible?
IS-Labber is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.