Expand description
Manages a Gallery Application Version.
§Example Usage
ⓘ
use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
let example = resource_group::create(
"example",
ResourceGroupArgs::builder()
.location("West Europe")
.name("example-rg")
.build_struct(),
);
let exampleAccount = account::create(
"exampleAccount",
AccountArgs::builder()
.account_replication_type("LRS")
.account_tier("Standard")
.location("${example.location}")
.name("examplestorage")
.resource_group_name("${example.name}")
.build_struct(),
);
let exampleBlob = blob::create(
"exampleBlob",
BlobArgs::builder()
.name("scripts")
.source_content("[scripts file content]")
.storage_account_name("${exampleAccount.name}")
.storage_container_name("${exampleContainer.name}")
.type_("Block")
.build_struct(),
);
let exampleContainer = container::create(
"exampleContainer",
ContainerArgs::builder()
.container_access_type("blob")
.name("example-container")
.storage_account_name("${exampleAccount.name}")
.build_struct(),
);
let exampleGalleryApplication = gallery_application::create(
"exampleGalleryApplication",
GalleryApplicationArgs::builder()
.gallery_id("${exampleSharedImageGallery.id}")
.location("${example.location}")
.name("example-app")
.supported_os_type("Linux")
.build_struct(),
);
let exampleGalleryApplicationVersion = gallery_application_version::create(
"exampleGalleryApplicationVersion",
GalleryApplicationVersionArgs::builder()
.gallery_application_id("${exampleGalleryApplication.id}")
.location("${exampleGalleryApplication.location}")
.manage_action(
GalleryApplicationVersionManageAction::builder()
.install("[install command]")
.remove("[remove command]")
.build_struct(),
)
.name("0.0.1")
.source(
GalleryApplicationVersionSource::builder()
.mediaLink("${exampleBlob.id}")
.build_struct(),
)
.target_regions(
vec![
GalleryApplicationVersionTargetRegion::builder()
.name("${exampleGalleryApplication.location}")
.regionalReplicaCount(1).build_struct(),
],
)
.build_struct(),
);
let exampleSharedImageGallery = shared_image_gallery::create(
"exampleSharedImageGallery",
SharedImageGalleryArgs::builder()
.location("${example.location}")
.name("examplegallery")
.resource_group_name("${example.name}")
.build_struct(),
);
}
§Import
Gallery Application Versions can be imported using the resource id
, e.g.
$ pulumi import azure:compute/galleryApplicationVersion:GalleryApplicationVersion example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/galleries/gallery1/applications/galleryApplication1/versions/galleryApplicationVersion1
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments