Skip to content

Commit

Permalink
Add example for Microsoft.Communication_emailServices_domains@2023-0…
Browse files Browse the repository at this point in the history
…4-01-preview (#740)
  • Loading branch information
neil-yechenwei authored Jan 24, 2025
1 parent d2a746f commit b1cbabb
Showing 1 changed file with 57 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}

provider "azapi" {
skip_provider_registration = false
}

variable "resource_name" {
type = string
default = "acctest0001"
}

variable "location" {
type = string
default = "westeurope"
}

resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}

resource "azapi_resource" "emailService" {
type = "Microsoft.Communication/emailServices@2023-04-01-preview"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = "global"
body = {
properties = {
dataLocation = "United States"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}

resource "azapi_resource" "domain" {
type = "Microsoft.Communication/emailServices/domains@2023-04-01-preview"
name = "example.com"
location = "global"
parent_id = azapi_resource.emailService.id
tags = {
env = "Test"
}
body = {
properties = {
domainManagement = "CustomerManaged"
userEngagementTracking = "Disabled"
}
}
}

0 comments on commit b1cbabb

Please sign in to comment.