Skip to content

azurermSpringCloudApiPortalCustomDomain

Manages a Spring Cloud API Portal Domain.

-> NOTE: This resource is applicable only for Spring Cloud Service with enterprise tier.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.provider.AzurermProvider(this, "azurerm", {
  features: [{}],
});
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "example-resources",
  }
);
const azurermSpringCloudServiceExample =
  new azurerm.springCloudService.SpringCloudService(this, "example_2", {
    location: azurermResourceGroupExample.location,
    name: "example",
    resource_group_name: azurermResourceGroupExample.name,
    sku_name: "E0",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermSpringCloudServiceExample.overrideLogicalId("example");
const azurermSpringCloudGatewayExample =
  new azurerm.springCloudGateway.SpringCloudGateway(this, "example_3", {
    name: "default",
    spring_cloud_service_id: azurermSpringCloudServiceExample.id,
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermSpringCloudGatewayExample.overrideLogicalId("example");
const azurermSpringCloudApiPortalExample =
  new azurerm.springCloudApiPortal.SpringCloudApiPortal(this, "example_4", {
    gateway_ids: [azurermSpringCloudGatewayExample.id],
    name: "default",
    spring_cloud_service_id: azurermSpringCloudServiceExample.id,
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermSpringCloudApiPortalExample.overrideLogicalId("example");
const azurermSpringCloudApiPortalCustomDomainExample =
  new azurerm.springCloudApiPortalCustomDomain.SpringCloudApiPortalCustomDomain(
    this,
    "example_5",
    {
      name: "example.com",
      spring_cloud_api_portal_id: azurermSpringCloudApiPortalExample.id,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermSpringCloudApiPortalCustomDomainExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • name - (Required) The name which should be used for this Spring Cloud API Portal Domain. Changing this forces a new Spring Cloud API Portal Domain to be created.

  • springCloudApiPortalId - (Required) The ID of the Spring Cloud API Portal. Changing this forces a new Spring Cloud API Portal Domain to be created.


  • thumbprint - (Optional) Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud API Portal Domain.

Attributes Reference

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

  • id - The ID of the Spring Cloud API Portal Domain.

Timeouts

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

  • create - (Defaults to 30 minutes) Used when creating the Spring Cloud API Portal Domain.
  • read - (Defaults to 5 minutes) Used when retrieving the Spring Cloud API Portal Domain.
  • update - (Defaults to 30 minutes) Used when updating the Spring Cloud API Portal Domain.
  • delete - (Defaults to 30 minutes) Used when deleting the Spring Cloud API Portal Domain.

Import

Spring Cloud API Portal Domains can be imported using the resourceId, e.g.

terraform import azurerm_spring_cloud_api_portal_custom_domain.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.AppPlatform/spring/service1/apiPortals/apiPortal1/domains/domain1