Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform problem with replacing existing ressources (AS config) #2753

Open
CHS-OTC opened this issue Nov 29, 2024 · 1 comment
Open

Terraform problem with replacing existing ressources (AS config) #2753

CHS-OTC opened this issue Nov 29, 2024 · 1 comment
Labels
otc-issue Blocked by OTC issues

Comments

@CHS-OTC
Copy link

CHS-OTC commented Nov 29, 2024

we ran into an issue regarding a Terraform Deployment of an AS Group in:

Terraform Provider: opentelekomcloud/opentelekomcloud v1.36.25

The initial deployment works fine, AS Groups and their related ECS instances get created.

So far so good. The problems occcur as soon as we change the AS Configuration (Terraform Ressource opentelekomcloud_as_configuration_v1). The Terraform Plan indicates it will replace the AS Configuration and then fails doing so alerting that it is used by the AS Group.

-----BEGIN LOGOUTPUT TERRAFORM APPLY
Resource actions are indicated with the following symbols:
~ update in-place
-/+ destroy and then create replacement
Terraform will perform the following actions:

opentelekomcloud_as_configuration_v1.primary_group_config must be replaced

-/+ resource "opentelekomcloud_as_configuration_v1" "primary_group_config" {
~ id = "XXXXXX" -> (known after apply)
~ region = "eu-de" -> (known after apply)
# (1 unchanged attribute hidden)
~ instance_config {
- metadata = {} -> null
~ user_data = "XXXXX" -> "XXXXXXX" # forces replacement
# (4 unchanged attributes hidden)
# (2 unchanged blocks hidden)
}
}

opentelekomcloud_as_group_v1.primary_group will be updated in-place

~ resource "opentelekomcloud_as_group_v1" "primary_group" {
id = "XXXXXX"
~ scaling_configuration_id = "XXXXXXXXXXXXX" -> (known after apply)
tags = {}
# (17 unchanged attributes hidden)
# (7 unchanged blocks hidden)
}
Plan: 1 to add, 1 to change, 1 to destroy.
opentelekomcloud_as_configuration_v1.primary_group_config: Destroying... [id=XXXXXXXXXXXXX]

│ Error: can not delete the configuration "XXXXXX", it is used by AS groups [XXXXXXXXXXXXXXX]
-----END LOGOUTPUT TERRAFORM APPLY

@anton-sidelnikov
Copy link
Member

Hi @CHS-OTC the api does not support update (https://docs.otc.t-systems.com/auto-scaling/api-ref/apis/as_configurations/index.html), the best would be to contact [email protected] as this is OTC request and not TF issue.

@anton-sidelnikov anton-sidelnikov added the otc-issue Blocked by OTC issues label Dec 2, 2024
@anton-sidelnikov anton-sidelnikov changed the title Terraform problem with replacing existing ressources Terraform problem with replacing existing ressources (AS config) Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
otc-issue Blocked by OTC issues
Projects
None yet
Development

No branches or pull requests

2 participants