Skip to content

azurermSharedImageGallery

Manages a Shared Image Gallery.

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-resources",
  }
);
const azurermSharedImageGalleryExample =
  new azurerm.sharedImageGallery.SharedImageGallery(this, "example_1", {
    description: "Shared images and things.",
    location: azurermResourceGroupExample.location,
    name: "example_image_gallery",
    resource_group_name: azurermResourceGroupExample.name,
    tags: {
      Hello: "There",
      World: "Example",
    },
  });
/*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");

Argument Reference

The following arguments are supported:

  • name - (Required) Specifies the name of the Shared Image Gallery. Changing this forces a new resource to be created.

  • resourceGroupName - (Required) The name of the resource group in which to create the Shared Image Gallery. Changing this forces a new resource to be created.

  • location - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • description - (Optional) A description for this Shared Image Gallery.

  • tags - (Optional) A mapping of tags to assign to the Shared Image Gallery.

Attributes Reference

The following attributes are exported:

  • id - The ID of the Shared Image Gallery.

  • uniqueName - The Unique Name for this Shared Image Gallery.

Timeouts

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

  • create - (Defaults to 30 minutes) Used when creating the Shared Image Gallery.
  • update - (Defaults to 30 minutes) Used when updating the Shared Image Gallery.
  • read - (Defaults to 5 minutes) Used when retrieving the Shared Image Gallery.
  • delete - (Defaults to 30 minutes) Used when deleting the Shared Image Gallery.

Import

Shared Image Galleries can be imported using the resourceId, e.g.

terraform import azurerm_shared_image_gallery.gallery1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/galleries/gallery1