Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add data_source_google_site_verification_token #7704

Conversation

modular-magician
Copy link
Collaborator

This is a start to implementing hashicorp/terraform-provider-google#5698 which will ultimately allow TPG users to verify site ownership for use with the Google Search Console.

The verification system works by providing you with a random-looking value (which is what this new data source obtains for you) which you then add to your site as a meta tag a la:

<html>
  <head>
    <title>My Web Site</title>
    <meta name="google-site-verification" content="-token-you-got-from-this-new-data-source-" />
  </head>
  <body>
    ...

You can also use the token in a DNS record, or in a separate file on your web site, or in several other ways. The gist is that by making a modification to a web site that includes a Google supplied value you are verifying that you are an owner of the site.

The steps will look something like:

  1. Use this data source to obtain the token
  2. Add the token to your site (for instance, by adding a DNS record via google_dns_record_set or adding a meta tag as shown above)
  3. Use the forthcoming google_site_verification_web_resource to request confirmation of your site ownership by validating that step 2 has taken place.
`google_site_verification_token`

Derived from GoogleCloudPlatform/magic-modules#10999

[upstream:b33d6de70b36556872c5d0d870116b057878daf2]

Signed-off-by: Modular Magician <[email protected]>
@modular-magician modular-magician merged commit f20185e into hashicorp:main Jul 9, 2024
4 checks passed
@modular-magician modular-magician deleted the downstream-pr-b33d6de70b36556872c5d0d870116b057878daf2 branch November 16, 2024 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant