GetCustomAttribute
The vsphere..CustomAttribute data source can be used to reference custom
attributes that are not managed by this provider. Its attributes are exactly the
same as the vsphere..CustomAttribute resource,
and, like importing, the data source takes a name to search on. The id and
other attributes are then populated with the data found by the search.
NOTE: Custom attributes are unsupported on direct ESXi connections and require vCenter.
Example Usage
using Pulumi;
using VSphere = Pulumi.VSphere;
class MyStack : Stack
{
public MyStack()
{
var attribute = Output.Create(VSphere.GetCustomAttribute.InvokeAsync(new VSphere.GetCustomAttributeArgs
{
Name = "test-attribute",
}));
}
}
Coming soon!
import pulumi
import pulumi_vsphere as vsphere
attribute = vsphere.get_custom_attribute(name="test-attribute")import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";
const attribute = pulumi.output(vsphere.getCustomAttribute({
name: "test-attribute",
}, { async: true }));Using GetCustomAttribute
function getCustomAttribute(args: GetCustomAttributeArgs, opts?: InvokeOptions): Promise<GetCustomAttributeResult>function get_custom_attribute(name=None, opts=None)func LookupCustomAttribute(ctx *Context, args *LookupCustomAttributeArgs, opts ...InvokeOption) (*LookupCustomAttributeResult, error)Note: This function is named
LookupCustomAttributein the Go SDK.
public static class GetCustomAttribute {
public static Task<GetCustomAttributeResult> InvokeAsync(GetCustomAttributeArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetCustomAttribute Result
The following output properties are available:
Package Details
- Repository
- https://github.com/pulumi/pulumi-vsphere
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vsphereTerraform Provider.