-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
provider/azurerm azurerm_subnet should have its gateway IP as an exported attribute #9519
Comments
@pmcatominey I believe the term "gateway" is a little overloaded in Azure. I'm not referring to a virtual network gateway (which is used to connect your Azure subnet to your personal on-prem network), but the default subnet gateway which I believe is always present in an Azure subnet. |
Hi @wendorf, I've just checked the API after creating a Network via the Portal and only a single subnet is present, the Gateway Subnet was not. Even in cases where the GatewaySubnet is present, there is no data from the API which indicates the gateway address. I still believe that the best place to expose this is in the virtual network gateway resource itself. |
@wendorf I see what you're getting at here, but I've never come across a use case for knowing that particular piece of information about a subnet in Azure. Could you elaborate? |
@DevOpsFu I use BOSH, a (most) IaaS-agnostic software deployment and VM management tool. To use it with Azure, it needs to know the specifics of your subnet, including the gateway address. You can see that in the example manifest here if you look at the I'd like to programmatically configure my BOSH environment without needing to know the implementation details of Azure, which is why having the gateway IP as an attribute would be valuable. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
According to the [Azure virtual network documentation], the gateway IP address of a subnet is predictable (e.g. if the subnet is 10.0.3.0/24, the gateway IP is 10.0.3.1). It is as simple as
cidrhost(azurerm_subnet.my_subnet.address_prefix, 1)
.It would be nice if this information were part of the built-in exported attributes for azurerm_subnets so that users of the resource can easily determine what the Gateway is without needing to do calculations.
Terraform Version
0.7.7
Affected Resource(s)
Expected Behavior
The resource knows its own gateway IP
Actual Behavior
The resource does not know its gateway IP
The text was updated successfully, but these errors were encountered: