azurerm_spring_cloud_gateway

Manages a Spring Cloud Gateway.

Example Usage

provider "azurerm" {
  features {}
}

resource "azurerm_resource_group" "example" {
  name     = "example"
  location = "West Europe"
}

resource "azurerm_spring_cloud_service" "example" {
  name                = "example"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  sku_name            = "E0"
}

resource "azurerm_spring_cloud_gateway" "example" {
  name                    = "default"
  spring_cloud_service_id = azurerm_spring_cloud_service.example.id

  https_only                    = false
  public_network_access_enabled = true
  instance_count                = 2

  api_metadata {
    description       = "example description"
    documentation_url = "https://www.example.com/docs"
    server_url        = "https://wwww.example.com"
    title             = "example title"
    version           = "1.0"
  }

  cors {
    credentials_allowed = false
    allowed_headers     = ["*"]
    allowed_methods     = ["PUT"]
    allowed_origins     = ["example.com"]
    exposed_headers     = ["x-example-header"]
    max_age_seconds     = 86400
  }

  quota {
    cpu    = "1"
    memory = "2Gi"
  }

  sso {
    client_id     = "example id"
    client_secret = "example secret"
    issuer_uri    = "https://www.test.com/issueToken"
    scope         = ["read"]
  }

  local_response_cache_per_instance {
    size         = "100MB"
    time_to_live = "30s"
  }
}

Arguments Reference

The following arguments are supported:



A api_metadata block supports the following:


A client_authorization block supports the following:


A cors block supports the following:


A local_response_cache_per_route block supports the following:


A local_response_cache_per_instance block supports the following:


The quota block supports the following:


A sso block supports the following:

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

Spring Cloud Gateways can be imported using the resource id, e.g.

terraform import azurerm_spring_cloud_gateway.example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroup1/providers/Microsoft.AppPlatform/spring/service1/gateways/gateway1