我正在尝试通过 Terraform 为我的 AWS S3 VPC 终端节点创建策略。
我的地形:
policy = jsonencode({
Sid = "Restrict-Access-To-Specific-Bucket"
Principal = "*"
Action = "*"
Effect = "Allow"
Resource = [
"arn:aws:s3:::${aws_s3_bucket.snowflake-data-bucket-raw.id}",
"arn:aws:s3:::${aws_s3_bucket.snowflake-data-bucket-raw.id}/*"
]
})
使用它时,我收到以下错误:
│ Error: Error creating VPC Endpoint: InvalidPolicyDocument: Please provide a valid VPC Endpoint policy
│ status code: 400, request id: 1b08a075-0c65-4f1c-92a9-bcbeced15db1
我不确定我的格式是否已关闭,或者我是否在某处遗漏了某个字段。任何帮助,将不胜感激。