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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

oci_objectstorage_preauthrequest incorrectly deletes & replaces the resource every time #2092

Open
dch opened this issue Apr 11, 2024 · 1 comment
Labels
bug In-Progress Terraform Team is working on the reproduce & fix

Comments

@dch
Copy link

dch commented Apr 11, 2024

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 "me too" comments, 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

Terraform Version and Provider Version

Terraform v1.7.5-dev on freebsd_amd64
+ provider registry.terraform.io/oracle/oci v5.36.0

Affected Resource(s)

  • oci_objectstorage_preauthrequest

Terraform Configuration Files

resource "oci_objectstorage_preauthrequest" "pkg" {
    access_type = "AnyObjectRead"
    bucket_listing_action = "ListObjects"
    bucket = "pkg"
    name = "pkg_repo_readonly"
    namespace = var.tenancy_namespace
    time_expires = "2038-01-01T12:00:00Z"
}

Debug Output

$ terraform apply
...
  # oci_objectstorage_preauthrequest.pkg must be replaced
-/+ resource "oci_objectstorage_preauthrequest" "pkg" {
      ~ access_uri            = "/p/Iny9Mn_WoSmYcZvSMRVhU-ZMljp4TdYkxLHAbcqNSAQZo4YCenX60Cl_orgioox_/n/axvxsnomswgi/b/pkg/o/" -> (known after apply)
      + bucket_listing_action = "ListObjects" # forces replacement
      ~ full_path             = "https://axvxsnomswgi.objectstorage.eu-amsterdam-1.oci.customer-oci.com/p/.../n/axvxsnomswgi/b/pkg/o/" -> (known after apply)
      ~ id                    = "n/axvxsnomswgi/b/pkg/p/..." -> (known after apply)
        name                  = "pkg_repo_readonly"
      + object                = (known after apply)
      + object_name           = (known after apply)
      ~ par_id                = "..." -> (known after apply)
      ~ time_created          = "2024-04-11 21:25:50.045 +0000 UTC" -> (known after apply)
        # (4 unchanged attributes hidden)
    }
  • full TF_LOG available privately

Expected Behavior

a previously created PAR should not be deleted.

Actual Behavior

The PARs are deleted, and we need to re-distribute these on every single terraform run.

Steps to Reproduce

  • Make a bucket
  • add a PAR With "Object List" capability
  • run terraform apply and watch it replace every single time

References

This has been the case for a couple of years at least: #1570

@dch dch added the bug label Apr 11, 2024
@tf-oci-pub tf-oci-pub added the In-Progress Terraform Team is working on the reproduce & fix label Apr 12, 2024
@tf-oci-pub
Copy link
Member

Thank you for reporting the issue. We have raised an internal ticket to track this. Our service engineers will get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug In-Progress Terraform Team is working on the reproduce & fix
Projects
None yet
Development

No branches or pull requests

2 participants