Sha256: aecfe2b6083f2deecfa047b1271dc0ff0a282441aacc87a75a83948d25235152

Contents?: true

Size: 422 Bytes

Versions: 1

Compression:

Stored size: 422 Bytes

Contents

resource "aws_s3_bucket" "aws_recon" {
  bucket = "${var.aws_recon_base_name}-${random_id.bucket.hex}-${data.aws_iam_account_alias.current.id}"
  acl    = "private"

  lifecycle_rule {
    id      = "expire-after-${var.retention_period}-days"
    enabled = true

    expiration {
      days = var.retention_period
    }
  }
}

resource "random_id" "bucket" {
  byte_length = 4
}

data "aws_iam_account_alias" "current" {}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
aws_recon-0.4.1 terraform/s3.tf