| --- |
| # ---------------------------------------------------------------------------- |
| # |
| # *** AUTO GENERATED CODE *** Type: MMv1 *** |
| # |
| # ---------------------------------------------------------------------------- |
| # |
| # This file is automatically generated by Magic Modules and manual |
| # changes will be clobbered when the file is regenerated. |
| # |
| # Please read more about how to change this file in |
| # .github/CONTRIBUTING.md. |
| # |
| # ---------------------------------------------------------------------------- |
| subcategory: "Essential Contacts" |
| description: |- |
| A contact that will receive notifications from Google Cloud. |
| --- |
| |
| # google_essential_contacts_contact |
| |
| A contact that will receive notifications from Google Cloud. |
| |
| |
| To get more information about Contact, see: |
| |
| * [API documentation](https://cloud.google.com/resource-manager/docs/reference/essentialcontacts/rest/v1/projects.contacts) |
| * How-to Guides |
| * [Official Documentation](https://cloud.google.com/resource-manager/docs/managing-notification-contacts) |
| |
| ~> **Warning:** If you are using User ADCs (Application Default Credentials) with this resource, |
| you must specify a `billing_project` and set `user_project_override` to true |
| in the provider configuration. Otherwise the Essential Contacts API will return a 403 error. |
| Your account must have the `serviceusage.services.use` permission on the |
| `billing_project` you defined. |
| |
| <div class = "oics-button" style="float: right; margin: 0 0 -15px"> |
| <a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md&cloudshell_working_dir=essential_contact&open_in_editor=main.tf" target="_blank"> |
| <img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;"> |
| </a> |
| </div> |
| ## Example Usage - Essential Contact |
| |
| |
| ```hcl |
| data "google_project" "project" { |
| } |
| |
| resource "google_essential_contacts_contact" "contact" { |
| parent = data.google_project.project.id |
| email = "foo@bar.com" |
| language_tag = "en-GB" |
| notification_category_subscriptions = ["ALL"] |
| } |
| ``` |
| |
| ## Argument Reference |
| |
| 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} |
| |
| |
| - - - |
| |
| |
| |
| ## Attributes Reference |
| |
| 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} |
| |
| |
| ## Timeouts |
| |
| This resource provides the following |
| [Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: |
| |
| - `create` - Default is 20 minutes. |
| - `update` - Default is 20 minutes. |
| - `delete` - Default is 20 minutes. |
| |
| ## Import |
| |
| |
| Contact can be imported using any of these accepted formats: |
| |
| * `{{name}}` |
| |
| |
| In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Contact using one of the formats above. For example: |
| |
| ```tf |
| import { |
| id = "{{name}}" |
| to = google_essential_contacts_contact.default |
| } |
| ``` |
| |
| When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Contact can be imported using one of the formats above. For example: |
| |
| ``` |
| $ terraform import google_essential_contacts_contact.default {{name}} |
| ``` |