Pearl1594 opened a new pull request, #239:
URL: https://github.com/apache/cloudstack-terraform-provider/pull/239

   This PR attempts to deprecate the usage of "ports" with the introduction of 
"rule_number" support in the 0.6.0 release.
   Caution has been taken to allow backward compatibility for delete operation. 
However creation of new config and update is disallowed if `ports` is used. 
Users will be prompted to migrate to use `port` parameter.
   
   ```
   terraform {
     required_providers {
       cloudstack = {
         source = "hashicorp.com/dev/cloudstack"
       }
     }
   }
   provider "cloudstack" {
     api_url    = "http://xx.xx.xx.xx:8080/client/api";
     api_key    = 
"LIN6rqXuaJwMPfGYFh13qDwYz5VNNz1J2J6qIOWcd3oLQOq0WtD4CwRundBL6rzXToa3lQOC_vKjI3nkHtiD8Q"
     secret_key = 
"R6QPwRUz09TVXBjXNwZk7grTjcPtsFRphH6xhN1oPvnc12YUk296t4KHytg8zRLczDA0X5NsLVi4d8rfMMx3yg"
     timeout    = 1800  # 30 minutes for template registration
   }
   
   resource "cloudstack_vpc" "default" {
     name         = "test-vpc"
     cidr         = "10.0.0.0/16"
     vpc_offering = "Default VPC offering"
     zone         = "ref-trl-9522-k-Mol8-kiran-chavala"
   }
   
   output "vpc_id" {
      value= cloudstack_vpc.default.id
   }
   
   
   resource "cloudstack_network_acl" "default" {
     name   = "test-acl"
     vpc_id = cloudstack_vpc.default.id
   }
   
   output "acl_id" {
      value= cloudstack_network_acl.default.id   
   }
   
   resource "cloudstack_network_acl_rule" "default" {
     acl_id = cloudstack_network_acl.default.id
   
     rule {
       rule_number = 16
       action       = "allow"
       cidr_list    = ["10.0.0.0/24"]
       protocol     = "tcp"
       port       = "80-81"
       traffic_type = "ingress"
       description  = "testing terraform ACL issue" 
     }
   
     rule {
       rule_number  = 17
       action       = "allow"
       cidr_list    = ["10.0.0.0/24"]
       protocol     = "tcp"
       port        = "2222-2223"
       traffic_type = "ingress"
       description  = "testing terraform ACL issue - 1" 
     }
   
     rule {
       rule_number  = 18
       action       = "allow"
       cidr_list    = ["10.0.0.0/24"]
       protocol     = "tcp"
       port        = "8080"
       traffic_type = "ingress"
       description  = "testing terraform ACL issue - 2"
     }
   
     rule {
       rule_number  = 19
       action       = "allow"
       cidr_list    = ["10.0.0.0/24"]
       protocol     = "tcp"
       port        = "8081"
       traffic_type = "ingress"
       description  = "testing terraform ACL issue - 3"
     }
   }
   
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to