Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Created May 10, 2022 02:10
Show Gist options
  • Save KyMidd/d969604e6e4e5e2198783bd32ce695d8 to your computer and use it in GitHub Desktop.
Save KyMidd/d969604e6e4e5e2198783bd32ce695d8 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 '/*'"
}
triggers = {
website_version_changed = aws_s3_object.website.version_id
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment