Skip to content

Commit 879d9d1

Browse files
committed
Allow CDN invalidator to read URL maps
1 parent 1bc4362 commit 879d9d1

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ make sync-aptly-gpg-key-id
9797

9898
- The managed SSL certificate will stay in provisioning until the delegated package subdomain resolves to the created load balancer IP.
9999
- The bucket is public so `apt` and other package managers can fetch package metadata and artifacts without authentication.
100-
- This stack grants the GitHub service account bucket-level `roles/storage.objectAdmin` for syncing package repositories and a custom role with `compute.urlMaps.invalidateCache` for Cloud CDN invalidation.
100+
- This stack grants the GitHub service account bucket-level `roles/storage.objectAdmin` for syncing package repositories and a custom role with `compute.urlMaps.get` and `compute.urlMaps.invalidateCache` for Cloud CDN invalidation.
101101
- Cloud CDN uses origin cache headers. Package assets are uploaded as long-lived immutable objects, while mutable repository metadata is uploaded as `no-store`.
102102
- Terraform creates the Secret Manager secret containers, but it does not write the private key or passphrase into Terraform state.
103103

main.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,10 @@ resource "google_project_iam_custom_role" "cdn_cache_invalidator" {
205205
role_id = "cdnCacheInvalidator"
206206
title = "Cloud CDN Cache Invalidator"
207207
description = "Allows package publishers to invalidate Cloud CDN cache entries."
208-
permissions = ["compute.urlMaps.invalidateCache"]
208+
permissions = [
209+
"compute.urlMaps.get",
210+
"compute.urlMaps.invalidateCache",
211+
]
209212

210213
depends_on = [google_project_service.service]
211214
}

0 commit comments

Comments
 (0)