googleSiteVerification
View SourceSets up a google site verification record. This can be used for verifying you own a domain for usage with Gmail and the Google Search console, among other things.
import * as pulumi from "@pulumi/pulumi";import * as saws from "@stackattack/aws";
const ctx = saws.context();const config = new pulumi.Config();
const verificationCode = config.require("google-verification-code");
saws.googleSiteVerification(ctx, { domain: "mydomain.com", verificationCode});
After deployment, google should be able to verify that you own the domain.
You can manually verify that the record has been created successfully using dig
:
dig TXT mydomain.com
See Verify your domain for Google Workspace for details on using your domain with Google Workspace.
The costs associated with setting up a single DNS record are minimal. You’ll need a Route53 hosted zone, which costs ~$0.50/month, and DNS queries are billed at $0.40/million. Google only needs one DNS query to verify the domain, though they recommend you keep the site verification record indefinitely to ensure that they can continue to verify ownership.
googleSiteVerification
Section titled “googleSiteVerification”function googleSiteVerification(ctx: Context, args: GoogleSiteVerificationArgs): Record
Parameters
Section titled “Parameters”ctx
(Context
) -args
(GoogleSiteVerificationArgs
) -
Returns
Section titled “Returns”- (
Record
) -
Interfaces
Section titled “Interfaces”GoogleSiteVerificationArgs
Section titled “GoogleSiteVerificationArgs”Configuration arguments for setting up google site verification
Properties
Section titled “Properties”domain
(Input<string>
) - The domain name to configure for GmailnoPrefix?
(boolean
) - Whether to skip adding a prefix to the resource nameverificationCode
(Input<string>
) - Google verification code for domain ownership. If not passed, no verification record will be created for the domain. This should start withgoogle-site-verification=...
.zoneId?
(Input<string>
) - Route53 zone ID (auto-detected from domain if not provided)