Note: Azure Spring Apps Gateways (Microsoft.AppPlatform/Spring/gateways) is now deprecated and will be retired on 2028-05-31. See https://aka.ms/asaretirement for more information.
Bicep resource definition
The Spring/gateways resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Usage Examples
Bicep Samples
A basic example of deploying Spring Cloud Gateway.
param resourceName string = 'acctest0001'
param location string = 'westeurope'
resource spring 'Microsoft.AppPlatform/Spring@2023-05-01-preview' = {
name: resourceName
location: location
sku: {
name: 'E0'
}
properties: {
zoneRedundant: false
}
}
resource gateway 'Microsoft.AppPlatform/Spring/gateways@2023-05-01-preview' = {
name: 'default'
parent: spring
sku: {
capacity: 1
name: 'E0'
tier: 'Enterprise'
}
properties: {
httpsOnly: false
public: false
}
}
Azure Quickstart Samples
The following Azure Quickstart templates contain Bicep samples for deploying this resource type.
To create a Microsoft.AppPlatform/Spring/gateways resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.AppPlatform/Spring/gateways@2023-12-01' = {
parent: resourceSymbolicName
name: 'string'
properties: {
apiMetadataProperties: {
description: 'string'
documentation: 'string'
serverUrl: 'string'
title: 'string'
version: 'string'
}
apms: [
{
resourceId: 'string'
}
]
clientAuth: {
certificates: [
'string'
]
certificateVerification: 'string'
}
corsProperties: {
allowCredentials: bool
allowedHeaders: [
'string'
]
allowedMethods: [
'string'
]
allowedOriginPatterns: [
'string'
]
allowedOrigins: [
'string'
]
exposedHeaders: [
'string'
]
maxAge: int
}
environmentVariables: {
properties: {
{customized property}: 'string'
}
secrets: {
{customized property}: 'string'
}
}
httpsOnly: bool
public: bool
resourceRequests: {
cpu: 'string'
memory: 'string'
}
ssoProperties: {
clientId: 'string'
clientSecret: 'string'
issuerUri: 'string'
scope: [
'string'
]
}
}
sku: {
capacity: int
name: 'string'
tier: 'string'
}
}
Property Values
| Name |
Description |
Value |
| name |
The resource name |
string
Constraints: Pattern = ^[a-z][a-z0-9]*$ (required) |
| parent |
In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.
For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: Spring |
| properties |
Spring Cloud Gateway properties payload |
GatewayProperties |
| sku |
Sku of the Spring Cloud Gateway resource |
Sku |
ApmReference
| Name |
Description |
Value |
| resourceId |
Resource Id of the APM |
string (required) |
| Name |
Description |
Value |
| description |
Detailed description of the APIs available on the Gateway instance (default: Generated OpenAPI 3 document that describes the API routes configured.) |
string |
| documentation |
Location of additional documentation for the APIs available on the Gateway instance |
string |
| serverUrl |
Base URL that API consumers will use to access APIs on the Gateway instance. |
string |
| title |
Title describing the context of the APIs available on the Gateway instance (default: Spring Cloud Gateway for K8S) |
string |
| version |
Version of APIs available on this Gateway instance (default: unspecified). |
string |
GatewayCorsProperties
| Name |
Description |
Value |
| allowCredentials |
Whether user credentials are supported on cross-site requests. Valid values: true, false. |
bool |
| allowedHeaders |
Allowed headers in cross-site requests. The special value * allows actual requests to send any header. |
string[] |
| allowedMethods |
Allowed HTTP methods on cross-site requests. The special value * allows all methods. If not set, GET and HEAD are allowed by default. |
string[] |
| allowedOriginPatterns |
Allowed origin patterns to make cross-site requests. |
string[] |
| allowedOrigins |
Allowed origins to make cross-site requests. The special value * allows all domains. |
string[] |
| exposedHeaders |
HTTP response headers to expose for cross-site requests. |
string[] |
| maxAge |
How long, in seconds, the response from a pre-flight request can be cached by clients. |
int |
GatewayProperties
GatewayPropertiesClientAuth
| Name |
Description |
Value |
| certificates |
Collection of certificate resource Ids in Azure Spring Apps. |
string[] |
| certificateVerification |
Whether to enable certificate verification or not |
'Disabled' 'Enabled' |
GatewayPropertiesEnvironmentVariables
GatewayPropertiesEnvironmentVariablesProperties
GatewayPropertiesEnvironmentVariablesSecrets
GatewayResourceRequests
| Name |
Description |
Value |
| cpu |
Cpu allocated to each Spring Cloud Gateway instance. |
string |
| memory |
Memory allocated to each Spring Cloud Gateway instance. |
string |
Sku
| Name |
Description |
Value |
| capacity |
Current capacity of the target resource |
int |
| name |
Name of the Sku |
string |
| tier |
Tier of the Sku |
string |
SsoProperties
| Name |
Description |
Value |
| clientId |
The public identifier for the application |
string |
| clientSecret |
The secret known only to the application and the authorization server |
string |
| issuerUri |
The URI of Issuer Identifier |
string |
| scope |
It defines the specific actions applications can be allowed to do on a user's behalf |
string[] |
ARM template resource definition
The Spring/gateways resource type can be deployed with operations that target:
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
To create a Microsoft.AppPlatform/Spring/gateways resource, add the following JSON to your template.
{
"type": "Microsoft.AppPlatform/Spring/gateways",
"apiVersion": "2023-12-01",
"name": "string",
"properties": {
"apiMetadataProperties": {
"description": "string",
"documentation": "string",
"serverUrl": "string",
"title": "string",
"version": "string"
},
"apms": [
{
"resourceId": "string"
}
],
"clientAuth": {
"certificates": [ "string" ],
"certificateVerification": "string"
},
"corsProperties": {
"allowCredentials": "bool",
"allowedHeaders": [ "string" ],
"allowedMethods": [ "string" ],
"allowedOriginPatterns": [ "string" ],
"allowedOrigins": [ "string" ],
"exposedHeaders": [ "string" ],
"maxAge": "int"
},
"environmentVariables": {
"properties": {
"{customized property}": "string"
},
"secrets": {
"{customized property}": "string"
}
},
"httpsOnly": "bool",
"public": "bool",
"resourceRequests": {
"cpu": "string",
"memory": "string"
},
"ssoProperties": {
"clientId": "string",
"clientSecret": "string",
"issuerUri": "string",
"scope": [ "string" ]
}
},
"sku": {
"capacity": "int",
"name": "string",
"tier": "string"
}
}
Property Values
| Name |
Description |
Value |
| apiVersion |
The api version |
'2023-12-01' |
| name |
The resource name |
string
Constraints: Pattern = ^[a-z][a-z0-9]*$ (required) |
| properties |
Spring Cloud Gateway properties payload |
GatewayProperties |
| sku |
Sku of the Spring Cloud Gateway resource |
Sku |
| type |
The resource type |
'Microsoft.AppPlatform/Spring/gateways' |
ApmReference
| Name |
Description |
Value |
| resourceId |
Resource Id of the APM |
string (required) |
| Name |
Description |
Value |
| description |
Detailed description of the APIs available on the Gateway instance (default: Generated OpenAPI 3 document that describes the API routes configured.) |
string |
| documentation |
Location of additional documentation for the APIs available on the Gateway instance |
string |
| serverUrl |
Base URL that API consumers will use to access APIs on the Gateway instance. |
string |
| title |
Title describing the context of the APIs available on the Gateway instance (default: Spring Cloud Gateway for K8S) |
string |
| version |
Version of APIs available on this Gateway instance (default: unspecified). |
string |
GatewayCorsProperties
| Name |
Description |
Value |
| allowCredentials |
Whether user credentials are supported on cross-site requests. Valid values: true, false. |
bool |
| allowedHeaders |
Allowed headers in cross-site requests. The special value * allows actual requests to send any header. |
string[] |
| allowedMethods |
Allowed HTTP methods on cross-site requests. The special value * allows all methods. If not set, GET and HEAD are allowed by default. |
string[] |
| allowedOriginPatterns |
Allowed origin patterns to make cross-site requests. |
string[] |
| allowedOrigins |
Allowed origins to make cross-site requests. The special value * allows all domains. |
string[] |
| exposedHeaders |
HTTP response headers to expose for cross-site requests. |
string[] |
| maxAge |
How long, in seconds, the response from a pre-flight request can be cached by clients. |
int |
GatewayProperties
GatewayPropertiesClientAuth
| Name |
Description |
Value |
| certificates |
Collection of certificate resource Ids in Azure Spring Apps. |
string[] |
| certificateVerification |
Whether to enable certificate verification or not |
'Disabled' 'Enabled' |
GatewayPropertiesEnvironmentVariables
GatewayPropertiesEnvironmentVariablesProperties
GatewayPropertiesEnvironmentVariablesSecrets
GatewayResourceRequests
| Name |
Description |
Value |
| cpu |
Cpu allocated to each Spring Cloud Gateway instance. |
string |
| memory |
Memory allocated to each Spring Cloud Gateway instance. |
string |
Sku
| Name |
Description |
Value |
| capacity |
Current capacity of the target resource |
int |
| name |
Name of the Sku |
string |
| tier |
Tier of the Sku |
string |
SsoProperties
| Name |
Description |
Value |
| clientId |
The public identifier for the application |
string |
| clientSecret |
The secret known only to the application and the authorization server |
string |
| issuerUri |
The URI of Issuer Identifier |
string |
| scope |
It defines the specific actions applications can be allowed to do on a user's behalf |
string[] |
The Spring/gateways resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
Usage Examples
A basic example of deploying Spring Cloud Gateway.
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" "Spring" {
type = "Microsoft.AppPlatform/Spring@2023-05-01-preview"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
zoneRedundant = false
}
sku = {
name = "E0"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "gateway" {
type = "Microsoft.AppPlatform/Spring/gateways@2023-05-01-preview"
parent_id = azapi_resource.Spring.id
name = "default"
body = {
properties = {
httpsOnly = false
public = false
}
sku = {
capacity = 1
name = "E0"
tier = "Enterprise"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
To create a Microsoft.AppPlatform/Spring/gateways resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.AppPlatform/Spring/gateways@2023-12-01"
name = "string"
parent_id = "string"
body = {
properties = {
apiMetadataProperties = {
description = "string"
documentation = "string"
serverUrl = "string"
title = "string"
version = "string"
}
apms = [
{
resourceId = "string"
}
]
clientAuth = {
certificates = [
"string"
]
certificateVerification = "string"
}
corsProperties = {
allowCredentials = bool
allowedHeaders = [
"string"
]
allowedMethods = [
"string"
]
allowedOriginPatterns = [
"string"
]
allowedOrigins = [
"string"
]
exposedHeaders = [
"string"
]
maxAge = int
}
environmentVariables = {
properties = {
{customized property} = "string"
}
secrets = {
{customized property} = "string"
}
}
httpsOnly = bool
public = bool
resourceRequests = {
cpu = "string"
memory = "string"
}
ssoProperties = {
clientId = "string"
clientSecret = "string"
issuerUri = "string"
scope = [
"string"
]
}
}
sku = {
capacity = int
name = "string"
tier = "string"
}
}
}
Property Values
| Name |
Description |
Value |
| name |
The resource name |
string
Constraints: Pattern = ^[a-z][a-z0-9]*$ (required) |
| parent_id |
The ID of the resource that is the parent for this resource. |
ID for resource of type: Spring |
| properties |
Spring Cloud Gateway properties payload |
GatewayProperties |
| sku |
Sku of the Spring Cloud Gateway resource |
Sku |
| type |
The resource type |
"Microsoft.AppPlatform/Spring/gateways@2023-12-01" |
ApmReference
| Name |
Description |
Value |
| resourceId |
Resource Id of the APM |
string (required) |
| Name |
Description |
Value |
| description |
Detailed description of the APIs available on the Gateway instance (default: Generated OpenAPI 3 document that describes the API routes configured.) |
string |
| documentation |
Location of additional documentation for the APIs available on the Gateway instance |
string |
| serverUrl |
Base URL that API consumers will use to access APIs on the Gateway instance. |
string |
| title |
Title describing the context of the APIs available on the Gateway instance (default: Spring Cloud Gateway for K8S) |
string |
| version |
Version of APIs available on this Gateway instance (default: unspecified). |
string |
GatewayCorsProperties
| Name |
Description |
Value |
| allowCredentials |
Whether user credentials are supported on cross-site requests. Valid values: true, false. |
bool |
| allowedHeaders |
Allowed headers in cross-site requests. The special value * allows actual requests to send any header. |
string[] |
| allowedMethods |
Allowed HTTP methods on cross-site requests. The special value * allows all methods. If not set, GET and HEAD are allowed by default. |
string[] |
| allowedOriginPatterns |
Allowed origin patterns to make cross-site requests. |
string[] |
| allowedOrigins |
Allowed origins to make cross-site requests. The special value * allows all domains. |
string[] |
| exposedHeaders |
HTTP response headers to expose for cross-site requests. |
string[] |
| maxAge |
How long, in seconds, the response from a pre-flight request can be cached by clients. |
int |
GatewayProperties
GatewayPropertiesClientAuth
| Name |
Description |
Value |
| certificates |
Collection of certificate resource Ids in Azure Spring Apps. |
string[] |
| certificateVerification |
Whether to enable certificate verification or not |
'Disabled' 'Enabled' |
GatewayPropertiesEnvironmentVariables
GatewayPropertiesEnvironmentVariablesProperties
GatewayPropertiesEnvironmentVariablesSecrets
GatewayResourceRequests
| Name |
Description |
Value |
| cpu |
Cpu allocated to each Spring Cloud Gateway instance. |
string |
| memory |
Memory allocated to each Spring Cloud Gateway instance. |
string |
Sku
| Name |
Description |
Value |
| capacity |
Current capacity of the target resource |
int |
| name |
Name of the Sku |
string |
| tier |
Tier of the Sku |
string |
SsoProperties
| Name |
Description |
Value |
| clientId |
The public identifier for the application |
string |
| clientSecret |
The secret known only to the application and the authorization server |
string |
| issuerUri |
The URI of Issuer Identifier |
string |
| scope |
It defines the specific actions applications can be allowed to do on a user's behalf |
string[] |