kiranchavala commented on PR #213:
URL:
https://github.com/apache/cloudstack-terraform-provider/pull/213#issuecomment-3311949441
@Pearl1594 as discussed, hitting the following exception after
1. Apply the config
2. Add state="Disabled" to the "cloudstack_autoscale_vm_group"
3. Apply the config again
4. Error observed
```
terraform apply
data.cloudstack_counter.existing_cpu_counter: Reading...
cloudstack_ipaddress.lb_public_ip: Refreshing state...
[id=d092551a-dfa2-40e6-97bc-afba2c68b5b1]
cloudstack_autoscale_vm_profile.vm_profile: Refreshing state...
[id=bbb61517-6fe8-492d-a003-e778fc56ca6d]
data.cloudstack_counter.existing_cpu_counter: Read complete after 1s
[id=4b27ead4-8c8b-11f0-b0ae-1e0092000273]
cloudstack_condition.scale_up_condition: Refreshing state...
[id=78f2a0eb-90a7-458b-a241-556b359f0943]
cloudstack_condition.scale_down_condition: Refreshing state...
[id=4f99814f-ff56-491b-a91c-78e2ebb929fe]
cloudstack_loadbalancer_rule.autoscale_lb: Refreshing state...
[id=f635f445-937b-4033-9ca9-d4a6f3e0d667]
cloudstack_firewall.http_firewall: Refreshing state...
[id=d092551a-dfa2-40e6-97bc-afba2c68b5b1]
cloudstack_autoscale_policy.scale_down_policy: Refreshing state...
[id=10eb5462-0829-4eda-b488-e3c5ee6f71d9]
cloudstack_autoscale_policy.scale_up_policy: Refreshing state...
[id=7552547f-ded5-4b99-b7cc-42fd93b7df39]
cloudstack_autoscale_vm_group.vm_group: Refreshing state...
[id=bce38ab6-62d1-4c19-b001-8f1cdc273544]
Note: Objects have changed outside of Terraform
Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:
# cloudstack_loadbalancer_rule.autoscale_lb has changed
~ resource "cloudstack_loadbalancer_rule" "autoscale_lb" {
id = "f635f445-937b-4033-9ca9-d4a6f3e0d667"
+ member_ids = [
+ "9030f9c3-86cc-4bdd-b1b5-15d4fe671422",
]
name = "autoscale-lb-rule"
# (8 unchanged attributes hidden)
}
Unless you have made equivalent changes to your configuration, or ignored
the relevant attributes using ignore_changes, the following plan may include
actions to undo or respond to these changes.
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place
-/+ destroy and then create replacement
Terraform will perform the following actions:
# cloudstack_autoscale_policy.scale_down_policy will be updated in-place
~ resource "cloudstack_autoscale_policy" "scale_down_policy" {
~ condition_ids = [
- "4f99814f-ff56-491b-a91c-78e2ebb929fe",
] -> (known after apply)
id = "10eb5462-0829-4eda-b488-e3c5ee6f71d9"
name = "scale-down"
# (3 unchanged attributes hidden)
}
# cloudstack_autoscale_policy.scale_up_policy will be updated in-place
~ resource "cloudstack_autoscale_policy" "scale_up_policy" {
~ condition_ids = [
- "78f2a0eb-90a7-458b-a241-556b359f0943",
] -> (known after apply)
id = "7552547f-ded5-4b99-b7cc-42fd93b7df39"
name = "scale-up"
# (3 unchanged attributes hidden)
}
# cloudstack_autoscale_vm_group.vm_group must be replaced
-/+ resource "cloudstack_autoscale_vm_group" "vm_group" {
- display = true -> null
~ id = "bce38ab6-62d1-4c19-b001-8f1cdc273544" ->
(known after apply)
- interval = 30 -> null
name = "simple-autoscale-group"
~ state = "enable" -> "disable"
~ vm_profile_id = "bbb61517-6fe8-492d-a003-e778fc56ca6d" ->
(known after apply) # forces replacement
# (6 unchanged attributes hidden)
}
# cloudstack_autoscale_vm_profile.vm_profile must be replaced
-/+ resource "cloudstack_autoscale_vm_profile" "vm_profile" {
~ account_name = "admin" -> "Admin" # forces replacement
~ display = false -> true
~ domain_id = "16f19ba6-8c8b-11f0-b0ae-1e0092000273" ->
"1" # forces replacement
~ id = "bbb61517-6fe8-492d-a003-e778fc56ca6d" ->
(known after apply)
~ metadata = {} -> (known after apply)
~ user_data_details = {
+ "application" = "web-server"
+ "environment" = "autoscale"
}
# (7 unchanged attributes hidden)
}
# cloudstack_condition.scale_down_condition must be replaced
-/+ resource "cloudstack_condition" "scale_down_condition" {
~ domain_id = "16f19ba6-8c8b-11f0-b0ae-1e0092000273" -> "1"
# forces replacement
~ id = "4f99814f-ff56-491b-a91c-78e2ebb929fe" ->
(known after apply)
# (4 unchanged attributes hidden)
}
# cloudstack_condition.scale_up_condition must be replaced
-/+ resource "cloudstack_condition" "scale_up_condition" {
~ domain_id = "16f19ba6-8c8b-11f0-b0ae-1e0092000273" -> "1"
# forces replacement
~ id = "78f2a0eb-90a7-458b-a241-556b359f0943" ->
(known after apply)
# (4 unchanged attributes hidden)
}
# cloudstack_loadbalancer_rule.autoscale_lb will be updated in-place
~ resource "cloudstack_loadbalancer_rule" "autoscale_lb" {
id = "f635f445-937b-4033-9ca9-d4a6f3e0d667"
~ member_ids = [
- "9030f9c3-86cc-4bdd-b1b5-15d4fe671422",
]
name = "autoscale-lb-rule"
# (8 unchanged attributes hidden)
}
Plan: 4 to add, 3 to change, 4 to destroy.
Changes to Outputs:
~ autoscale_group_id = "bce38ab6-62d1-4c19-b001-8f1cdc273544" -> (known
after apply)
+ load_balancer_members = []
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
cloudstack_autoscale_vm_group.vm_group: Destroying...
[id=bce38ab6-62d1-4c19-b001-8f1cdc273544]
cloudstack_autoscale_vm_group.vm_group: Still destroying...
[id=bce38ab6-62d1-4c19-b001-8f1cdc273544, 00m10s elapsed]
cloudstack_autoscale_vm_group.vm_group: Still destroying...
[id=bce38ab6-62d1-4c19-b001-8f1cdc273544, 00m20s elapsed]
cloudstack_autoscale_vm_group.vm_group: Still destroying...
[id=bce38ab6-62d1-4c19-b001-8f1cdc273544, 00m30s elapsed]
cloudstack_autoscale_vm_group.vm_group: Still destroying...
[id=bce38ab6-62d1-4c19-b001-8f1cdc273544, 00m40s elapsed]
cloudstack_autoscale_vm_group.vm_group: Still destroying...
[id=bce38ab6-62d1-4c19-b001-8f1cdc273544, 00m50s elapsed]
cloudstack_autoscale_vm_group.vm_group: Destruction complete after 53s
cloudstack_condition.scale_down_condition: Destroying...
[id=4f99814f-ff56-491b-a91c-78e2ebb929fe]
cloudstack_condition.scale_up_condition: Destroying...
[id=78f2a0eb-90a7-458b-a241-556b359f0943]
cloudstack_autoscale_vm_profile.vm_profile: Destroying...
[id=bbb61517-6fe8-492d-a003-e778fc56ca6d]
cloudstack_loadbalancer_rule.autoscale_lb: Modifying...
[id=f635f445-937b-4033-9ca9-d4a6f3e0d667]
cloudstack_autoscale_vm_profile.vm_profile: Destruction complete after 1s
cloudstack_autoscale_vm_profile.vm_profile: Creating...
cloudstack_autoscale_vm_profile.vm_profile: Creation complete after 2s
[id=80217609-ef5e-4d33-9882-659d21fe906d]
cloudstack_loadbalancer_rule.autoscale_lb: Still modifying...
[id=f635f445-937b-4033-9ca9-d4a6f3e0d667, 00m10s elapsed]
cloudstack_loadbalancer_rule.autoscale_lb: Modifications complete after 13s
[id=f635f445-937b-4033-9ca9-d4a6f3e0d667]
╷
│ Error: Error deleting condition: Undefined error:
{"errorcode":536,"errortext":"Cannot delete Condition when it is in use by one
or more AutoScale Policies."}
│
│
╵
╷
│ Error: Error deleting condition: Undefined error:
{"errorcode":536,"errortext":"Cannot delete Condition when it is in use by one
or more AutoScale Policies."}
```
--
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]