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

bucket: Provider produced inconsistent final plan #2469

Closed
tormath1 opened this issue Mar 21, 2024 · 1 comment · Fixed by #2472
Closed

bucket: Provider produced inconsistent final plan #2469

tormath1 opened this issue Mar 21, 2024 · 1 comment · Fixed by #2472
Labels
bug instance Instance issues, bugs and feature requests priority:highest Bugs filled by customers, security issues

Comments

@tormath1
Copy link

tormath1 commented Mar 21, 2024

Terraform Version

$ terraform version
Terraform v1.7.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/template v2.2.0
+ provider registry.terraform.io/poseidon/ct v0.11.0
+ provider registry.terraform.io/scaleway/scaleway v2.38.2

Affected Resource(s)

  • scaleway_object_bucket
  • scaleway_instance_snapshot

Terraform Configuration Files

It's almost the same code as in the documentation.

resource "scaleway_object_bucket" "bucket" {
  name = "snapshot-flatcar-import"
}

resource "scaleway_object" "qcow" {
  bucket = scaleway_object_bucket.bucket.name
  key    = "flatcar_production_scaleway_image.qcow2"
  file   = var.flatcar_file
}

resource "scaleway_instance_snapshot" "snapshot" {
  type = "unified"
  import {
    bucket = scaleway_object.qcow.bucket
    key    = scaleway_object.qcow.key
  }
}

resource "scaleway_instance_volume" "from_snapshot" {
  from_snapshot_id = scaleway_instance_snapshot.snapshot.id
  type             = "b_ssd"
}

Debug Output

╷
│ Error: Provider produced inconsistent final plan
│
│ When expanding the plan for scaleway_instance_snapshot.snapshot to include new values learned so far during
│ apply, provider "registry.terraform.io/scaleway/scaleway" produced an invalid new value for
│ .import[0].bucket: was cty.StringVal("snapshot-flatcar-import"), but now
│ cty.StringVal("fr-par/snapshot-flatcar-import").
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Expected Behavior

The bucket name is consistent.

Actual Behavior

The bucket name is not consistent so TF is lost.

Steps to Reproduce

  1. terraform apply

References

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@Codelax Codelax added bug object Object storage issues, bugs and feature requests instance Instance issues, bugs and feature requests priority:highest Bugs filled by customers, security issues and removed object Object storage issues, bugs and feature requests labels Mar 21, 2024
@tormath1
Copy link
Author

@remyleone @Codelax perfect, that works like a charm. Thanks for your reactivity!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug instance Instance issues, bugs and feature requests priority:highest Bugs filled by customers, security issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants