kiranchavala commented on issue #145: URL: https://github.com/apache/cloudstack-terraform-provider/issues/145#issuecomment-2646959508
@tomaspekarovic ACL rules are tied to a specific vpc network in cloudstack. An existing acl for a vpc cannot be used for another vpc. Please try the following terraform code create a acl rule and attach it to a vpc ``` resource "cloudstack_vpc" "tomas_vpc" { name = "tomas_vpc" display_text = "Tomas VPC" cidr = "10.20.0.0/16" vpc_offering = "Default VPC Offering" zone = "83bddd7d-3f56-4085-a709-f9694b9e8608" } resource "cloudstack_network_acl" "default" { name = "test-acl" vpc_id = cloudstack_vpc.tomas_vpc.id } resource "cloudstack_network_acl_rule" "default" { acl_id = cloudstack_network_acl.default.id rule { action = "allow" cidr_list = ["10.0.0.0/8"] protocol = "tcp" ports = ["80", "1000-2000"] traffic_type = "ingress" } } resource "cloudstack_network" "tomas_network" { name = "tomas_network" display_text = "Tomasova siet" network_offering = "DefaultIsolatedNetworkOfferingForVpcNetworks" zone = "83bddd7d-3f56-4085-a709-f9694b9e8608" vpc_id = cloudstack_vpc.tomas_vpc.id cidr = "10.20.1.0/24" gateway = "10.20.1.1" acl_id = cloudstack_network_acl.default.id } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org