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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for adding/removing subnet delegation after the subnet is created. #9270
Comments
Thanks for opening this issue. Seems this feature has been implemented in subnet resource. I assume you have to add/remove delegation block from subnet resource to implement it. Below is the example. Adding delegation:
Removing delegation:
|
@neil-yechenwei Sorry, I did not make myself clear. Current design is hard to do abstraction. For example, I cannot make a VPC module without setting the delegation or exposing the subnets to users. Updated the original post. |
Another use-case for this is, which applies in our environment, is where the subnet is already created and provided to us. We don't want to import the subnet into state and just want to be able to manage (create/remove/change) the subnet delegation, |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I am in a situation where there is a policy that denies the creation of subnets without a network security group, this means I have to create subnets as part of a Currently I am resorting to hackery such as
Having a provider native way to achieve this would be much nicer. |
Community Note
Description
The delegation can be added or removed via Terraform at the moment, but it is tied with azurerm_subnet resource. I cannot work on the delegation without touching the code for azurerm_subnet.
New or Affected Resource(s)
azurerm_subnet (AFFECTED)
azurerm_subnet_delegation (NEW)
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: