Skip to content
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

Data Source: azurerm_virtual_network_gateway - support new property private_ip_address #21432

Merged
merged 3 commits into from
Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ func dataSourceVirtualNetworkGateway() *pluginsdk.Resource {
Computed: true,
},

"private_ip_address": {
Type: pluginsdk.TypeString,
Computed: true,
},

"public_ip_address_id": {
Type: pluginsdk.TypeString,
Computed: true,
Expand Down Expand Up @@ -326,6 +331,10 @@ func flattenVirtualNetworkGatewayDataSourceIPConfigurations(ipConfigs *[]network
}
}

if privateIP := props.PrivateIPAddress; privateIP != nil {
v["private_ip_address"] = *privateIP
}
neil-yechenwei marked this conversation as resolved.
Show resolved Hide resolved

if pip := props.PublicIPAddress; pip != nil {
if id := pip.ID; id != nil {
v["public_ip_address_id"] = *id
Expand Down
2 changes: 2 additions & 0 deletions website/docs/d/virtual_network_gateway.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ The `ip_configuration` block supports:
the associated subnet is named `GatewaySubnet`. Therefore, each virtual
network can contain at most a single Virtual Network Gateway.

* `private_ip_address` - The Private IP Address associated with the Virtual Network Gateway.

* `public_ip_address_id` - The ID of the Public IP Address associated
with the Virtual Network Gateway.

Expand Down