-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
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
Add default_external_network_ip
computed field to resource and data source vcd_edge_gateway
#389
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
The following attributes are exported on this resource: | ||
|
||
* `default_network_ip` (*v2.6+*) - IP address of edge gateway used for default network |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking that it would be useful to show case this new field in one of our examples. It could be here or in some other resource page where EG IP is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added two examples in load balancer virtual server and firewall rule
vcd/datasource_vcd_edgegateway.go
Outdated
@@ -51,6 +51,11 @@ func datasourceVcdEdgeGateway() *schema.Resource { | |||
Computed: true, | |||
Description: "External network to be used as default gateway. Its name must be included in 'external_networks'. An empty value will skip the default gateway", | |||
}, | |||
"default_network_ip": &schema.Schema{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just before merging, let's decide whether it would be helpful to rename default_network_ip
to default_external_network_ip
CC: @dataclouder @vbauzysvmware
default_network_ip
computed field to resource and data source vcd_edge_gateway
default_external_network_ip
computed field to resource and data source vcd_edge_gateway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We decided to go with the longer name for clarity, however we keep the right to revisit it during this release cycle if a wider picture emerges during the upcoming more complex PR - https://github.com/terraform-providers/terraform-provider-vcd/issues/323
The latter will need new related block/field and we will think how to name all of them consistently.
Most probably we have to change default_gateway_network
structure because it must accept subnets and manual IP specification.
This PR adds
default_network_ip
default_external_network_ip
field to resource and data sourcevcd_edge_gateway
which allows to read and use IP address of default gateway interface. It can be very useful in scenarios where this IP is immediately useful in other places (like opening firewalls, running scripts, etc)Closes #308, also puts some groundwork for #323