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

Spaces Bucket import doesn't contain all the fields. #1039

Open
fuadnafiz98 opened this issue Oct 2, 2023 · 1 comment
Open

Spaces Bucket import doesn't contain all the fields. #1039

fuadnafiz98 opened this issue Oct 2, 2023 · 1 comment
Labels

Comments

@fuadnafiz98
Copy link

Bug Report


Describe the bug

While I am using the terraform import command to import a digitalocean spaces, It can successfully imported, but few fields are missing.

This can be noticed when I run terraform plan. This shows that it should update in place where in fact it should show no changes needed.

resource "digitalocean_spaces_bucket" "test" {
      + acl                = "private"
      + force_destroy      = false
        id                 = "test"
        name               = "test"
        # (4 unchanged attributes hidden)
        # (1 unchanged block hidden)
    }

Affected Resource(s)

Expected Behavior

It should plan out the import without any changes.

Actual Behavior

It shows that it would update in place.

resource "digitalocean_spaces_bucket" "test" {
      + acl                = "private"
      + force_destroy      = false
        id                 = "test"
        name               = "test"
        # (4 unchanged attributes hidden)
        # (1 unchanged block hidden)
    }

Steps to Reproduce

  1. terraform import digitalocean_spaces_bucket.foobar region,name
  2. terraform plan.
    Terraform Configuration Files

Terraform version

Debug Output

Panic Output

Additional context

Important Factoids

References

@fuadnafiz98 fuadnafiz98 added the bug label Oct 2, 2023
@andrewsomething
Copy link
Member

Hi @fuadnafiz98,

Thanks for raising this.

Unfortunately value of acl is not able to be set on import. You must set it in your configuration file to prevent the diff or run terraform apply if you want to accept the default. It is set using "canned-ACLs," either private or public-read. The S3 compatible API does not provide an endpoint that returns that value.

I do think we can make the force_destroy situation better. As it is an local attribute that defaults to false, we can set that at import and only show a diff if it is set to true in the config.

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

No branches or pull requests

2 participants