Ask the community

NPA Terraform - failing to loop over multiple maps

New Contributor II

I'm trying to build a module (currently just playing with locals directly in which will build an instance of a private app. for each DC and tie it to the local publishers in that DC.


That part is working, but I am failing to also tie the protocols fields correctly in and iterate over those as well, as the attached code will fail if either of the protocol ports fields are empty (in the case where an app only has tcp or udp ports defined).


@sshiflett ?

1 Reply 1

Hello @elawaetz

It's been some time since I tested this but I believe if you pass the protocol type as part of the call (TCP or UDP) then it expects a valid entry.  You may need to build logic that if there is no entry for the TCP or UDP protocol to not pass it at all. I will do a bit of digging but have not tested with our newer provider versions. 

Sam Shiflett
Netskope Solution Architect - North America

In order to view this content, you will need to sign in to your account. Simply click the "Sign In" button below

Sign In