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

Acceleration NotImplemented error with third party S3 implementation #13726

Closed
dr4Ke opened this issue Jun 12, 2020 · 8 comments · Fixed by #23278
Closed

Acceleration NotImplemented error with third party S3 implementation #13726

dr4Ke opened this issue Jun 12, 2020 · 8 comments · Fixed by #23278
Labels
bug Addresses a defect in current functionality. service/s3 Issues and PRs that pertain to the s3 service.
Milestone

Comments

@dr4Ke
Copy link

dr4Ke commented Jun 12, 2020

When using a different S3 implementation (here Cloudian), the bucket gets created but the terraform states still fails, due to Acceleration not being implemented server side.

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

Terraform Version

Terraform v0.12.24
+ provider.aws v2.66.0

Affected Resource(s)

  • aws_s3_bucket

Terraform Configuration Files

provider "aws" {
  endpoints {
    s3 = "https://object-fr.antemeta.net"
  }
  region = "fr"
  skip_region_validation = true
  skip_get_ec2_platforms = true
  s3_force_path_style = true
  skip_credentials_validation = true
  skip_metadata_api_check     = true
  skip_requesting_account_id  = true
}

resource "aws_s3_bucket" "test-bucket" {
  bucket = "test-bucket"
  acl    = "private"
  acceleration_status = null
}

Debug Output

https://gist.github.com/dr4Ke/b27bdf40fa54dbe9da92a9085380cdeb

Panic Output

N/A

Expected Behavior

The bucket gets created and terraform apply succeeds.

Actual Behavior

The bucket gets created but the terraform apply fails with error:

Error: error getting S3 Bucket acceleration configuration: NotImplemented: A header you provided implies functionality that is not implemented.
	status code: 501, request id: , host id:

It is due to the Acceleration not being implemented. Subsequents run of terraform plan gives the same error.

Detailed output:

