CodeBleu commented on PR #245:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/245#issuecomment-3410740097

   @Pearl1594 I was actually doing other TF work and still using this PR 
provider code and saw the following that was a concern.  If I revert my 
provider version back, I do not see that replace/destroy
   
   ```
   OpenTofu will perform the following actions:
   
     # cloudstack_kubernetes_cluster.tf-capi-mgmt-1[0] will be created
     + resource "cloudstack_kubernetes_cluster" "tf-capi-mgmt-1" {
         + autoscaling_enabled = false
         + control_nodes_size  = 3
         + description         = "An HA example Kubernetes cluster-TF"
         + id                  = (known after apply)
         + ip_address          = (known after apply)
         + keypair             = "ace-g2lt"
         + kubernetes_version  = "1.28.4"
         + max_size            = 5
         + min_size            = 1
         + name                = "tf-capi-mgmt-1"
         + network_id          = "b01e0a11-45a7-4ade-9040-f050f15e4521"
         + noderootdisksize    = 8
         + service_offering    = "ACE 2 vCPU 4GB Ram - c0 - local"
         + size                = 1
         + state               = "Running"
         + zone                = "us-west-0b"
       }
   
     # cloudstack_kubernetes_cluster.tf-k8s must be replaced
   -/+ resource "cloudstack_kubernetes_cluster" "tf-k8s" {
         - account             = "n8widgets" -> null # forces replacement
         - domain_id           = "5b3f11f0-ef3b-4c0d-9960-c41527bf73a4" -> null 
# forces replacement
         - etcd_nodes_size     = 0 -> null
         ~ id                  = "512e47c5-5b74-4ed5-9c1a-309e77f0e9e7" -> 
(known after apply)
         ~ ip_address          = "1.1.1.1" -> (known after apply)
           name                = "tf-k8s-cluster"
           # (13 unchanged attributes hidden)
       }
   
   Plan: 2 to add, 0 to change, 1 to destroy.
   ╷
   │ Warning: Argument is deprecated
   │
   │   with cloudstack_network_acl_rule.net-acl-rules,
   │   on net-acl.tf line 34, in resource "cloudstack_network_acl_rule" 
"net-acl-rules":
   │   34:     ports        = ["22"]
   │
   │ Use 'port' instead. The 'ports' field is deprecated and will be removed in 
a future version.
   │
   │ (and one more similar warning elsewhere)
   ```
   
   I went ahead to change it from `ports` -> `port` and get the following:
   ```
   OpenTofu will perform the following actions:
   
     # cloudstack_kubernetes_cluster.tf-capi-mgmt-1[0] will be created
     + resource "cloudstack_kubernetes_cluster" "tf-capi-mgmt-1" {
         + autoscaling_enabled = false
         + control_nodes_size  = 3
         + description         = "An HA example Kubernetes cluster-TF"
         + id                  = (known after apply)
         + ip_address          = (known after apply)
         + keypair             = "ace-g2lt"
         + kubernetes_version  = "1.28.4"
         + max_size            = 5
         + min_size            = 1
         + name                = "tf-capi-mgmt-1"
         + network_id          = "b01e0a11-45a7-4ade-9040-f050f15e4521"
         + noderootdisksize    = 8
         + service_offering    = "ACE 2 vCPU 4GB Ram - c0 - local"
         + size                = 1
         + state               = "Running"
         + zone                = "us-west-0b"
       }
   
     # cloudstack_kubernetes_cluster.tf-k8s must be replaced
   -/+ resource "cloudstack_kubernetes_cluster" "tf-k8s" {
         - account             = "n8widgets" -> null # forces replacement
         - domain_id           = "5b3f11f0-ef3b-4c0d-9960-c41527bf73a4" -> null 
# forces replacement
         - etcd_nodes_size     = 0 -> null
         ~ id                  = "512e47c5-5b74-4ed5-9c1a-309e77f0e9e7" -> 
(known after apply)
         ~ ip_address          = "1.1.1.1" -> (known after apply)
           name                = "tf-k8s-cluster"
           # (13 unchanged attributes hidden)
       }
   
     # cloudstack_network_acl_rule.net-acl-rules will be updated in-place
     ~ resource "cloudstack_network_acl_rule" "net-acl-rules" {
           id          = "8590d921-9972-4a71-9d28-e4b5616faed2"
           # (3 unchanged attributes hidden)
   
         ~ rule {
             + port         = "22"
             ~ ports        = [
                 - "22",
               ]
               # (8 unchanged attributes hidden)
           }
   
           # (1 unchanged block hidden)
       }
   
   Plan: 2 to add, 1 to change, 1 to destroy.
   ```
   
   I would not assume the ACL rule updates should not impact other things like 
this


-- 
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