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 not found on apply ACL #510

Closed
vinicius73 opened this issue Oct 26, 2020 · 3 comments · Fixed by #512
Closed

Spaces Bucket not found on apply ACL #510

vinicius73 opened this issue Oct 26, 2020 · 3 comments · Fixed by #512

Comments

@vinicius73
Copy link

Terraform Version

Terraform v0.13.5
+ provider registry.terraform.io/digitalocean/digitalocean v2.0.1

Affected Resource(s)

  • digitalocean_spaces_bucket

Terraform Configuration Files

resource "digitalocean_spaces_bucket" "index-key" {
  name   = "x-space-name-x"
  region = "nyc3"
  acl    = "private"
}

Debug Output

2020-10-26T18:13:47.380-0300 [DEBUG] plugin.terraform-provider-digitalocean_v2.0.1: 2020/10/26 18:13:47 Bucket created
2020-10-26T18:13:47.380-0300 [DEBUG] plugin.terraform-provider-digitalocean_v2.0.1: 2020/10/26 18:13:47 [DEBUG] Spaces put bucket ACL: {
2020-10-26T18:13:47.380-0300 [DEBUG] plugin.terraform-provider-digitalocean_v2.0.1:   ACL: "private",
2020-10-26T18:13:47.381-0300 [DEBUG] plugin.terraform-provider-digitalocean_v2.0.1:   Bucket: "x-space-name-x"
2020-10-26T18:13:47.381-0300 [DEBUG] plugin.terraform-provider-digitalocean_v2.0.1: }
2020-10-26T18:13:47.381-0300 [DEBUG] plugin.terraform-provider-digitalocean_v2.0.1: 2020/10/26 18:13:47 [DEBUG] Waiting for state to become: [success]
2020-10-26T18:13:47.535-0300 [DEBUG] plugin.terraform-provider-digitalocean_v2.0.1: 2020/10/26 18:13:47 [DEBUG] Waiting for state to become: [success]
2020-10-26T18:13:47.656-0300 [DEBUG] plugin.terraform-provider-digitalocean_v2.0.1: 2020/10/26 18:13:47 [WARN] Spaces Bucket (x-space-name-x) not found, error code (404)
2020/10/26 18:13:47 [DEBUG] module.production-cluster.module.storage.digitalocean_spaces_bucket.this["index-key"]: apply errored, but we're indicating that via the Error pointer rather than returning it: Provider produced inconsistent result after apply: When applying changes to module.production-cluster.module.storage.digitalocean_spaces_bucket.this["index-key"], provider "registry.terraform.io/digitalocean/digitalocean" produced an unexpected new value: Root resource was present, but now absent.

Expected Behavior

Normal creation of resource and state

Actual Behavior

The resource was created, but state is inconsistent.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
@andrewsomething
Copy link
Member

@vinicius73, thanks for flagging this for us. In my testing, it looks like this is only effecting nyc3. The example config is working as expected for me in other regions. Can you (or anyone else effected) confirm if that is the case for you as well?

andrewsomething added a commit that referenced this issue Oct 28, 2020
…roceeding.

As we immediately apply additional configuration after creating the bucket,
we should first ensure that the bucket is available before leaving the create
method in order to protect against instablity like seen in #510.

Closes: #510
andrewsomething added a commit that referenced this issue Oct 28, 2020
…roceeding. (#512)

As we immediately apply additional configuration after creating the bucket,
we should first ensure that the bucket is available before leaving the create
method in order to protect against instablity like seen in #510.

Closes: #510
@andrewsomething
Copy link
Member

The Spaces team identified the issue in NYC3. Additionally, we've added a change here that should protect against any future instability like this. The fix is part of the 2.0.2 release. You can update with:

terraform init -upgrade

@vinicius73
Copy link
Author

Thanks @andrewsomething

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