azurermSpringCloudJavaDeployment
Manages an Azure Spring Cloud Deployment with a Java runtime.
-> NOTE: This resource is applicable only for Spring Cloud Service with basic and standard 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,
});
/*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 azurermSpringCloudAppExample = new azurerm.springCloudApp.SpringCloudApp(
this,
"example_3",
{
identity: [
{
type: "SystemAssigned",
},
],
name: "example-springcloudapp",
resource_group_name: azurermResourceGroupExample.name,
service_name: azurermSpringCloudServiceExample.name,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermSpringCloudAppExample.overrideLogicalId("example");
const azurermSpringCloudJavaDeploymentExample =
new azurerm.springCloudJavaDeployment.SpringCloudJavaDeployment(
this,
"example_4",
{
environment_variables: [
{
Env: "Staging",
Foo: "Bar",
},
],
instance_count: 2,
jvm_options: "-XX:+PrintGC",
name: "deploy1",
quota: [
{
cpu: "2",
memory: "4Gi",
},
],
runtime_version: "Java_11",
spring_cloud_app_id: azurermSpringCloudAppExample.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.*/
azurermSpringCloudJavaDeploymentExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
-
name
- (Required) Specifies the name of the Spring Cloud Deployment. Changing this forces a new resource to be created. -
springCloudAppId
- (Required) Specifies the id of the Spring Cloud Application in which to create the Deployment. Changing this forces a new resource to be created. -
environmentVariables
- (Optional) Specifies the environment variables of the Spring Cloud Deployment as a map of key-value pairs. -
instanceCount
- (Optional) Specifies the required instance count of the Spring Cloud Deployment. Possible Values are between1
and500
. Defaults to1
if not specified. -
jvmOptions
- (Optional) Specifies the jvm option of the Spring Cloud Deployment. -
quota
- (Optional) Aquota
block as defined below. -
runtimeVersion
- (Optional) Specifies the runtime version of the Spring Cloud Deployment. Possible Values arejava8
,java11
andjava17
. Defaults tojava8
.
The quota
block supports the following:
cpu
- (Optional) Specifies the required cpu of the Spring Cloud Deployment. Possible Values are500M
,1
,2
,3
and4
. Defaults to1
if not specified.
-> Note: cpu
supports 500M
and 1
for Basic tier, 500M
, 1
, 2
, 3
and 4
for Standard tier.
memory
- (Optional) Specifies the required memory size of the Spring Cloud Deployment. Possible Values are512Mi
,1Gi
,2Gi
,3Gi
,4Gi
,5Gi
,6Gi
,7Gi
, and8Gi
. Defaults to1Gi
if not specified.
-> Note: memory
supports 512Mi
, 1Gi
and 2Gi
for Basic tier, 512Mi
, 1Gi
, 2Gi
, 3Gi
, 4Gi
, 5Gi
, 6Gi
, 7Gi
, and 8Gi
for Standard tier.
Attributes Reference
The following attributes are exported:
id
- The ID of the Spring Cloud Deployment.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Spring Cloud Deployment.read
- (Defaults to 5 minutes) Used when retrieving the Spring Cloud Deployment.update
- (Defaults to 30 minutes) Used when updating the Spring Cloud Deployment.delete
- (Defaults to 30 minutes) Used when deleting the Spring Cloud Deployment.
Import
Spring Cloud Deployment can be imported using the resourceId
, e.g.