ou’re running into a real (and annoyingly confusing) Certificate Manager constraint: the words “global” and “ALL_REGIONS” in the resource path/fields do not guarantee that the certificate is eligible to be referenced from a global certificate map.
What’s happening under the hood:
-
A certificate map is a routing object that sits in front of a load balancer target proxy and decides which cert(s) to present based on hostname.
-
A global certificate map expects certificates that are valid for that global attachment model.
-
Google-managed certificates in Certificate Manager can appear as locations/global and show scope: ALL_REGIONS, but they’re still handled with constraints that make them ineligible for global certificate-map entries in some scenarios.
-
Result: when you try to attach it, the API rejects it with:
INVALID_ARGUMENT: … has invalid scope
So it’s not that your config is “wrong,” it’s that the API is telling you: this certificate type + scope combination cannot be used inside that map type.
How to fix it (pick the path that matches your goal)
Fix 1: Use a regional certificate map (best if you want Google-managed certs)
If you want Google to manage issuance/renewal and you don’t strictly need a global map, use a regional map and keep everything consistent in the same region.
Steps
- Create a regional map:
gcloud certificate-manager maps create my-regional-map \
--location=us-central1
- Create the map entry pointing to your cert:
gcloud certificate-manager maps entries create my-entry \
--location=us-central1 \
--map=my-regional-map \
--hostname="example.com" \
--certificates="projects/PROJECT_ID/locations/global/certificates/cert-dev-global"
If the cert still refuses because of scope/type, then the cleanest way is to recreate the cert in the same region model you’re using for the map (below).
Fix 2: Recreate the certificate using the default scope (often resolves “invalid scope”)
A bunch of people hit this when they explicitly set ALL_REGIONS. In practice, using the default scope avoids this “looks global but isn’t mappable globally” edge case.
Approach
(Exact flags depend on how you created the cert: DNS authorization vs load balancer authorization. The key point is: don’t force the all-regions scope if you plan to map it.)
Fix 3: If you truly need a global certificate map, use a classic certificate
If your architecture requires a global map specifically (for example, you’re standardizing on global external HTTPS LB + global mapping), the pragmatic fix is to use a classic certificate that’s compatible with global maps.
This trades off some of the newer Certificate Manager “Google-managed certificate” behavior for compatibility.
Fix 4: Skip certificate maps and attach the cert directly to the target proxy (when applicable)
If your goal is just “make HTTPS work” and you don’t actually need hostname-based mapping (or you only have a small number of hostnames), the simplest operational fix can be:
This avoids the map eligibility rules entirely.
Quick sanity checks (to confirm what you’re dealing with)
Run these and look specifically for type, scope, and location expectations:
gcloud certificate-manager certificates describe cert-dev-global --location=global
gcloud certificate-manager maps describe YOUR_MAP --location=global
If the map is global and the cert is Google-managed (Certificate Manager “Certificate”, not “classicCertificate”), this mismatch is exactly where the error comes from.
Two official docs to reference in your forum reply
If you want, paste (redact project/hostnames) the output of gcloud certificate-manager certificates describe ... and ... maps describe ... and I’ll tell you which of the 4 fixes is the cleanest for your exact LB setup.