CodeBleu commented on PR #245:
URL:
https://github.com/apache/cloudstack-terraform-provider/pull/245#issuecomment-3412462590
> @CodeBleu could you please share you terraform config , so that I can test
it out
My biggest concern is why does upgrading the provider cause it to want to
delete/replace my k8s cluster?
```
# 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)
}
```
My terraform code is a lot more than this, but this is the parts that are
being impacted when I test.
k8s.tf
```
resource "cloudstack_kubernetes_cluster" "tf-k8s" {
name = "tf-k8s-cluster"
zone = "us-west-0b"
kubernetes_version = "1.27.3"
service_offering = "ACE 2 vCPU 4GB Ram - c0 - local"
size = 1
autoscaling_enabled = true
min_size = 1
max_size = 5
control_nodes_size = 1
description = "An example Kubernetes cluster-TF"
keypair = "ace-g2lt"
network_id = cloudstack_network.capi-mgmt-net-1.id
state = "Running"
depends_on = [
cloudstack_network.capi-mgmt-net-1
]
}
```
acl.tf
```
resource "cloudstack_network_acl_rule" "net-acl-rules" {
acl_id = cloudstack_network_acl.net_acl.id
rule {
action = "allow"
cidr_list = ["10.0.0.0/16"]
protocol = "tcp"
ports = ["22"] < - original
# port = "22" < - testing with new
traffic_type = "ingress"
}
rule {
action = "allow"
cidr_list = ["10.0.0.0/16"]
protocol = "icmp"
traffic_type = "ingress"
}
}
```
--
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]