Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Last active May 10, 2022 02:06
Show Gist options
  • Save KyMidd/060f7f75d2cb1762965513e3c43693f9 to your computer and use it in GitHub Desktop.
Save KyMidd/060f7f75d2cb1762965513e3c43693f9 to your computer and use it in GitHub Desktop.
resource "null_resource" "invalidate_cf_cache" {
provisioner "local-exec" {
command = "aws cloudfront create-invalidation --distribution-id ${var.cf_id} --paths '/*'"
}
depends_on = [
aws_s3_object.website.etag,
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment