import * as core from "@terrascript/core"; export interface BucketPolicyArgs extends core.ResourceArgs { /** * (Required) The name of the bucket to which to apply the policy. */ bucket: string | core.StringOut; /** * (Required) The text of the policy. Although this is a bucket policy rather than an IAM policy, the [ * aws_iam_policy_document`](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-so * urces/iam_policy_document) data source may be used, so long as it specifies a principal. For more in * formation about building AWS IAM policy documents with Terraform, see the [AWS IAM Policy Document G * uide](https://learn.hashicorp.com/terraform/aws/iam-policy). Note: Bucket policies are limited to 20 * KB in size. */ policy: string | core.StringOut; } export class BucketPolicy extends core.Resource { /** * (Required) The name of the bucket to which to apply the policy. */ @core.attr(String) public bucket!: string | core.StringOut; @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Required) The text of the policy. Although this is a bucket policy rather than an IAM policy, the [ * aws_iam_policy_document`](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-so * urces/iam_policy_document) data source may be used, so long as it specifies a principal. For more in * formation about building AWS IAM policy documents with Terraform, see the [AWS IAM Policy Document G * uide](https://learn.hashicorp.com/terraform/aws/iam-policy). Note: Bucket policies are limited to 20 * KB in size. */ @core.attr(String) public policy!: string | core.StringOut; constructor(name: string, args?: BucketPolicyArgs) { super(name, "aws_s3_bucket_policy", args); } public override getNamespace(): string { return "aws_s3"; } }