tb_pulumi.s3¶
Infrastructural patterns related to AWS S3.
- class tb_pulumi.s3.S3Bucket(name: str, project: ThunderbirdPulumiProject, bucket_name: str, enable_server_side_encryption: bool = True, enable_versioning: bool = False, object_dir: str = None, opts: ResourceOptions = None, tags: dict = {}, **kwargs)¶
Bases:
ThunderbirdComponentResource
Pulumi Type:
tb:s3:S3Bucket
Builds an S3 bucket with various optional configurations.
Produces the following
resources
:bucket - The aws.s3.BucketV2 resource.
encryption_config - The aws.s3.BucketServerSideEncryptionConfigurationV2 if
enable_server_side_encryption
isTrue
.versioning_config - The aws.s3.BucketVersioningV2 resource if
enable_versioning
isTrue
.
- Parameters:
name (str) – A string identifying this set of resources.
project (tb_pulumi.ThunderbirdPulumiProject) – The ThunderbirdPulumiProject to add these resources to.
bucket_name (str) – The name of the S3 bucket to create.
enable_server_side_encryption (bool, optional) – Enables AWS-managed AES256 server-side encryption on bucket objects. Defaults to True.
enable_versioning (bool, optional) – Enables versioning on bucket object. Defaults to False.
object_dir – The path to a directory containing files which should be uploaded to the bucket. These files will all be publicly accessible. Do not ever indicate files which contain sensitive data. Defaults to None.
opts (pulumi.ResourceOptions, optional) – Additional pulumi.ResourceOptions to apply to these resources. Defaults to None.
tags (dict, optional) – Key/value pairs to merge with the default tags which get applied to all resources in this group. Defaults to {}.
kwargs – Additional arguments to pass into the aws.s3.S3BucketV2 constructor.
- class tb_pulumi.s3.S3BucketWebsite(name: str, project: ThunderbirdPulumiProject, bucket_name: str, website_config: dict, opts: ResourceOptions = None, tags: dict = {}, **kwargs)¶
Bases:
ThunderbirdComponentResource
Pulumi Type:
tb:s3:S3BucketWebsite
Builds an S3 bucket and sets up a public access static website from its contents.
Produces the following
resources
:bucket - A
tb_pulumi.s3.S3Bucket
to host the static files.bucket_acl - An aws.s3.BucketAclV2 describing public read access.
bucket_oc - An aws.s3.BucketOwnershipControls describing how object ownership works.
bucket_pab - An aws.s3.BucketPublicAccessBlock which disables the blocks on public access.
objects - A dict where the keys are files discovered in the
content_dir
local directory and the values are aws.s3.BucketObjectv2 s.policy - An aws.s3.BucketPolicy allowing public read access to the bucket contents.
website - An aws.s3.BucketWebsiteConfigurationV2 defining the operating parameters of the website.
- Parameters:
name (str) – A string identifying this set of resources.
project (tb_pulumi.ThunderbirdPulumiProject) – The ThunderbirdPulumiProject to add these resources to.
bucket_name (str) – The name of the S3 bucket to host a public website in.
website_config (dict) – A dict of options describing a BucketWebsiteConfigurationV2 resource .
opts (pulumi.ResourceOptions, optional) – Additional pulumi.ResourceOptions to apply to these resources. Defaults to None.
tags (dict, optional) – Key/value pairs to merge with the default tags which get applied to all resources in this group. Defaults to {}.
kwargs – Additional arguments to pass into the
S3Bucket
constructor.