1. Packages
  2. HCP
  3. API Docs
  4. getConsulVersions
HashiCorp Cloud Platform (HCP) v0.1.14 published on Friday, Dec 2, 2022 by Grapl Security

hcp.getConsulVersions

Explore with Pulumi AI

hcp logo
HashiCorp Cloud Platform (HCP) v0.1.14 published on Friday, Dec 2, 2022 by Grapl Security

    The Consul versions data source provides the Consul versions supported by HCP.

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Hcp = Pulumi.Hcp;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = Hcp.GetConsulVersions.Invoke();
    
    });
    
    package main
    
    import (
    	"github.com/grapl-security/pulumi-hcp/sdk/go/hcp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := hcp.GetConsulVersions(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.hcp.HcpFunctions;
    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 default = HcpFunctions.getConsulVersions();
    
        }
    }
    
    import pulumi
    import pulumi_hcp as hcp
    
    default = hcp.get_consul_versions()
    
    import * as pulumi from "@pulumi/pulumi";
    import * as hcp from "@pulumi/hcp";
    
    const defaultConsulVersions = pulumi.output(hcp.getConsulVersions());
    
    variables:
      default:
        Fn::Invoke:
          Function: hcp:getConsulVersions
          Arguments: {}
    

    Using getConsulVersions

    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 getConsulVersions(opts?: InvokeOptions): Promise<GetConsulVersionsResult>
    function getConsulVersionsOutput(opts?: InvokeOptions): Output<GetConsulVersionsResult>
    def get_consul_versions(opts: Optional[InvokeOptions] = None) -> GetConsulVersionsResult
    def get_consul_versions_output(opts: Optional[InvokeOptions] = None) -> Output[GetConsulVersionsResult]
    func GetConsulVersions(ctx *Context, opts ...InvokeOption) (*GetConsulVersionsResult, error)
    func GetConsulVersionsOutput(ctx *Context, opts ...InvokeOption) GetConsulVersionsResultOutput

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

    public static class GetConsulVersions 
    {
        public static Task<GetConsulVersionsResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetConsulVersionsResult> Invoke(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetConsulVersionsResult> getConsulVersions(InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: hcp:index/getConsulVersions:getConsulVersions
      arguments:
        # arguments dictionary

    getConsulVersions Result

    The following output properties are available:

    Availables List<string>
    The Consul versions available on HCP.
    Id string
    The provider-assigned unique ID for this managed resource.
    Previews List<string>
    The preview versions of Consul available on HCP.
    Recommended string
    The recommended Consul version for HCP clusters.
    Availables []string
    The Consul versions available on HCP.
    Id string
    The provider-assigned unique ID for this managed resource.
    Previews []string
    The preview versions of Consul available on HCP.
    Recommended string
    The recommended Consul version for HCP clusters.
    availables List<String>
    The Consul versions available on HCP.
    id String
    The provider-assigned unique ID for this managed resource.
    previews List<String>
    The preview versions of Consul available on HCP.
    recommended String
    The recommended Consul version for HCP clusters.
    availables string[]
    The Consul versions available on HCP.
    id string
    The provider-assigned unique ID for this managed resource.
    previews string[]
    The preview versions of Consul available on HCP.
    recommended string
    The recommended Consul version for HCP clusters.
    availables Sequence[str]
    The Consul versions available on HCP.
    id str
    The provider-assigned unique ID for this managed resource.
    previews Sequence[str]
    The preview versions of Consul available on HCP.
    recommended str
    The recommended Consul version for HCP clusters.
    availables List<String>
    The Consul versions available on HCP.
    id String
    The provider-assigned unique ID for this managed resource.
    previews List<String>
    The preview versions of Consul available on HCP.
    recommended String
    The recommended Consul version for HCP clusters.

    Package Details

    Repository
    hcp grapl-security/pulumi-hcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the hcp Terraform Provider.
    hcp logo
    HashiCorp Cloud Platform (HCP) v0.1.14 published on Friday, Dec 2, 2022 by Grapl Security