Skip to content

opsd-io/terraform-module-aws-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5feae70 · Sep 22, 2023

History

3 Commits
Aug 4, 2023
Sep 22, 2023
Aug 4, 2023
Aug 4, 2023
Aug 4, 2023
Aug 4, 2023
Sep 22, 2023
Aug 4, 2023
Aug 4, 2023
Sep 22, 2023
Sep 22, 2023
Sep 22, 2023
Sep 22, 2023
Sep 22, 2023
Sep 22, 2023

Repository files navigation

OPSd

Meet OPSd. The unique and effortless way of managing cloud infrastructure.

terraform-module-aws-backend

Introduction

What does the module provide?

Usage

module "tfstate_backend" {
  source      = "github.com/opsd-io/terraform-module-aws-backend?ref=VERSION"
  bucket_name = "my-infrastructure-terraform-state"
}

IMPORTANT: Make sure not to pin to master because there may be breaking changes between releases.

Requirements

Name Version
terraform >= 1.3.1
aws >= 4.20.0

Providers

Name Version
aws >= 4.20.0

Modules

No modules.

Resources

Name Type
aws_dynamodb_table.state resource
aws_iam_policy.state_access resource
aws_kms_alias.state resource
aws_kms_key.state resource
aws_s3_bucket.state resource
aws_s3_bucket_ownership_controls.state resource
aws_s3_bucket_public_access_block.state resource
aws_s3_bucket_server_side_encryption_configuration.state resource
aws_s3_bucket_versioning.state resource
aws_iam_policy_document.dynamodb data source
aws_iam_policy_document.s3bucket data source
aws_iam_policy_document.state_access data source
aws_region.current data source

Inputs

Name Description Type Default Required
bucket_name The name of the S3 Bucket to use for state storage. string n/a yes
bucket_server_side_encryption If true, enables S3 bucket server-side encryption. bool true no
bucket_tags A map of tags to assign to the bucket. map(string) {} no
common_tags A map of tags to assign to every resource in this module. map(string) {} no
dynamodb_table_name The name of DynamoDB Table to use for state locking and consistency. string null no
dynamodb_table_tags A map of tags to assign to the table. map(string) {} no
iam_policy_name The name of the IAM policy to provide Terraform state access. string null no
iam_policy_path Path in which to create the policy. string "/" no
iam_policy_tags A map of tags to assign to the IAM policy. map(string) {} no

Outputs

Name Description
bucket_arn The ARN of the S3 Bucket.
bucket_name The name of the S3 Bucket to use for state storage.
dynamodb_table_arn The ARN of the DynamoDB Table.
dynamodb_table_name The name of DynamoDB Table to use for state locking and consistency.
region The region of the state storage resources.
state_access_policy_arn The ARN of the state access policy providing Terraform state access.
state_access_policy_name The name of the state access policy providing Terraform state access.

Examples of usage

Do you want to see how the module works? See all the usage examples.

Contributing

If you are interested in contributing to the project, see see our guide.

Support

If you have a problem with the module or want to propose a new feature, you can report it via the project's (Github) issue tracker.

If you want to discuss something in person, you can join our community on Slack.

License

Apache License 2.0