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

provider/azurerm azurerm_subnet should have its gateway IP as an exported attribute #9519

Closed
wendorf opened this issue Oct 21, 2016 · 6 comments

Comments

@wendorf
Copy link
Contributor

wendorf commented Oct 21, 2016

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)

  • azurerm_subnet

Expected Behavior

The resource knows its own gateway IP

Actual Behavior

The resource does not know its gateway IP

@pmcatominey
Copy link
Contributor

Hey @wendorf,

I'm not sure that the subnet is the right resource to expose the Gateway IP as not all subnets will have a Gateway deployed. The IP should instead be exported by the gateway resource which is currently in progress: #9255.

@wendorf
Copy link
Contributor Author

wendorf commented Jan 28, 2017

@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.

@pmcatominey
Copy link
Contributor

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.

@DevOpsFu
Copy link
Contributor

@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?

@wendorf
Copy link
Contributor Author

wendorf commented Feb 20, 2017

@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 /networks/[type=manual]/subnets/*/gateway key.

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.

@ghost
Copy link

ghost commented Apr 10, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants