Created
January 17, 2022 01:57
-
-
Save onelharrison/5e71c04fbad1832237ea0431f9f02eea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "random_id" "aws_resource_id" { | |
byte_length = 4 | |
} | |
resource "aws_s3_bucket" "snowflake_backups_bucket" { | |
bucket = "snowflake-backups-${lower(random_id.aws_resource_id.id)}" | |
acl = "private" | |
versioning { | |
enabled = true | |
} | |
lifecycle_rule { | |
id = "backups" | |
enabled = true | |
tags = { | |
rule = "backups" | |
autoclean = "true" | |
} | |
transition { | |
days = 7 | |
storage_class = "GLACIER" | |
} | |
expiration { | |
days = 30 | |
} | |
} | |
lifecycle { | |
prevent_destroy = true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment