1. Packages
  2. Harness Provider
  3. API Docs
  4. platform
  5. getDelegateDefaultVersion
Viewing docs for Harness v0.11.8
published on Friday, Mar 27, 2026 by Pulumi
harness logo
Viewing docs for Harness v0.11.8
published on Friday, Mar 27, 2026 by Pulumi

    Data source for retrieving the latest supported Harness delegate version.

    By default, customers will often want to pull the most recent version of the delegate image to store within their own container registry or would like to build a new custom delegate based on the same. This data source exposes that version information at account, org, or project scope via Terraform, eliminating the need for a custom script or manual lookup.

    Example Usage

    Account level — implicit account from provider

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    const account = harness.platform.getDelegateDefaultVersion({});
    export const delegateVersion = account.then(account => account.version);
    export const delegateMinimalVersion = account.then(account => account.minimalVersion);
    
    import pulumi
    import pulumi_harness as harness
    
    account = harness.platform.get_delegate_default_version()
    pulumi.export("delegateVersion", account.version)
    pulumi.export("delegateMinimalVersion", account.minimal_version)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		account, err := platform.GetDelegateDefaultVersion(ctx, &platform.GetDelegateDefaultVersionArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("delegateVersion", account.Version)
    		ctx.Export("delegateMinimalVersion", account.MinimalVersion)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        var account = Harness.Platform.GetDelegateDefaultVersion.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["delegateVersion"] = account.Apply(getDelegateDefaultVersionResult => getDelegateDefaultVersionResult.Version),
            ["delegateMinimalVersion"] = account.Apply(getDelegateDefaultVersionResult => getDelegateDefaultVersionResult.MinimalVersion),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harness.platform.PlatformFunctions;
    import com.pulumi.harness.platform.inputs.GetDelegateDefaultVersionArgs;
    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 account = PlatformFunctions.getDelegateDefaultVersion(GetDelegateDefaultVersionArgs.builder()
                .build());
    
            ctx.export("delegateVersion", account.version());
            ctx.export("delegateMinimalVersion", account.minimalVersion());
        }
    }
    
    variables:
      account:
        fn::invoke:
          function: harness:platform:getDelegateDefaultVersion
          arguments: {}
    outputs:
      delegateVersion: ${account.version}
      delegateMinimalVersion: ${account.minimalVersion}
    

    Org level — implicit account from provider

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    const orgImplicit = harness.platform.getDelegateDefaultVersion({
        orgId: "your_org_id",
    });
    export const delegateVersionOrgImplicit = orgImplicit.then(orgImplicit => orgImplicit.version);
    
    import pulumi
    import pulumi_harness as harness
    
    org_implicit = harness.platform.get_delegate_default_version(org_id="your_org_id")
    pulumi.export("delegateVersionOrgImplicit", org_implicit.version)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		orgImplicit, err := platform.GetDelegateDefaultVersion(ctx, &platform.GetDelegateDefaultVersionArgs{
    			OrgId: pulumi.StringRef("your_org_id"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("delegateVersionOrgImplicit", orgImplicit.Version)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        var orgImplicit = Harness.Platform.GetDelegateDefaultVersion.Invoke(new()
        {
            OrgId = "your_org_id",
        });
    
        return new Dictionary<string, object?>
        {
            ["delegateVersionOrgImplicit"] = orgImplicit.Apply(getDelegateDefaultVersionResult => getDelegateDefaultVersionResult.Version),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harness.platform.PlatformFunctions;
    import com.pulumi.harness.platform.inputs.GetDelegateDefaultVersionArgs;
    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 orgImplicit = PlatformFunctions.getDelegateDefaultVersion(GetDelegateDefaultVersionArgs.builder()
                .orgId("your_org_id")
                .build());
    
            ctx.export("delegateVersionOrgImplicit", orgImplicit.version());
        }
    }
    
    variables:
      orgImplicit:
        fn::invoke:
          function: harness:platform:getDelegateDefaultVersion
          arguments:
            orgId: your_org_id
    outputs:
      delegateVersionOrgImplicit: ${orgImplicit.version}
    

    Project level — implicit account from provider

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    const project = harness.platform.getDelegateDefaultVersion({
        orgId: "your_org_id",
        projectId: "your_project_id",
    });
    export const delegateVersionProject = project.then(project => project.version);
    
    import pulumi
    import pulumi_harness as harness
    
    project = harness.platform.get_delegate_default_version(org_id="your_org_id",
        project_id="your_project_id")
    pulumi.export("delegateVersionProject", project.version)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		project, err := platform.GetDelegateDefaultVersion(ctx, &platform.GetDelegateDefaultVersionArgs{
    			OrgId:     pulumi.StringRef("your_org_id"),
    			ProjectId: pulumi.StringRef("your_project_id"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("delegateVersionProject", project.Version)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        var project = Harness.Platform.GetDelegateDefaultVersion.Invoke(new()
        {
            OrgId = "your_org_id",
            ProjectId = "your_project_id",
        });
    
        return new Dictionary<string, object?>
        {
            ["delegateVersionProject"] = project.Apply(getDelegateDefaultVersionResult => getDelegateDefaultVersionResult.Version),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harness.platform.PlatformFunctions;
    import com.pulumi.harness.platform.inputs.GetDelegateDefaultVersionArgs;
    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 project = PlatformFunctions.getDelegateDefaultVersion(GetDelegateDefaultVersionArgs.builder()
                .orgId("your_org_id")
                .projectId("your_project_id")
                .build());
    
            ctx.export("delegateVersionProject", project.version());
        }
    }
    
    variables:
      project:
        fn::invoke:
          function: harness:platform:getDelegateDefaultVersion
          arguments:
            orgId: your_org_id
            projectId: your_project_id
    outputs:
      delegateVersionProject: ${project.version}
    

    Using getDelegateDefaultVersion

    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 getDelegateDefaultVersion(args: GetDelegateDefaultVersionArgs, opts?: InvokeOptions): Promise<GetDelegateDefaultVersionResult>
    function getDelegateDefaultVersionOutput(args: GetDelegateDefaultVersionOutputArgs, opts?: InvokeOptions): Output<GetDelegateDefaultVersionResult>
    def get_delegate_default_version(org_id: Optional[str] = None,
                                     project_id: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetDelegateDefaultVersionResult
    def get_delegate_default_version_output(org_id: Optional[pulumi.Input[str]] = None,
                                     project_id: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetDelegateDefaultVersionResult]
    func GetDelegateDefaultVersion(ctx *Context, args *GetDelegateDefaultVersionArgs, opts ...InvokeOption) (*GetDelegateDefaultVersionResult, error)
    func GetDelegateDefaultVersionOutput(ctx *Context, args *GetDelegateDefaultVersionOutputArgs, opts ...InvokeOption) GetDelegateDefaultVersionResultOutput

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

    public static class GetDelegateDefaultVersion 
    {
        public static Task<GetDelegateDefaultVersionResult> InvokeAsync(GetDelegateDefaultVersionArgs args, InvokeOptions? opts = null)
        public static Output<GetDelegateDefaultVersionResult> Invoke(GetDelegateDefaultVersionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDelegateDefaultVersionResult> getDelegateDefaultVersion(GetDelegateDefaultVersionArgs args, InvokeOptions options)
    public static Output<GetDelegateDefaultVersionResult> getDelegateDefaultVersion(GetDelegateDefaultVersionArgs args, InvokeOptions options)
    
    fn::invoke:
      function: harness:platform/getDelegateDefaultVersion:getDelegateDefaultVersion
      arguments:
        # arguments dictionary

    The following arguments are supported:

    OrgId string
    Organization identifier.
    ProjectId string
    Project identifier.
    OrgId string
    Organization identifier.
    ProjectId string
    Project identifier.
    orgId String
    Organization identifier.
    projectId String
    Project identifier.
    orgId string
    Organization identifier.
    projectId string
    Project identifier.
    org_id str
    Organization identifier.
    project_id str
    Project identifier.
    orgId String
    Organization identifier.
    projectId String
    Project identifier.

    getDelegateDefaultVersion Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    MinimalVersion string
    Latest supported minimal delegate version.
    Version string
    Latest supported delegate version.
    OrgId string
    Organization identifier.
    ProjectId string
    Project identifier.
    Id string
    The provider-assigned unique ID for this managed resource.
    MinimalVersion string
    Latest supported minimal delegate version.
    Version string
    Latest supported delegate version.
    OrgId string
    Organization identifier.
    ProjectId string
    Project identifier.
    id String
    The provider-assigned unique ID for this managed resource.
    minimalVersion String
    Latest supported minimal delegate version.
    version String
    Latest supported delegate version.
    orgId String
    Organization identifier.
    projectId String
    Project identifier.
    id string
    The provider-assigned unique ID for this managed resource.
    minimalVersion string
    Latest supported minimal delegate version.
    version string
    Latest supported delegate version.
    orgId string
    Organization identifier.
    projectId string
    Project identifier.
    id str
    The provider-assigned unique ID for this managed resource.
    minimal_version str
    Latest supported minimal delegate version.
    version str
    Latest supported delegate version.
    org_id str
    Organization identifier.
    project_id str
    Project identifier.
    id String
    The provider-assigned unique ID for this managed resource.
    minimalVersion String
    Latest supported minimal delegate version.
    version String
    Latest supported delegate version.
    orgId String
    Organization identifier.
    projectId String
    Project identifier.

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Viewing docs for Harness v0.11.8
    published on Friday, Mar 27, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.