VMware Cloud Community
andreaspa
Hot Shot
Hot Shot

Terraform and edge gateways

Hi,

Has anyone got any idea how to get the assigned external IP address of an edge gateway deployed with Terraform?

The reason for asking is that I'm trying to automate a workflow for adding new customers, and I'd like to add some standard DNAT/SNAT-rules in the edge, but I need the creation of the edge gateway to somehow provide me with the assigned IP address.

0 Kudos
2 Replies
davidr78
Enthusiast
Enthusiast

Hi, have a look here: vCloudDirector: vcd_edgegateway - Terraform by HashiCorp

You can pull the external ip into a datasource such as external_ip (used in the example above) and then you can continue to use this reference in the rest of your script.

0 Kudos
andreaspa
Hot Shot
Hot Shot

Thanks, this seems to be a new feature in the 2.5 release of the provider, so it seems usefull.

I did also end up in creating a feature request on the provider at github: Feature Request: Return assigned IP of default edge gateway network when creating/updating · Issue #...

0 Kudos