When I add delete_default_rules = true to openstack_networking_secgroup_v2 and run Terraform it try to replace the security group and update the networking port in-place.
Terraform Version
Terraform v1.5.4
on darwin_arm64
Affected Resource(s)
Please list the resources as a list, for example:
openstack_networking_port_v2
openstack_networking_secgroup_v2
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Create a networking port with a security group attached without delete_default_rules = true.
Add delete_default_rules = true to the security group
Run TF plan and see that the security group will be replaced and the networking port will be updated in-place.
Run TF apply and wait for the timeout
detach the security group from the port with for example the cli openstack port set $PORT_ID --no-security-group
Run TF apply again and it should work now.
Conclusion:
It seems that in this specific case the security_group needs to be detached from the networking_port in the first place and afterwards it can be replaced.
1045 has the same issue for the relation between subnets and ports. And #1356 for port assigned to a router (openstack_networking_router_interface_v2).
Hi,
When I add
delete_default_rules = true
toopenstack_networking_secgroup_v2
and run Terraform it try to replace the security group and update the networking port in-place.Terraform Version
Affected Resource(s)
Please list the resources as a list, for example:
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
Expected Behavior
The security group will be replaced successfully.
Actual Behavior
The security group runs in a 10 minute timeout.
Steps to Reproduce
delete_default_rules = true
.delete_default_rules = true
to the security groupopenstack port set $PORT_ID --no-security-group
Conclusion:
It seems that in this specific case the security_group needs to be detached from the networking_port in the first place and afterwards it can be replaced.
Important Factoids
References
nothing