File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed
examples/Microsoft.Communication_emailServices_domains@2023-04-01-preview Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change
1
+ terraform {
2
+ required_providers {
3
+ azapi = {
4
+ source = " Azure/azapi"
5
+ }
6
+ }
7
+ }
8
+
9
+ provider "azapi" {
10
+ skip_provider_registration = false
11
+ }
12
+
13
+ variable "resource_name" {
14
+ type = string
15
+ default = " acctest0001"
16
+ }
17
+
18
+ variable "location" {
19
+ type = string
20
+ default = " westeurope"
21
+ }
22
+
23
+ resource "azapi_resource" "resourceGroup" {
24
+ type = " Microsoft.Resources/resourceGroups@2020-06-01"
25
+ name = var. resource_name
26
+ location = var. location
27
+ }
28
+
29
+ resource "azapi_resource" "emailService" {
30
+ type = " Microsoft.Communication/emailServices@2023-04-01-preview"
31
+ parent_id = azapi_resource. resourceGroup . id
32
+ name = var. resource_name
33
+ location = " global"
34
+ body = {
35
+ properties = {
36
+ dataLocation = " United States"
37
+ }
38
+ }
39
+ schema_validation_enabled = false
40
+ response_export_values = [" *" ]
41
+ }
42
+
43
+ resource "azapi_resource" "domain" {
44
+ type = " Microsoft.Communication/emailServices/domains@2023-04-01-preview"
45
+ name = " example.com"
46
+ location = " global"
47
+ parent_id = azapi_resource. emailService . id
48
+ tags = {
49
+ env = " Test"
50
+ }
51
+ body = {
52
+ properties = {
53
+ domainManagement = " CustomerManaged"
54
+ userEngagementTracking = " Disabled"
55
+ }
56
+ }
57
+ }
You can’t perform that action at this time.
0 commit comments