azurermGalleryApplicationVersion
Manages a Gallery Application Version.
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.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example",
{
location: "West Europe",
name: "example-rg",
}
);
const azurermSharedImageGalleryExample =
new azurerm.sharedImageGallery.SharedImageGallery(this, "example_1", {
location: azurermResourceGroupExample.location,
name: "example-gallery",
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.*/
azurermSharedImageGalleryExample.overrideLogicalId("example");
const azurermStorageAccountExample = new azurerm.storageAccount.StorageAccount(
this,
"example_2",
{
account_replication_type: "LRS",
account_tier: "Standard",
location: azurermResourceGroupExample.location,
name: "example-storage",
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.*/
azurermStorageAccountExample.overrideLogicalId("example");
const azurermStorageContainerExample =
new azurerm.storageContainer.StorageContainer(this, "example_3", {
container_access_type: "blob",
name: "example-container",
storage_account_name: azurermStorageAccountExample.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.*/
azurermStorageContainerExample.overrideLogicalId("example");
const azurermGalleryApplicationExample =
new azurerm.galleryApplication.GalleryApplication(this, "example_4", {
gallery_id: azurermSharedImageGalleryExample.id,
location: azurermResourceGroupExample.location,
name: "example-app",
supported_os_type: "Linux",
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermGalleryApplicationExample.overrideLogicalId("example");
const azurermStorageBlobExample = new azurerm.storageBlob.StorageBlob(
this,
"example_5",
{
name: "scripts",
source_content: "[scripts file content]",
storage_account_name: azurermStorageAccountExample.name,
storage_container_name: azurermStorageContainerExample.name,
type: "Block",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermStorageBlobExample.overrideLogicalId("example");
const azurermGalleryApplicationVersionExample =
new azurerm.galleryApplicationVersion.GalleryApplicationVersion(
this,
"example_6",
{
gallery_application_id: azurermGalleryApplicationExample.id,
location: azurermGalleryApplicationExample.location,
manage_action: [
{
install: "[install command]",
remove: "[remove command]",
},
],
name: "0.0.1",
source: [
{
media_link: azurermStorageBlobExample.id,
},
],
target_region: [
{
name: azurermGalleryApplicationExample.location,
regional_replica_count: 1,
},
],
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermGalleryApplicationVersionExample.overrideLogicalId("example");
Arguments Reference
The following arguments are supported:
-
name
- (Required) The version name of the Gallery Application Version, such as100
. Changing this forces a new resource to be created. -
galleryApplicationId
- (Required) The ID of the Gallery Application. Changing this forces a new resource to be created. -
location
- (Required) The Azure Region where the Gallery Application Version exists. Changing this forces a new resource to be created. -
manageAction
- (Required) AmanageAction
block as defined below. -
source
- (Required) Asource
block as defined below. -
targetRegion
- (Required) One or moretargetRegion
blocks as defined below.
-
enableHealthCheck
- (Optional) Should the Gallery Application reports health. Defaults tofalse
. -
endOfLifeDate
- (Optional) The end of life date in RFC3339 format of the Gallery Application Version. -
excludeFromLatest
- (Optional) Should the Gallery Application Version be excluded from thelatest
filter? If set totrue
this Gallery Application Version won't be returned for thelatest
version. Defaults tofalse
. -
tags
- (Optional) A mapping of tags to assign to the Gallery Application Version.
A manageAction
block supports the following:
-
install
- (Required) The command to install the Gallery Application. Changing this forces a new resource to be created. -
remove
- (Required) The command to remove the Gallery Application. Changing this forces a new resource to be created. -
update
- (Optional) The command to update the Gallery Application. Changing this forces a new resource to be created.
A source
block supports the following:
-
mediaLink
- (Required) The Storage Blob URI of the source application package. Changing this forces a new resource to be created. -
defaultConfigurationLink
- (Optional) The Storage Blob URI of the default configuration. Changing this forces a new resource to be created.
A targetRegion
block supports the following:
-
name
- (Required) The Azure Region in which the Gallery Application Version exists. -
regionalReplicaCount
- (Required) The number of replicas of the Gallery Application Version to be created per region. Possible values are between1
and10
. -
storageAccountType
- (Optional) The storage account type for the Gallery Application Version. Possible values arestandardLrs
,premiumLrs
andstandardZrs
. Defaults tostandardLrs
.
Attributes Reference
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the Gallery Application Version.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Gallery Application Version.read
- (Defaults to 5 minutes) Used when retrieving the Gallery Application Version.update
- (Defaults to 30 minutes) Used when updating the Gallery Application Version.delete
- (Defaults to 30 minutes) Used when deleting the Gallery Application Version.
Import
Gallery Application Versions can be imported using the resourceId
, e.g.