-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/retryv2
- Loading branch information
Showing
36 changed files
with
3,062 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 94 additions & 0 deletions
94
examples/Microsoft.ApiManagement_service_policyFragments@2021-08-01/main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
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" "service" { | ||
type = "Microsoft.ApiManagement/service@2021-08-01" | ||
parent_id = azapi_resource.resourceGroup.id | ||
name = var.resource_name | ||
location = var.location | ||
body = { | ||
properties = { | ||
certificates = [ | ||
] | ||
customProperties = { | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_GCM_SHA256" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_256_CBC_SHA" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_256_CBC_SHA256" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_256_GCM_SHA384" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11" = "false" | ||
} | ||
disableGateway = false | ||
publicNetworkAccess = "Enabled" | ||
publisherEmail = "[email protected]" | ||
publisherName = "pub1" | ||
virtualNetworkType = "None" | ||
} | ||
sku = { | ||
capacity = 1 | ||
name = "Developer" | ||
} | ||
} | ||
schema_validation_enabled = false | ||
response_export_values = ["*"] | ||
timeouts { | ||
create = "180m" | ||
update = "180m" | ||
delete = "180m" | ||
} | ||
} | ||
|
||
resource "azapi_resource" "policyFragment" { | ||
type = "Microsoft.ApiManagement/service/policyFragments@2021-12-01-preview" | ||
name = "error-handler" | ||
parent_id = azapi_resource.service.id | ||
|
||
body = { | ||
properties = { | ||
description = "Fragment for Error Handling" | ||
format = "xml" | ||
value = <<XML | ||
<fragment> | ||
<set-variable name="abc" value="abc" /> | ||
<find-and-replace from="xyz" to="foo" /> | ||
</fragment> | ||
XML | ||
} | ||
} | ||
} |
90 changes: 90 additions & 0 deletions
90
examples/Microsoft.ApiManagement_service_templates@2021-08-01/main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
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" "service" { | ||
type = "Microsoft.ApiManagement/service@2021-08-01" | ||
parent_id = azapi_resource.resourceGroup.id | ||
name = var.resource_name | ||
location = var.location | ||
body = { | ||
properties = { | ||
certificates = [ | ||
] | ||
customProperties = { | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_GCM_SHA256" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_256_CBC_SHA" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_256_CBC_SHA256" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_256_GCM_SHA384" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10" = "false" | ||
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11" = "false" | ||
} | ||
disableGateway = false | ||
publicNetworkAccess = "Enabled" | ||
publisherEmail = "[email protected]" | ||
publisherName = "pub1" | ||
virtualNetworkType = "None" | ||
} | ||
sku = { | ||
capacity = 1 | ||
name = "Developer" | ||
} | ||
} | ||
schema_validation_enabled = false | ||
response_export_values = ["*"] | ||
timeouts { | ||
create = "180m" | ||
update = "180m" | ||
delete = "180m" | ||
} | ||
} | ||
|
||
resource "azapi_update_resource" "template" { | ||
type = "Microsoft.ApiManagement/service/templates@2021-08-01" | ||
name = "InviteUserNotificationMessage" | ||
parent_id = azapi_resource.service.id | ||
body = { | ||
properties = { | ||
subject = "Customized confirmation email for your new $OrganizationName API account" | ||
body = templatefile("${path.module}/testdata/invite.html.tpl", { | ||
developer_portal_url = azapi_resource.service.output.properties.developerPortalUrl | ||
}) | ||
title = "Invite user" | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
examples/Microsoft.ApiManagement_service_templates@2021-08-01/testdata/invite.html.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head /> | ||
<body> | ||
<p style="font-size:12pt;font-family:'Segoe UI'">Dear $DevFirstName $DevLastName,</p> | ||
<p style="font-size:12pt;font-family:'Segoe UI'"> | ||
Your account has been created. Please follow the link below to visit the $OrganizationName developer portal | ||
and claim it: | ||
</p> | ||
<p style="font-size:12pt;font-family:'Segoe UI'"> | ||
<a | ||
href="${developer_portal_url}/confirm-v2/identities/basic/invite?$ConfirmQuery">${developer_portal_url}/confirm-v2/identities/basic/invite?$ConfirmQuery</a> | ||
</p> | ||
<p style="font-size:12pt;font-family:'Segoe UI'">Best,</p> | ||
<p style="font-size:12pt;font-family:'Segoe UI'">The $OrganizationName API Team</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
examples/Microsoft.Authorization_roleAssignments@2022-04-01/main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
terraform { | ||
required_providers { | ||
azapi = { | ||
source = "Azure/azapi" | ||
} | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
} | ||
} | ||
} | ||
|
||
provider "azurerm" { | ||
features { | ||
} | ||
} | ||
|
||
provider "azapi" { | ||
skip_provider_registration = false | ||
} | ||
|
||
variable "resource_name" { | ||
type = string | ||
default = "acctest0001" | ||
} | ||
|
||
variable "location" { | ||
type = string | ||
default = "eastus" | ||
} | ||
|
||
resource "azapi_resource" "resourceGroup" { | ||
type = "Microsoft.Resources/resourceGroups@2020-06-01" | ||
name = var.resource_name | ||
location = var.location | ||
} | ||
|
||
data "azurerm_role_definition" "roleAcrpull" { | ||
name = "AcrPull" | ||
scope = azapi_resource.resourceGroup.id | ||
} | ||
|
||
resource "azurerm_user_assigned_identity" "uai" { | ||
name = "TestUAI" | ||
resource_group_name = azapi_resource.resourceGroup.name | ||
location = azapi_resource.resourceGroup.location | ||
} | ||
|
||
resource "azapi_resource" "roleAssignments" { | ||
type = "Microsoft.Authorization/roleAssignments@2022-04-01" | ||
name = "6faae21a-0cd6-4536-8c23-a278823d12ed" | ||
parent_id = azapi_resource.resourceGroup.id | ||
body = { | ||
properties = { | ||
principalId = azurerm_user_assigned_identity.uai.principal_id | ||
principalType = "ServicePrincipal" | ||
roleDefinitionId = data.azurerm_role_definition.roleAcrpull.id | ||
} | ||
} | ||
} |
63 changes: 63 additions & 0 deletions
63
...es/Microsoft.Automation_automationAccounts_powershell72Modules@2020-01-13-preview/main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
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" "automationAccount" { | ||
type = "Microsoft.Automation/automationAccounts@2021-06-22" | ||
parent_id = azapi_resource.resourceGroup.id | ||
name = var.resource_name | ||
location = var.location | ||
body = { | ||
properties = { | ||
encryption = { | ||
keySource = "Microsoft.Automation" | ||
} | ||
publicNetworkAccess = true | ||
sku = { | ||
name = "Basic" | ||
} | ||
} | ||
} | ||
schema_validation_enabled = false | ||
response_export_values = ["*"] | ||
} | ||
|
||
resource "azapi_resource" "powerShell72Module" { | ||
type = "Microsoft.Automation/automationAccounts/powerShell72Modules@2020-01-13-preview" | ||
parent_id = azapi_resource.automationAccount.id | ||
name = "xActiveDirectory" | ||
body = { | ||
properties = { | ||
contentLink = { | ||
uri = "https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg" | ||
} | ||
} | ||
} | ||
schema_validation_enabled = false | ||
response_export_values = ["*"] | ||
} | ||
|
Oops, something went wrong.