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:

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 objects are subject to IAM and S3 Bucket Policies as well as bucket ACLs. Be cautious when using this option not to indicate files which should not be published to the audience defined by your security configuration. 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:

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.

class tb_pulumi.s3.S3PrivateBucket(name: str, project: ThunderbirdPulumiProject, bucket_name: str, opts: ResourceOptions = None, tags: dict = {}, **kwargs)

Bases: ThunderbirdComponentResource

Pulumi Type: tb:s3:S3PrivateBucket

Builds a private S3 bucket.

Produces the following resources:

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.

  • 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.