To string from list in Terraform
Sometimes, like for example when you're trying to crowbar a WAF together you want to pass a list.
Example of list
Converting it to a List
This will now render it like the below
"origin.asn == 16276 || origin.asn == 9009 || origin.asn == 13213 || origin.asn == 15395 || origin.asn == 15510 || origin.asn == 20738 || origin.asn == 20860 || origin.asn == 21321 || origin.asn == 25369 || origin.asn == 29302 || origin.asn == 29550 || origin.asn == 35017 || origin.asn == 35662 || origin.asn == 39326 || origin.asn == 42831 || origin.asn == 51159 || origin.asn == 57230 || origin.asn == 58305 || origin.asn == 59764 || origin.asn == 60011 || origin.asn == 60068 || origin.asn == 61317 || origin.asn == 62217 || origin.asn == 62240 || origin.asn == 199883 || origin.asn == 200039 || origin.asn == 57773 || origin.asn == 198047"
However, it's still as [""]
- So to consume it as a string, we call it like the below
Want to make this site better? Open a PR or help fund hosting costs