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

Updating an application raises an error #55

Open
basile-d opened this issue Jan 19, 2024 · 1 comment
Open

Updating an application raises an error #55

basile-d opened this issue Jan 19, 2024 · 1 comment

Comments

@basile-d
Copy link

Hello,

we encountered an error while trying to update an app using terraform:

Terraform Version

➜  ~ terraform -v
Terraform v1.6.6
on darwin_arm64

Affected Resource(s)

  • clevercloud_nodejs
  • clevercloud_java_war
  • (probably all the application resources)

Terraform Configuration Files

resource "clevercloud_java_war" "myapp_java" {
    name = "tf-myapp"
    region = "par"
    min_instance_count = 1
    max_instance_count = 2
    smallest_flavor = "XS"
    biggest_flavor = "M"
}

Expected Behavior

when I change biggest_flavor = "M" for biggest_flavor = "S" it should update the vertical scaling settings of the application

Actual Behavior

it raises an error

➜  terraform apply
clevercloud_java_war.myapp_java: Refreshing state... [id=XXXXXXX]

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # clevercloud_java_war.myapp_java will be updated in-place
  ~ resource "clevercloud_java_war" "myapp_java" {
      ~ biggest_flavor     = "M" -> "XS"
      ~ deploy_url         = "git+ssh://[email protected]/XXXXX.git" -> (known after apply)
      ~ id                 = "XXXXXX" -> (known after apply)
        name               = "tf-myapp"
      ~ vhost              = "XXXXXX.cleverapps.io" -> (known after apply)
        # (4 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

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

clevercloud_java_war.myapp_java: Modifying... [id=XXXXXX]
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to clevercloud_java_war.myapp_java, provider "provider[\"registry.terraform.io/clevercloud/clevercloud\"]" produced an
│ unexpected new value: .biggest_flavor: was cty.StringVal("XS"), but now cty.StringVal("M").
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵

Thanks

@miton18
Copy link
Collaborator

miton18 commented Jan 19, 2024

Yes, you are right, the update is not implemented for all resources at all
https://github.com/CleverCloud/terraform-provider-clevercloud/blob/master/pkg/resources/java/resource_java_crud.go#L177

I will take time to handle it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants