1. Packages
  2. Vcd Provider
  3. API Docs
  4. getCatalogVappTemplate
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

vcd.getCatalogVappTemplate

Explore with Pulumi AI

vcd logo
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

    Provides a VMware Cloud Director vApp Template data source. A vApp Template can be used to reference an already existing vApp Template in VCD and use its data within other resources or data sources.

    Supported in provider v3.8+

    Example: Fetching a vApp Template from a Catalog

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    resources:
      my-second-vappTemplate:
        type: vcd:CatalogVappTemplate
        properties:
          # Using the data source, two properties from another vApp Templates are
          #   # used in this resource.
          #   # You can read it as "use the org from vApp Template `my-first-vapp-template`"
          #   # and "use the catalog from vApp Template `my-first-vapp-template`"
          org: ${["my-first-vapp-template"].org}
          catalogId: ${["my-first-vapp-template"].catalogId}
          # The description uses the data source to create a dynamic text
          #   # The description will become "Belongs to my-cat"
          description: Belongs to ${["my-catalog"].name}
          ovaPath: /path/to/test_vapp_template.ova
          uploadPieceSize: 5
          # Assign all the metadata from the vApp template to this new one.
          dynamic:
            - forEach: ${data.vcd_catalog_vapp_template.photon.metadata_entry}
              content:
                - key: ${metadata_entry.value.key}
                  value: ${metadata_entry.value.value}
                  type: ${metadata_entry.value.type}
                  isSystem: ${metadata_entry.value.is_system}
                  userAccess: ${metadata_entry.value.user_access}
    variables:
      my-catalog:
        fn::invoke:
          function: vcd:getCatalog
          arguments:
            org: my-org
            name: my-catalog
      my-first-vapp-template:
        fn::invoke:
          function: vcd:getCatalogVappTemplate
          arguments:
            org: my-org
            catalogId: ${["my-catalog"].id}
            name: my-first-vapp-template
    

    Example: Fetching a vApp Template from a VDC

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    resources:
      my-second-vappTemplate:
        type: vcd:CatalogVappTemplate
        properties:
          # Using the data source, two properties from another vApp Templates are
          #   # used in this resource.
          #   # You can read it as "use the org from vApp Template `my-first-vapp-template`"
          #   # and "use the catalog from vApp Template `my-first-vapp-template`"
          org: ${["my-first-vapp-template"].org}
          catalogId: ${["my-first-vapp-template"].catalogId}
          # The description uses the data source to create a dynamic text
          #   # The description will become "Belongs to my-vdc"
          description: Belongs to ${["my-vdc"].name}
          ovaPath: /path/to/test_vapp_template.ova
          uploadPieceSize: 5
          # Assign all the metadata from the vApp template to this new one.
          dynamic:
            - forEach: ${data.vcd_catalog_vapp_template.photon.metadata_entry}
              content:
                - key: ${metadata_entry.value.key}
                  value: ${metadata_entry.value.value}
                  type: ${metadata_entry.value.type}
                  isSystem: ${metadata_entry.value.is_system}
                  userAccess: ${metadata_entry.value.user_access}
    variables:
      my-vdc:
        fn::invoke:
          function: vcd:getOrgVdc
          arguments:
            org: my-org
            name: my-vdc
      my-first-vapp-template:
        fn::invoke:
          function: vcd:getCatalogVappTemplate
          arguments:
            org: my-org
            vdcId: ${["my-vdc"].id}
            name: my-first-vapp-template
    

    Filter arguments

    • name_regex - (Optional) matches the name using a regular expression.
    • date - (Optional) is an expression starting with an operator (>, <, >=, <=, ==), followed by a date, with optional spaces in between. For example: > 2020-02-01 12:35:00.523Z The filter recognizes several formats, but one of yyyy-mm-dd [hh:mm[:ss[.nnnZ]]] or dd-MMM-yyyy [hh:mm[:ss[.nnnZ]]] is recommended. Comparison with equality operator (==) need to define the date to the microseconds.
    • latest - (Optional) If true, retrieve the latest item among the ones matching other parameters. If no other parameters are set, it retrieves the newest item.
    • earliest - (Optional) If true, retrieve the earliest item among the ones matching other parameters. If no other parameters are set, it retrieves the oldest item.
    • metadata - (Optional) One or more parameters that will match metadata contents.

    See Filters reference for details and examples.

    Using getCatalogVappTemplate

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getCatalogVappTemplate(args: GetCatalogVappTemplateArgs, opts?: InvokeOptions): Promise<GetCatalogVappTemplateResult>
    function getCatalogVappTemplateOutput(args: GetCatalogVappTemplateOutputArgs, opts?: InvokeOptions): Output<GetCatalogVappTemplateResult>
    def get_catalog_vapp_template(catalog_id: Optional[str] = None,
                                  filter: Optional[GetCatalogVappTemplateFilter] = None,
                                  id: Optional[str] = None,
                                  name: Optional[str] = None,
                                  org: Optional[str] = None,
                                  vdc_id: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetCatalogVappTemplateResult
    def get_catalog_vapp_template_output(catalog_id: Optional[pulumi.Input[str]] = None,
                                  filter: Optional[pulumi.Input[GetCatalogVappTemplateFilterArgs]] = None,
                                  id: Optional[pulumi.Input[str]] = None,
                                  name: Optional[pulumi.Input[str]] = None,
                                  org: Optional[pulumi.Input[str]] = None,
                                  vdc_id: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetCatalogVappTemplateResult]
    func LookupCatalogVappTemplate(ctx *Context, args *LookupCatalogVappTemplateArgs, opts ...InvokeOption) (*LookupCatalogVappTemplateResult, error)
    func LookupCatalogVappTemplateOutput(ctx *Context, args *LookupCatalogVappTemplateOutputArgs, opts ...InvokeOption) LookupCatalogVappTemplateResultOutput

    > Note: This function is named LookupCatalogVappTemplate in the Go SDK.

    public static class GetCatalogVappTemplate 
    {
        public static Task<GetCatalogVappTemplateResult> InvokeAsync(GetCatalogVappTemplateArgs args, InvokeOptions? opts = null)
        public static Output<GetCatalogVappTemplateResult> Invoke(GetCatalogVappTemplateInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCatalogVappTemplateResult> getCatalogVappTemplate(GetCatalogVappTemplateArgs args, InvokeOptions options)
    public static Output<GetCatalogVappTemplateResult> getCatalogVappTemplate(GetCatalogVappTemplateArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vcd:index/getCatalogVappTemplate:getCatalogVappTemplate
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CatalogId string
    ID of the catalog containing the vApp Template. Can't be used if a specific VDC identifier is set (vdc_id).
    Filter GetCatalogVappTemplateFilter
    Retrieves the data source using one or more filter parameters
    Id string
    Name string
    vApp Template name (optional when filter is used)
    Org string
    Org name
    VdcId string
    ID of the VDC to which the vApp Template belongs. Can't be used if a specific Catalog is set (catalog_id).
    CatalogId string
    ID of the catalog containing the vApp Template. Can't be used if a specific VDC identifier is set (vdc_id).
    Filter GetCatalogVappTemplateFilter
    Retrieves the data source using one or more filter parameters
    Id string
    Name string
    vApp Template name (optional when filter is used)
    Org string
    Org name
    VdcId string
    ID of the VDC to which the vApp Template belongs. Can't be used if a specific Catalog is set (catalog_id).
    catalogId String
    ID of the catalog containing the vApp Template. Can't be used if a specific VDC identifier is set (vdc_id).
    filter GetCatalogVappTemplateFilter
    Retrieves the data source using one or more filter parameters
    id String
    name String
    vApp Template name (optional when filter is used)
    org String
    Org name
    vdcId String
    ID of the VDC to which the vApp Template belongs. Can't be used if a specific Catalog is set (catalog_id).
    catalogId string
    ID of the catalog containing the vApp Template. Can't be used if a specific VDC identifier is set (vdc_id).
    filter GetCatalogVappTemplateFilter
    Retrieves the data source using one or more filter parameters
    id string
    name string
    vApp Template name (optional when filter is used)
    org string
    Org name
    vdcId string
    ID of the VDC to which the vApp Template belongs. Can't be used if a specific Catalog is set (catalog_id).
    catalog_id str
    ID of the catalog containing the vApp Template. Can't be used if a specific VDC identifier is set (vdc_id).
    filter GetCatalogVappTemplateFilter
    Retrieves the data source using one or more filter parameters
    id str
    name str
    vApp Template name (optional when filter is used)
    org str
    Org name
    vdc_id str
    ID of the VDC to which the vApp Template belongs. Can't be used if a specific Catalog is set (catalog_id).
    catalogId String
    ID of the catalog containing the vApp Template. Can't be used if a specific VDC identifier is set (vdc_id).
    filter Property Map
    Retrieves the data source using one or more filter parameters
    id String
    name String
    vApp Template name (optional when filter is used)
    org String
    Org name
    vdcId String
    ID of the VDC to which the vApp Template belongs. Can't be used if a specific Catalog is set (catalog_id).

    getCatalogVappTemplate Result

    The following output properties are available:

    CatalogItemId string
    Created string
    Description string
    vApp Template description
    Id string
    InheritedMetadata Dictionary<string, string>
    Leases List<GetCatalogVappTemplateLease>
    (v3.11+) - The information about the vApp Template lease. It includes the following field:
    Metadata Dictionary<string, string>
    (Deprecated) Use metadata_entry instead. Key/value map of metadata for the associated vApp template.

    Deprecated: Deprecated

    MetadataEntries List<GetCatalogVappTemplateMetadataEntry>
    A set of metadata entries assigned to this vApp Template. See Metadata section for details.
    VmNames List<string>
    Set of VM names within the vApp template
    CatalogId string
    Filter GetCatalogVappTemplateFilter
    Name string
    Org string
    VdcId string
    CatalogItemId string
    Created string
    Description string
    vApp Template description
    Id string
    InheritedMetadata map[string]string
    Leases []GetCatalogVappTemplateLease
    (v3.11+) - The information about the vApp Template lease. It includes the following field:
    Metadata map[string]string
    (Deprecated) Use metadata_entry instead. Key/value map of metadata for the associated vApp template.

    Deprecated: Deprecated

    MetadataEntries []GetCatalogVappTemplateMetadataEntry
    A set of metadata entries assigned to this vApp Template. See Metadata section for details.
    VmNames []string
    Set of VM names within the vApp template
    CatalogId string
    Filter GetCatalogVappTemplateFilter
    Name string
    Org string
    VdcId string
    catalogItemId String
    created String
    description String
    vApp Template description
    id String
    inheritedMetadata Map<String,String>
    leases List<GetCatalogVappTemplateLease>
    (v3.11+) - The information about the vApp Template lease. It includes the following field:
    metadata Map<String,String>
    (Deprecated) Use metadata_entry instead. Key/value map of metadata for the associated vApp template.

    Deprecated: Deprecated

    metadataEntries List<GetCatalogVappTemplateMetadataEntry>
    A set of metadata entries assigned to this vApp Template. See Metadata section for details.
    vmNames List<String>
    Set of VM names within the vApp template
    catalogId String
    filter GetCatalogVappTemplateFilter
    name String
    org String
    vdcId String
    catalogItemId string
    created string
    description string
    vApp Template description
    id string
    inheritedMetadata {[key: string]: string}
    leases GetCatalogVappTemplateLease[]
    (v3.11+) - The information about the vApp Template lease. It includes the following field:
    metadata {[key: string]: string}
    (Deprecated) Use metadata_entry instead. Key/value map of metadata for the associated vApp template.

    Deprecated: Deprecated

    metadataEntries GetCatalogVappTemplateMetadataEntry[]
    A set of metadata entries assigned to this vApp Template. See Metadata section for details.
    vmNames string[]
    Set of VM names within the vApp template
    catalogId string
    filter GetCatalogVappTemplateFilter
    name string
    org string
    vdcId string
    catalog_item_id str
    created str
    description str
    vApp Template description
    id str
    inherited_metadata Mapping[str, str]
    leases Sequence[GetCatalogVappTemplateLease]
    (v3.11+) - The information about the vApp Template lease. It includes the following field:
    metadata Mapping[str, str]
    (Deprecated) Use metadata_entry instead. Key/value map of metadata for the associated vApp template.

    Deprecated: Deprecated

    metadata_entries Sequence[GetCatalogVappTemplateMetadataEntry]
    A set of metadata entries assigned to this vApp Template. See Metadata section for details.
    vm_names Sequence[str]
    Set of VM names within the vApp template
    catalog_id str
    filter GetCatalogVappTemplateFilter
    name str
    org str
    vdc_id str
    catalogItemId String
    created String
    description String
    vApp Template description
    id String
    inheritedMetadata Map<String>
    leases List<Property Map>
    (v3.11+) - The information about the vApp Template lease. It includes the following field:
    metadata Map<String>
    (Deprecated) Use metadata_entry instead. Key/value map of metadata for the associated vApp template.

    Deprecated: Deprecated

    metadataEntries List<Property Map>
    A set of metadata entries assigned to this vApp Template. See Metadata section for details.
    vmNames List<String>
    Set of VM names within the vApp template
    catalogId String
    filter Property Map
    name String
    org String
    vdcId String

    Supporting Types

    GetCatalogVappTemplateFilter

    Date string
    Search by date comparison ({>|>=|<|<=|==} yyyy-mm-dd[ hh[:mm[:ss]]])
    Earliest bool
    Retrieves the oldest item
    Latest bool
    Retrieves the newest item
    Metadatas List<GetCatalogVappTemplateFilterMetadata>
    (Deprecated) Use metadata_entry instead. Key/value map of metadata for the associated vApp template.
    NameRegex string
    Search by name with a regular expression
    Date string
    Search by date comparison ({>|>=|<|<=|==} yyyy-mm-dd[ hh[:mm[:ss]]])
    Earliest bool
    Retrieves the oldest item
    Latest bool
    Retrieves the newest item
    Metadatas []GetCatalogVappTemplateFilterMetadata
    (Deprecated) Use metadata_entry instead. Key/value map of metadata for the associated vApp template.
    NameRegex string
    Search by name with a regular expression
    date String
    Search by date comparison ({>|>=|<|<=|==} yyyy-mm-dd[ hh[:mm[:ss]]])
    earliest Boolean
    Retrieves the oldest item
    latest Boolean
    Retrieves the newest item
    metadatas List<GetCatalogVappTemplateFilterMetadata>
    (Deprecated) Use metadata_entry instead. Key/value map of metadata for the associated vApp template.
    nameRegex String
    Search by name with a regular expression
    date string
    Search by date comparison ({>|>=|<|<=|==} yyyy-mm-dd[ hh[:mm[:ss]]])
    earliest boolean
    Retrieves the oldest item
    latest boolean
    Retrieves the newest item
    metadatas GetCatalogVappTemplateFilterMetadata[]
    (Deprecated) Use metadata_entry instead. Key/value map of metadata for the associated vApp template.
    nameRegex string
    Search by name with a regular expression
    date str
    Search by date comparison ({>|>=|<|<=|==} yyyy-mm-dd[ hh[:mm[:ss]]])
    earliest bool
    Retrieves the oldest item
    latest bool
    Retrieves the newest item
    metadatas Sequence[GetCatalogVappTemplateFilterMetadata]
    (Deprecated) Use metadata_entry instead. Key/value map of metadata for the associated vApp template.
    name_regex str
    Search by name with a regular expression
    date String
    Search by date comparison ({>|>=|<|<=|==} yyyy-mm-dd[ hh[:mm[:ss]]])
    earliest Boolean
    Retrieves the oldest item
    latest Boolean
    Retrieves the newest item
    metadatas List<Property Map>
    (Deprecated) Use metadata_entry instead. Key/value map of metadata for the associated vApp template.
    nameRegex String
    Search by name with a regular expression

    GetCatalogVappTemplateFilterMetadata

    Key string
    Metadata key (field name)
    Value string
    Metadata value (can be a regular expression if "use_api_search" is false)
    IsSystem bool
    True if is a metadata@SYSTEM key
    Type string
    Type of metadata value (needed only if "use_api_search" is true)
    UseApiSearch bool
    If true, will search the vCD using native metadata query (without regular expressions)
    Key string
    Metadata key (field name)
    Value string
    Metadata value (can be a regular expression if "use_api_search" is false)
    IsSystem bool
    True if is a metadata@SYSTEM key
    Type string
    Type of metadata value (needed only if "use_api_search" is true)
    UseApiSearch bool
    If true, will search the vCD using native metadata query (without regular expressions)
    key String
    Metadata key (field name)
    value String
    Metadata value (can be a regular expression if "use_api_search" is false)
    isSystem Boolean
    True if is a metadata@SYSTEM key
    type String
    Type of metadata value (needed only if "use_api_search" is true)
    useApiSearch Boolean
    If true, will search the vCD using native metadata query (without regular expressions)
    key string
    Metadata key (field name)
    value string
    Metadata value (can be a regular expression if "use_api_search" is false)
    isSystem boolean
    True if is a metadata@SYSTEM key
    type string
    Type of metadata value (needed only if "use_api_search" is true)
    useApiSearch boolean
    If true, will search the vCD using native metadata query (without regular expressions)
    key str
    Metadata key (field name)
    value str
    Metadata value (can be a regular expression if "use_api_search" is false)
    is_system bool
    True if is a metadata@SYSTEM key
    type str
    Type of metadata value (needed only if "use_api_search" is true)
    use_api_search bool
    If true, will search the vCD using native metadata query (without regular expressions)
    key String
    Metadata key (field name)
    value String
    Metadata value (can be a regular expression if "use_api_search" is false)
    isSystem Boolean
    True if is a metadata@SYSTEM key
    type String
    Type of metadata value (needed only if "use_api_search" is true)
    useApiSearch Boolean
    If true, will search the vCD using native metadata query (without regular expressions)

    GetCatalogVappTemplateLease

    StorageLeaseInSec double
    How long the vApp Template is available before being automatically deleted or marked as expired. 0 means never expires (or maximum allowed by parent Org allows).
    StorageLeaseInSec float64
    How long the vApp Template is available before being automatically deleted or marked as expired. 0 means never expires (or maximum allowed by parent Org allows).
    storageLeaseInSec Double
    How long the vApp Template is available before being automatically deleted or marked as expired. 0 means never expires (or maximum allowed by parent Org allows).
    storageLeaseInSec number
    How long the vApp Template is available before being automatically deleted or marked as expired. 0 means never expires (or maximum allowed by parent Org allows).
    storage_lease_in_sec float
    How long the vApp Template is available before being automatically deleted or marked as expired. 0 means never expires (or maximum allowed by parent Org allows).
    storageLeaseInSec Number
    How long the vApp Template is available before being automatically deleted or marked as expired. 0 means never expires (or maximum allowed by parent Org allows).

    GetCatalogVappTemplateMetadataEntry

    IsSystem bool
    Key string
    Type string
    UserAccess string
    Value string
    IsSystem bool
    Key string
    Type string
    UserAccess string
    Value string
    isSystem Boolean
    key String
    type String
    userAccess String
    value String
    isSystem boolean
    key string
    type string
    userAccess string
    value string
    isSystem Boolean
    key String
    type String
    userAccess String
    value String

    Package Details

    Repository
    vcd vmware/terraform-provider-vcd
    License
    Notes
    This Pulumi package is based on the vcd Terraform Provider.
    vcd logo
    vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware