-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Cannot link to virtual_network subnet from virtual_network_gateway as it cannot resolve the subnet name, and cannot link subnet to security group #25483
Comments
hey @bizmate In this instance the You should be able to workaround this by using the Since the underlying validation message will be fixed by #25484, I'm going to close this issue for the moment - but if switching to use the Data Source as described above as the interpolated value doesn't fix this then please let us know and we can take another look. Thanks! |
hi @tombuildsstuff thank you very much for the reply. I could use the azurerm_subnet and indeed this is how I initially coded it but as I mentioned this resource does not allow to link to network security group so if i create a virtual network without subnets and define them in azurerm_subnet I fail to see a way to link the subnet to the security group. Even in the security group i cannot see a way to link it to the subnet. I think the solutions would be to :
I dont want to transform this into a stackoverflow question so I hope my contribution actually help in the quality of the provider. |
@bizmate (as mentioned above) the |
@tombuildsstuff I missed the data source suggestion, it worked, thank you... for some reason the gateway does not deploy with the definition above ... not sure what i am doing wrong
I will keep looking |
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. |
Is there an existing issue for this?
Community Note
Terraform Version
1.7.5
AzureRM Provider Version
2.99.0
Affected Resource(s)/Data Source(s)
azurerm_virtual_network_gateway
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Should be able to reference the right subnet, inside a virtual network, from a virtual network gateway.
Also if the above is not possible extend the subnet resource to allow to specify a security group.
Actual Behaviour
Even if the subnet is named correctly as "GatewaySubnet" the response is suggesting differently.
Steps to Reproduce
terraform apply
Important Factoids
No response
References
subnet
virtual network gateway
The text was updated successfully, but these errors were encountered: