vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware
vcd.getCatalogVappTemplate
Explore with Pulumi AI
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 ofyyyy-mm-dd [hh:mm[:ss[.nnnZ]]]
ordd-MMM-yyyy [hh:mm[:ss[.nnnZ]]]
is recommended. Comparison with equality operator (==
) need to define the date to the microseconds.latest
- (Optional) Iftrue
, retrieve the latest item among the ones matching other parameters. If no other parameters are set, it retrieves the newest item.earliest
- (Optional) Iftrue
, 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:
- Catalog
Id string - ID of the catalog containing the vApp Template. Can't be used if a specific VDC identifier is set (
vdc_id
). - Filter
Get
Catalog Vapp Template Filter - 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
- Vdc
Id 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 string - ID of the catalog containing the vApp Template. Can't be used if a specific VDC identifier is set (
vdc_id
). - Filter
Get
Catalog Vapp Template Filter - 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
- Vdc
Id 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 String - ID of the catalog containing the vApp Template. Can't be used if a specific VDC identifier is set (
vdc_id
). - filter
Get
Catalog Vapp Template Filter - 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
- vdc
Id 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 string - ID of the catalog containing the vApp Template. Can't be used if a specific VDC identifier is set (
vdc_id
). - filter
Get
Catalog Vapp Template Filter - 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
- vdc
Id 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
Get
Catalog Vapp Template Filter - 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
).
- catalog
Id 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
- vdc
Id 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:
- Catalog
Item stringId - Created string
- Description string
- vApp Template description
- Id string
- Inherited
Metadata Dictionary<string, string> - Leases
List<Get
Catalog Vapp Template Lease> - (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. - Metadata
Entries List<GetCatalog Vapp Template Metadata Entry> - A set of metadata entries assigned to this vApp Template. See Metadata section for details.
- Vm
Names List<string> - Set of VM names within the vApp template
- Catalog
Id string - Filter
Get
Catalog Vapp Template Filter - Name string
- Org string
- Vdc
Id string
- Catalog
Item stringId - Created string
- Description string
- vApp Template description
- Id string
- Inherited
Metadata map[string]string - Leases
[]Get
Catalog Vapp Template Lease - (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. - Metadata
Entries []GetCatalog Vapp Template Metadata Entry - A set of metadata entries assigned to this vApp Template. See Metadata section for details.
- Vm
Names []string - Set of VM names within the vApp template
- Catalog
Id string - Filter
Get
Catalog Vapp Template Filter - Name string
- Org string
- Vdc
Id string
- catalog
Item StringId - created String
- description String
- vApp Template description
- id String
- inherited
Metadata Map<String,String> - leases
List<Get
Catalog Vapp Template Lease> - (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. - metadata
Entries List<GetCatalog Vapp Template Metadata Entry> - A set of metadata entries assigned to this vApp Template. See Metadata section for details.
- vm
Names List<String> - Set of VM names within the vApp template
- catalog
Id String - filter
Get
Catalog Vapp Template Filter - name String
- org String
- vdc
Id String
- catalog
Item stringId - created string
- description string
- vApp Template description
- id string
- inherited
Metadata {[key: string]: string} - leases
Get
Catalog Vapp Template Lease[] - (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. - metadata
Entries GetCatalog Vapp Template Metadata Entry[] - A set of metadata entries assigned to this vApp Template. See Metadata section for details.
- vm
Names string[] - Set of VM names within the vApp template
- catalog
Id string - filter
Get
Catalog Vapp Template Filter - name string
- org string
- vdc
Id string
- catalog_
item_ strid - created str
- description str
- vApp Template description
- id str
- inherited_
metadata Mapping[str, str] - leases
Sequence[Get
Catalog Vapp Template Lease] - (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. - metadata_
entries Sequence[GetCatalog Vapp Template Metadata Entry] - 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
Get
Catalog Vapp Template Filter - name str
- org str
- vdc_
id str
- catalog
Item StringId - created String
- description String
- vApp Template description
- id String
- inherited
Metadata 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. - metadata
Entries List<Property Map> - A set of metadata entries assigned to this vApp Template. See Metadata section for details.
- vm
Names List<String> - Set of VM names within the vApp template
- catalog
Id String - filter Property Map
- name String
- org String
- vdc
Id 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<Get
Catalog Vapp Template Filter Metadata> - (Deprecated) Use
metadata_entry
instead. Key/value map of metadata for the associated vApp template. - Name
Regex 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
[]Get
Catalog Vapp Template Filter Metadata - (Deprecated) Use
metadata_entry
instead. Key/value map of metadata for the associated vApp template. - Name
Regex 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<Get
Catalog Vapp Template Filter Metadata> - (Deprecated) Use
metadata_entry
instead. Key/value map of metadata for the associated vApp template. - name
Regex 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
Get
Catalog Vapp Template Filter Metadata[] - (Deprecated) Use
metadata_entry
instead. Key/value map of metadata for the associated vApp template. - name
Regex 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[Get
Catalog Vapp Template Filter Metadata] - (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. - name
Regex 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)
- Is
System bool - True if is a metadata@SYSTEM key
- Type string
- Type of metadata value (needed only if "use_api_search" is true)
- Use
Api boolSearch - 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)
- Is
System bool - True if is a metadata@SYSTEM key
- Type string
- Type of metadata value (needed only if "use_api_search" is true)
- Use
Api boolSearch - 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)
- is
System Boolean - True if is a metadata@SYSTEM key
- type String
- Type of metadata value (needed only if "use_api_search" is true)
- use
Api BooleanSearch - 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)
- is
System boolean - True if is a metadata@SYSTEM key
- type string
- Type of metadata value (needed only if "use_api_search" is true)
- use
Api booleanSearch - 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_ boolsearch - 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)
- is
System Boolean - True if is a metadata@SYSTEM key
- type String
- Type of metadata value (needed only if "use_api_search" is true)
- use
Api BooleanSearch - If true, will search the vCD using native metadata query (without regular expressions)
GetCatalogVappTemplateLease
- Storage
Lease doubleIn Sec - 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 float64In Sec - 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 DoubleIn Sec - 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 numberIn Sec - 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_ floatin_ sec - 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 NumberIn Sec - 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
- Is
System bool - Key string
- Type string
- User
Access string - Value string
- Is
System bool - Key string
- Type string
- User
Access string - Value string
- is
System Boolean - key String
- type String
- user
Access String - value String
- is
System boolean - key string
- type string
- user
Access string - value string
- is_
system bool - key str
- type str
- user_
access str - value str
- is
System Boolean - key String
- type String
- user
Access String - value String
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.