Skip to content

azurermSpringCloudConfigurationService

Manages a Spring Cloud Configuration Service.

-> 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",
  }
);
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 azurermSpringCloudConfigurationServiceExample =
  new azurerm.springCloudConfigurationService.SpringCloudConfigurationService(
    this,
    "example_3",
    {
      name: "default",
      repository: [
        {
          label: "master",
          name: "fake",
          password: "H@Sh1CoR3!",
          patterns: ["app/dev"],
          search_paths: ["dir1", "dir2"],
          strict_host_key_checking: false,
          uri: "https://github.com/Azure-Samples/piggymetrics",
          username: "adminuser",
        },
      ],
      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.*/
azurermSpringCloudConfigurationServiceExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • name - (Required) The name which should be used for this Spring Cloud Configuration Service. The only possible value is default. Changing this forces a new Spring Cloud Configuration Service to be created.

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


  • repository - (Optional) One or more repository blocks as defined below.

A repository block supports the following:

  • label - (Required) Specifies the label of the repository.

  • name - (Required) Specifies the name which should be used for this repository.

  • patterns - (Required) Specifies the collection of patterns of the repository.

  • uri - (Required) Specifies the URI of the repository.

  • hostKey - (Optional) Specifies the SSH public key of git repository.

  • hostKeyAlgorithm - (Optional) Specifies the SSH key algorithm of git repository.

  • password - (Optional) Specifies the password of git repository basic auth.

  • privateKey - (Optional) Specifies the SSH private key of git repository.

  • searchPaths - (Optional) Specifies a list of searching path of the repository

  • strictHostKeyChecking - (Optional) Specifies whether enable the strict host key checking.

  • username - (Optional) Specifies the username of git repository basic auth.

Attributes Reference

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

  • id - The ID of the Spring Cloud Configuration Service.

Timeouts

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

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

Import

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

terraform import azurerm_spring_cloud_configuration_service.example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroup1/providers/Microsoft.AppPlatform/spring/service1/configurationServices/configurationService1