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

tos创建时,一并创建权限策略失败 #173

Open
wangheng0206 opened this issue Aug 27, 2024 · 0 comments
Open

tos创建时,一并创建权限策略失败 #173

wangheng0206 opened this issue Aug 27, 2024 · 0 comments

Comments

@wangheng0206
Copy link

wangheng0206 commented Aug 27, 2024


│ Error: error on reading tos bucket "terraform-tos-test-2", error on reading resource "terraform-tos-test-2", :
│ status code: 404, request id:

│ with volcengine_tos_bucket.tos,
│ on main.tf line 60, in resource "volcengine_tos_bucket" "tos":
│ 60: resource "volcengine_tos_bucket" "tos" {

等一会再次执行terraform apply才成功

Terraform will perform the following actions:

volcengine_tos_bucket_policy.policy will be created

  • resource "volcengine_tos_bucket_policy" "policy" {
    • bucket_name = "terraform-tos-test-2"
    • id = (known after apply)
    • policy = jsonencode(
      {
      + Statement = [
      + {
      + Action = [
      + "tos:Get*",
      + "tos:List*",
      + "tos:HeadBucket",
      + "tos:PutObject",
      + "tos:PutObjectAcl",
      + "tos:DeleteObject",
      + "tos:DeleteObjectVersion",
      + "tos:AbortMultipartUpload",
      ]
      + Effect = "Allow"
      + Principal = [
      + "xxxx/terraform-tos-test-2",
      ]
      + Resource = [
      + "trn:tos:::terraform-tos-test-2",
      + "trn:tos:::terraform-tos-test-2/*",
      ]
      + Sid = "test"
      },
      ]
      }
      )
      }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.

Enter a value: yes

volcengine_tos_bucket_policy.policy: Creating...
volcengine_tos_bucket_policy.policy: Creation complete after 1s [id=terraform-tos-test-2:POLICY]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

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