1. Packages
  2. vSphere
  3. API Docs
  4. getHostThumbprint
vSphere v4.11.2 published on Tuesday, Sep 17, 2024 by Pulumi

vsphere.getHostThumbprint

Explore with Pulumi AI

vsphere logo
vSphere v4.11.2 published on Tuesday, Sep 17, 2024 by Pulumi

    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:

    Address string
    The address of the ESXi host to retrieve the thumbprint from.
    Insecure bool
    Disables SSL certificate verification. Default: false
    Port string
    The port to use connecting to the ESXi host. Default: 443
    Address string
    The address of the ESXi host to retrieve the thumbprint from.
    Insecure bool
    Disables SSL certificate verification. Default: false
    Port string
    The port to use connecting to the ESXi host. Default: 443
    address String
    The address of the ESXi host to retrieve the thumbprint from.
    insecure Boolean
    Disables SSL certificate verification. Default: false
    port String
    The port to use connecting to the ESXi host. Default: 443
    address string
    The address of the ESXi host to retrieve the thumbprint from.
    insecure boolean
    Disables SSL certificate verification. Default: false
    port string
    The port to use connecting to the ESXi host. Default: 443
    address str
    The address of the ESXi host to retrieve the thumbprint from.
    insecure bool
    Disables SSL certificate verification. Default: false
    port str
    The port to use connecting to the ESXi host. Default: 443
    address String
    The address of the ESXi host to retrieve the thumbprint from.
    insecure Boolean
    Disables SSL certificate verification. Default: false
    port String
    The port to use connecting to the ESXi host. Default: 443

    getHostThumbprint Result

    The following output properties are available:

    Address string
    Id string
    The provider-assigned unique ID for this managed resource.
    Insecure bool
    Port string
    Address string
    Id string
    The provider-assigned unique ID for this managed resource.
    Insecure bool
    Port string
    address String
    id String
    The provider-assigned unique ID for this managed resource.
    insecure Boolean
    port String
    address string
    id string
    The provider-assigned unique ID for this managed resource.
    insecure boolean
    port string
    address str
    id str
    The provider-assigned unique ID for this managed resource.
    insecure bool
    port str
    address String
    id String
    The provider-assigned unique ID for this managed resource.
    insecure Boolean
    port String

    Package Details

    Repository
    vSphere pulumi/pulumi-vsphere
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vsphere Terraform Provider.
    vsphere logo
    vSphere v4.11.2 published on Tuesday, Sep 17, 2024 by Pulumi