googleworkspace_gmail_send_as_alias (Resource)

Gmail Send As Alias resource in the Terraform Googleworkspace provider. Please ensure the Gmail API is enabled for your workspace and that the user being configured has a Gmail license. Gmail Send As Alias resides under the https://www.googleapis.com/auth/gmail.settings client scope.

Example Usage

data "googleworkspace_user" "example" {
  primary_email = "user.with.gmail.license@example.com"
}

resource "googleworkspace_user" "alias" {
  primary_email = "alias@example.com"
  password      = "34819d7beeabb9260a5c854bc85b3e44"
  hash_function = "MD5"

  name {
    family_name = "Scott"
    given_name  = "Michael"
  }
}

resource "googleworkspace_gmail_send_as_alias" "test" {
  primary_email = data.googleworkspace_user.example.primary_email
  send_as_email = googleworkspace_user.alias.primary_email
}

Schema

Required

Optional

Read-Only

Nested Schema for smtp_msa

Required:

Optional:

Import

Import is supported using the following syntax:

terraform import googleworkspace_gmail_send_as_alias.alias user@example.com:alias@anotherexample.com