Skip to content

azurermSpringCloudBuilder

Manages a Spring Cloud Builder.

-> 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-springcloud",
    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 azurermSpringCloudBuilderExample =
  new azurerm.springCloudBuilder.SpringCloudBuilder(this, "example_3", {
    build_pack_group: [
      {
        build_pack_ids: ["tanzu-buildpacks/java-azure"],
        name: "mix",
      },
    ],
    name: "example",
    spring_cloud_service_id: azurermSpringCloudServiceExample.id,
    stack: [
      {
        id: "io.buildpacks.stacks.bionic",
        version: "base",
      },
    ],
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermSpringCloudBuilderExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

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

  • springCloudServiceId - (Required) The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Builder to be created.

  • buildPackGroup - (Required) One or more buildPackGroup blocks as defined below.

  • stack - (Required) A stack block as defined below.


A buildPackGroup block supports the following:

  • name - (Required) The name which should be used for this build pack group.

  • buildPackIds - (Optional) Specifies a list of the build pack's ID.


A stack block supports the following:

  • id - (Required) Specifies the ID of the ClusterStack.

  • version - (Required) Specifies the version of the ClusterStack

Attributes Reference

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

  • id - The ID of the Spring Cloud Builder.

Timeouts

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

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

Import

Spring Cloud Builders can be imported using the resourceId, e.g.

terraform import azurerm_spring_cloud_builder.example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroup1/providers/Microsoft.AppPlatform/spring/service1/buildServices/buildService1/builders/builder1