2020-06-12T08:58:16.839Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: -----------------------------------------------------
2020-06-12T08:58:16.839Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: 2020/06/12 08:58:16 [DEBUG] [aws-sdk-go] <?xml version="1.0" encoding="UTF-8"?><VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"></VersioningConfiguration>
2020-06-12T08:58:16.839Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: 2020/06/12 08:58:16 [DEBUG] Waiting for state to become: [success]
2020-06-12T08:58:16.839Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: 2020/06/12 08:58:16 [DEBUG] [aws-sdk-go] DEBUG: Request s3/GetBucketAccelerateConfiguration Details:
2020-06-12T08:58:16.839Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: ---[ REQUEST POST-SIGN ]-----------------------------
2020-06-12T08:58:16.839Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: GET /test-bucket?accelerate= HTTP/1.1
2020-06-12T08:58:16.839Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: Host: object-fr.antemeta.net
2020-06-12T08:58:16.839Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: User-Agent: aws-sdk-go/1.31.2 (go1.13.7; linux; amd64) APN/1.0 HashiCorp/1.0 Terraform/0.12.24 (+https://www.terraform.io)
2020-06-12T08:58:16.839Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: Authorization: AWS4-HMAC-SHA256 Credential=XXXXXXXXXXXXXXX/20200612/fr/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=791ca9bfd2fee30397381f6c31463ddb9497f255b336e2ae5227b50a44665d22
2020-06-12T08:58:16.839Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2020-06-12T08:58:16.839Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: X-Amz-Date: 20200612T085816Z
2020-06-12T08:58:16.839Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: Accept-Encoding: gzip
2020-06-12T08:58:16.839Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: 
2020-06-12T08:58:16.839Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: 
2020-06-12T08:58:16.839Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: -----------------------------------------------------
2020-06-12T08:58:17.053Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: 2020/06/12 08:58:17 [DEBUG] [aws-sdk-go] DEBUG: Response s3/GetBucketAccelerateConfiguration Details:
2020-06-12T08:58:17.053Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: ---[ RESPONSE ]--------------------------------------
2020-06-12T08:58:17.053Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: HTTP/1.1 501 Not Implemented
2020-06-12T08:58:17.053Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: Connection: close
2020-06-12T08:58:17.053Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: Content-Length: 286
2020-06-12T08:58:17.053Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: Content-Type: application/xml
2020-06-12T08:58:17.053Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: Date: Fri, 12 Jun 2020 08:58:17 GMT
2020-06-12T08:58:17.053Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: Server: CloudianS3
2020-06-12T08:58:17.053Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: Strict-Transport-Security: max-age=31536000
2020-06-12T08:58:17.053Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: X-Gmt-Error-Code: NotImplemented
2020-06-12T08:58:17.053Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: X-Gmt-Message: A header you provided implies functionality that is not implemented.
2020-06-12T08:58:17.053Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: 
2020-06-12T08:58:17.053Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: 
2020-06-12T08:58:17.053Z [DEBUG] plugin.terraform-provider-aws_v2.66.0_x4: -----------------------------------------------------

Steps to Reproduce

  1. terraform apply

Important Factoids

Please note this is happening on a S3 implementation that's not Amazon's.

References

@ghost ghost added the service/s3 Issues and PRs that pertain to the s3 service. label Jun 12, 2020
@dr4Ke
Copy link
Author

dr4Ke commented Jun 12, 2020

I didn't see a skip_* parameter for disabling acceleration management.

@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jun 12, 2020
@dr4Ke dr4Ke changed the title NotImplemented error Acceleration NotImplemented error with third party S3 implementation Jun 12, 2020
@breathingdust breathingdust added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jul 10, 2020
@hongkongkiwi
Copy link

A skip parameter would be perfect. I could also do with this for Wasabi S3 since it doesn't support replication.

@mflorin
Copy link

mflorin commented Feb 12, 2021

@dr4Ke @hongkongkiwi @jbuchhammer - I've opened up a pull request with the skip_* features implemented at #17564 - hopefully it goes through :) - you can have a look, see if it
solves the problem for you as well.

@jerome-jutteau
Copy link

@mflorin Thanks for your PR, we are looking for similar change with even more options. Hope your PR will be approved.

@dabo-devconsole
Copy link

There are also providers, which do not support versioning e.g. Strato HiDrive S3.
It would be great to be able to also skip_versioning.

@mneverov
Copy link

According to the FAQ I can speed up the PR#17564 merge by describing bad UX.
It is quite annoying not being able to use s3_bucket and having to craft s3 bucket manually with the null_resource and multiple bash commands:

    command = <<EOF
aws s3api create-bucket...
aws s3api put-bucket-lifecycle ...
aws s3api put-bucket-versioning ...
aws s3api put-bucket-encryption ...
EOF

It is slower, multiple commands instead of one increases possibility the bucket creation to fail, hard to debug what went wrong.

wilfriedroset added a commit to wilfriedroset/terraform-provider-aws that referenced this issue Feb 18, 2022
Third party S3 might reply `NotImplemented` error when creating a
bucket. This error prevent the successful apply of the plan.

Example when checking policy:
```
╷
│ Error: error getting S3 bucket ([redacted]) policy: NotImplemented: The requested resource is not implemented
│       status code: 501, request id: [redacted], host id: [redacted]
│
│   with aws_s3_bucket.lts,
│   on main.tf line 22, in resource "aws_s3_bucket" "lts":
│   22: resource "aws_s3_bucket" "lts" {
│
╵
```

Example when checking for payment:
```
╷
│ Error: error getting S3 Bucket request payment: NotImplemented: The requested resource is not implemented
│       status code: 501, request id: txc25b2f0fe509409081b8b-00620fcb0c, host id: txc25b2f0fe509409081b8b-00620fcb0c
│
│   with aws_s3_bucket.lts,
│   on main.tf line 23, in resource "aws_s3_bucket" "lts":
│   23: resource "aws_s3_bucket" "lts" {
│
╵
```

Closes: hashicorp#14645, hashicorp#13726

Signed-off-by: Wilfried Roset <[email protected]>
@github-actions github-actions bot added this to the v4.2.0 milestone Feb 18, 2022
@github-actions
Copy link

This functionality has been released in v4.2.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/s3 Issues and PRs that pertain to the s3 service.
Projects
None yet
7 participants