Open MihaiBojin opened 2 years ago
I assume the verification behavior is correct (i.e., the principal operating on the Compute Engine instance must be a verified domain owner). If someone could confirm this, I'd be more than happy to submit a PR for the Terraform Provider page (and the Google site, though I suspect I wouldn't have access to it).
Thank you!
go/terraform-on-cgc may be useful if desired.
Hi, This behaviour is correct. There are 2 ways to verify your domain
You can verify your domain name in 2 ways:
- If you have a Google account, you can verify by using Search Console.
- If you have a Google or non-Google account, you can verify by adding your VM's IP address to your DNS configuration.
The DNS way wasn't publicly documented until we saw this issue. Here is the Google doc containing it https://cloud.google.com/compute/docs/instances/create-ptr-record
Community Note
Description
To set a PTR DNS record for a Compute Instance you must verify that you own the domain. However, the operation may still fail, even after verifying the domain, and it is not immediately obvious why.
I'm proposing a documentation update to further clarify what users should do to successfully set PTR records.
The error usually looks like this:
ISSUE: It is not sufficient to verify the domain for your user!
SOLUTION: You must add ALL service accounts as verified domain owners in the Webmasters console.
For example, once I added the service user that interacts with GCP (i.e.,
[SERVICE_USER]@[PROJECT].iam.gserviceaccount.com
), I could successfully apply the PTR record.New or Affected Resource(s)
Potential Terraform Configuration
References
1333
Public documentation pages:
b/321387251