Skip to content

"Forbiden: Forbiden" on digitalocean_spaces_bucket_policy #1475

@zzhanabek

Description

@zzhanabek

Bug Report

digitalocean_spaces_bucket_policy returns 403 with Full Access Access Keys. digitalocean_spaces_bucket with Full Access Access Keys works fine.

Describe the bug

403 without any request id , host id

Affected Resource(s)

  • digitalocean_spaces_bucket_policy

Expected Behavior

Policy should be applied

Actual Behavior

Error occurred while creating new Spaces bucket policy: Forbidden: Forbidden

Steps to Reproduce

  1. terraform apply

Terraform Configuration Files
Plan's output:

 + resource "digitalocean_spaces_bucket_policy" "name" {
      + bucket = "masked"
      + id     = (known after apply)
      + policy = jsonencode(
            {
              + Statement = [
                  + {
                      + Action    = "s3:*"
                      + Condition = {
                          + NotIpAddress = {
                              + "aws:SourceIp" = [
                                  + "MASKED/32",
                                  + "MASKED/32",
                                  + "MASKED/32",
                                  + "MASKED/32",
                                ]
                            }
                        }
                      + Effect    = "Deny"
                      + Principal = "*"
                      + Resource  = [
                          + "arn:aws:s3:::masked",
                          + "arn:aws:s3:::masked/*",
                        ]
                      + Sid       = "IPAllow"
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
      + region = "fra1"
    }

Terraform version
Terraform v1.13.5
provider registry.terraform.io/digitalocean/digitalocean v2.69.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions