Skip to main content

S3StorageSchema

S3StorageSchema is the schema of the S3Storage resource: an S3 bucket holding files. Terraform provisions it as aws_s3_bucket, aws_s3_bucket_public_access_block when public access is blocked, one aws_s3_object per uploaded file, and aws_s3_bucket_policy once a principal is admitted, aws_s3_bucket_cors_configuration once it has a CORS rule, and aws_s3_bucket_lifecycle_configuration once it has a lifecycle rule.

@group

Resources/S3Storage

@overrideProperty

parents - The principals admitted to the bucket.

@overrideProperty

resourceId - The resource id is of format bucket-<bucket-name>

Hierarchy

  • BaseResourceSchema
    • S3StorageSchema

Index

Properties

inheritedlocalResourceId

localResourceId: string

The ID the resource was created with, unique within its scope.

inheritedparents

parents: IResourceReference[]

The resources this one is built on top of.

properties

properties: { awsAccountId: string; awsRegionId: string; blockPublicAccess: boolean; Bucket: string; corsRules: S3StorageCorsRuleSchema[]; lifecycleRules: S3StorageLifecycleRuleSchema[]; permissions: S3StoragePermissionSchema[] }

Input properties.

  • properties.awsAccountId - The AWS account id.
  • properties.awsRegionId - The AWS region id.
  • properties.blockPublicAccess - Blocks every public ACL and public policy on the bucket.
  • properties.Bucket - The name of the bucket.
  • properties.corsRules - The rules letting a page on another origin call the bucket. See S3StorageCorsRuleSchema for options.
  • properties.lifecycleRules - The rules expiring the bucket's objects. See S3StorageLifecycleRuleSchema for options.
  • properties.permissions - The permissions for the bucket. See S3StoragePermissionSchema for options.

Type declaration

inheritedresourceId

resourceId: string

The ID of the resource, unique across the infrastructure: its localResourceId, followed by a hash of its scope when it has one.

response

response: { Arn?: string; awsRegionId?: string; Bucket?: string; RegionalDomainName?: string } = { Arn: 'arn:aws:s3:::mock-bucket', awsRegionId: 'us-east-1', Bucket: 'mock-bucket', RegionalDomainName: 'mock-bucket.s3.us-east-1.amazonaws.com', }

Saved response.

  • response.Arn - The ARN of the bucket.
  • response.awsRegionId - The AWS region id.
  • response.Bucket - The name of the bucket, as terraform created it.
  • response.RegionalDomainName - The bucket's REST endpoint, which is what a CloudFront origin points at.

Type declaration

  • optionalArn?: string
  • optionalawsRegionId?: string
  • optionalBucket?: string
  • optionalRegionalDomainName?: string

inheritedscope

scope: string[]

The contexts of the models the resource is placed under, derived from where the node creating it sits in the model graph. Octo sets it; a resource created outside a model action has none.

sourcePathDigests

sourcePathDigests: {} = {}

Type declaration

  • [remotePath string]: string

inheritedtags

tags: {}

The tags applied to the resource.


Type declaration

  • [key string]: string