Google Essential Contacts Contact
This page shows how to write Terraform for Essential Contacts Contact and write them securely.
google_essential_contacts_contact (Terraform)
The Contact in Essential Contacts can be configured in Terraform with the resource name google_essential_contacts_contact
. The following sections describe 2 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "google_essential_contacts_contact" "contact" {
parent = data.google_project.project.id
email = "foo@bar.com"
language_tag = "en-GB"
notification_category_subscriptions = ["ALL"]
}
resource "google_essential_contacts_contact" "org" {
provider = google.sa
parent = data.google_organization.org.name
email = var.org_contact
language_tag = "en-US"
notification_category_subscriptions = ["ALL"]
Parameters
The following arguments are supported:
email
- (Required) The email address to send notifications to. This does not need to be a Google account.notification_category_subscriptions
- (Required) The categories of notifications that the contact will receive communications for.language_tag
- (Required) The preferred language for notifications, as a ISO 639-1 language code. See Supported languages for a list of supported languages.parent
- (Required) The resource to save this contact for. Format: organizations/[organization_id], folders/[folder_id] or projects/[project_id]
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format[[name]]
name
- The identifier for the contact. Format: [resourceType]/[resource_id]/contacts/[contact_id]
Explanation in Terraform Registry
A contact that will receive notifications from Google Cloud. To get more information about Contact, see:
- API documentation
- How-to Guides
- Official Documentation
Warning: If you are using User ADCs (Application Default Credentials) with this resource, you must specify a
billing_project
and setuser_project_override
to true in the provider configuration. Otherwise the Essential Contacts API will return a 403 error. Your account must have theserviceusage.services.use
permission on thebilling_project
you defined.
Frequently asked questions
What is Google Essential Contacts Contact?
Google Essential Contacts Contact is a resource for Essential Contacts of Google Cloud Platform. Settings can be wrote in Terraform.
Where can I find the example code for the Google Essential Contacts Contact?
For Terraform, the terraform-google-modules/docs-examples and lukwam/terraform-gcp-organization source code examples are useful. See the Terraform Example section for further details.