vSphere v4.10.1 published on Friday, May 10, 2024 by Pulumi
vsphere.getHostThumbprint
Explore with Pulumi AI
The vsphere_thumbprint
data source can be used to discover the host
thumbprint of an ESXi host. This can be used when adding the vsphere.Host
resource. If the ESXi host is using a certificate chain, the first one returned
will be used to generate the thumbprint.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";
const thumbprint = vsphere.getHostThumbprint({
address: "esxi-01.example.com",
});
import pulumi
import pulumi_vsphere as vsphere
thumbprint = vsphere.get_host_thumbprint(address="esxi-01.example.com")
package main
import (
"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vsphere.GetHostThumbprint(ctx, &vsphere.GetHostThumbprintArgs{
Address: "esxi-01.example.com",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using VSphere = Pulumi.VSphere;
return await Deployment.RunAsync(() =>
{
var thumbprint = VSphere.GetHostThumbprint.Invoke(new()
{
Address = "esxi-01.example.com",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vsphere.VsphereFunctions;
import com.pulumi.vsphere.inputs.GetHostThumbprintArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var thumbprint = VsphereFunctions.getHostThumbprint(GetHostThumbprintArgs.builder()
.address("esxi-01.example.com")
.build());
}
}
variables:
thumbprint:
fn::invoke:
Function: vsphere:getHostThumbprint
Arguments:
address: esxi-01.example.com
Using getHostThumbprint
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 getHostThumbprint(args: GetHostThumbprintArgs, opts?: InvokeOptions): Promise<GetHostThumbprintResult>
function getHostThumbprintOutput(args: GetHostThumbprintOutputArgs, opts?: InvokeOptions): Output<GetHostThumbprintResult>
def get_host_thumbprint(address: Optional[str] = None,
insecure: Optional[bool] = None,
port: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetHostThumbprintResult
def get_host_thumbprint_output(address: Optional[pulumi.Input[str]] = None,
insecure: Optional[pulumi.Input[bool]] = None,
port: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetHostThumbprintResult]
func GetHostThumbprint(ctx *Context, args *GetHostThumbprintArgs, opts ...InvokeOption) (*GetHostThumbprintResult, error)
func GetHostThumbprintOutput(ctx *Context, args *GetHostThumbprintOutputArgs, opts ...InvokeOption) GetHostThumbprintResultOutput
> Note: This function is named GetHostThumbprint
in the Go SDK.
public static class GetHostThumbprint
{
public static Task<GetHostThumbprintResult> InvokeAsync(GetHostThumbprintArgs args, InvokeOptions? opts = null)
public static Output<GetHostThumbprintResult> Invoke(GetHostThumbprintInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetHostThumbprintResult> getHostThumbprint(GetHostThumbprintArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: vsphere:index/getHostThumbprint:getHostThumbprint
arguments:
# arguments dictionary
The following arguments are supported:
getHostThumbprint Result
The following output properties are available:
Package Details
- Repository
- vSphere pulumi/pulumi-vsphere
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vsphere
Terraform Provider.