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

A header you provided implies functionality that is not implemented #587

Open
abdul90082 opened this issue Oct 29, 2024 · 0 comments
Open

Comments

@abdul90082
Copy link

Description

I am using SeaweedFS as an object storage solution. While creating a bucket works without issues, I encounter an error when attempting to set a policy on the bucket.

Steps to Reproduce

  1. Successfully create a bucket in SeaweedFS.
  2. Attempt to create and apply a bucket policy.

Expected behavior:
The bucket policy should be created and applied successfully, allowing specified access configurations.

Versions

2.5.1

I am creating bucket and policy like this.

resource "minio_s3_bucket" "bucket" {
  count = var.storage_type == "seaweedfs" ? 1 : 0

  bucket = "xyz-${var.service_name}-${var.cluster_name}"
}

resource "minio_s3_bucket_policy" "policy" {
  count = var.storage_type == "seaweedfs" ? 1 : 0

  bucket = minio_s3_bucket.bucket.0.id
  policy = jsonencode(
    {
      Statement = [
        {
          Action = [
            "s3:GetObject",
            # "s3:ListBucket",
            # "s3:PutObject"
          ],
          Effect = "Allow",
          Principal = {
            AWS = [
              "*"
            ]
          },
          Resource = [
            # "arn:aws:s3:::${minio_s3_bucket.bucket.0.bucket}",
            "arn:aws:s3:::${minio_s3_bucket.bucket.0.bucket}/*"
          ]
        }
      ],
      Version = "2012-10-17"
    }
  )

}

Getting this error.

 Error: [FATAL] error putting bucket policy: %s ({"Statement":[{"Action":["s3:GetObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::abc-xyz-playground6/*"]}],"Version":"2012-10-17"}): A header you provided implies functionality that is not implemented with module.bms[0].module.basics.module.bucket[0].minio_s3_bucket_policy.policy[0],
on ../../modules/bucket/minio.tf line 15, in resource "minio_s3_bucket_policy" "policy":
2024-10-29T09:40:09.414+0100 [ERROR] provider.terraform-provider-minio_v2.5.1: Response contains error diagnostic: diagnostic_detail= tf_proto_version=5.4 tf_resource_type=minio_s3_bucket_policy tf_rpc=ApplyResourceChange diagnostic_severity=ERROR diagnostic_summary="[FATAL] error putting bucket policy: %s ({"Statement":[{"Action":["s3:GetObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::abc-xyz-playground6/*"]}],"Version":"2012-10-17"}): A header you provided implies functionality that is not implemented" tf_provider_addr=registry.terraform.io/aminueza/minio tf_req_id=a6240235-eeae-0794-0033-f9504e98d522 @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/diag/diagnostics.go:58 @module=sdk.proto timestamp=2024-10-29T09:40:09.414+0100
2024-10-29T09:40:09.420+0100 [DEBUG] State storage *remote.State declined to persist a state snapshot
2024-10-29T09:40:09.420+0100 [ERROR] vertex "module.bms[0].module.basics.module.bucket[0].minio_s3_bucket_policy.policy[0]" error: [FATAL] error putting bucket policy: %s ({"Statement":[{"Action":["s3:GetObject"],"Effect":"Allow","Principal":{"AWS":["*"]},"Resource":["arn:aws:s3:::abc-xyz-playground6/*"]}],"Version":"2012-10-17"}): A header you provided implies functionality that is not implemented
2024-10-29T09:40:09.422+0100 [DEBUG] states/remote: state read serial is: 4035; serial is: 4035
2024-10-29T09:40:09.422+0100 [DEBUG] states/remote: state read lineage is: bf11e770-66be-1ec3-f171-75147ffcd048; lineage is: bf11e770-66be-1ec3-f171-75147ffcd048```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant