Skip to content

Instantly share code, notes, and snippets.

View scarbeau's full-sized avatar

Jonathon Scarbeau scarbeau

View GitHub Profile
@scarbeau
scarbeau / monthly_aws_access_key_rotation_example.tf
Last active December 20, 2021 15:46
Terraform AWS Access Key Rotation
resource "aws_iam_user" "monthly_credential_rotation_example" {
provider = aws.local
name = "monthly-credential-rotation-example"
}
resource "aws_iam_access_key" "one" {
provider = aws.local
count = local.modmonth == 0 ? 1 : 0
user = aws_iam_user.monthly_credential_rotation_example.name
}