1. Packages
  2. Harness Provider
  3. API Docs
  4. platform
  5. getVariables
Harness v0.7.1 published on Saturday, Mar 29, 2025 by Pulumi

harness.platform.getVariables

Explore with Pulumi AI

Harness v0.7.1 published on Saturday, Mar 29, 2025 by Pulumi

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";

const example = harness.platform.getVariables({
    identifier: "identifier",
    orgId: "org_id",
    projectId: "project_id",
});
Copy
import pulumi
import pulumi_harness as harness

example = harness.platform.get_variables(identifier="identifier",
    org_id="org_id",
    project_id="project_id")
Copy
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 {
		_, err := platform.LookupVariables(ctx, &platform.LookupVariablesArgs{
			Identifier: "identifier",
			OrgId:      pulumi.StringRef("org_id"),
			ProjectId:  pulumi.StringRef("project_id"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;

return await Deployment.RunAsync(() => 
{
    var example = Harness.Platform.GetVariables.Invoke(new()
    {
        Identifier = "identifier",
        OrgId = "org_id",
        ProjectId = "project_id",
    });

});
Copy
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.GetVariablesArgs;
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 example = PlatformFunctions.getVariables(GetVariablesArgs.builder()
            .identifier("identifier")
            .orgId("org_id")
            .projectId("project_id")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: harness:platform:getVariables
      arguments:
        identifier: identifier
        orgId: org_id
        projectId: project_id
Copy

Using getVariables

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 getVariables(args: GetVariablesArgs, opts?: InvokeOptions): Promise<GetVariablesResult>
function getVariablesOutput(args: GetVariablesOutputArgs, opts?: InvokeOptions): Output<GetVariablesResult>
Copy
def get_variables(identifier: Optional[str] = None,
                  org_id: Optional[str] = None,
                  project_id: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetVariablesResult
def get_variables_output(identifier: Optional[pulumi.Input[str]] = None,
                  org_id: Optional[pulumi.Input[str]] = None,
                  project_id: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetVariablesResult]
Copy
func LookupVariables(ctx *Context, args *LookupVariablesArgs, opts ...InvokeOption) (*LookupVariablesResult, error)
func LookupVariablesOutput(ctx *Context, args *LookupVariablesOutputArgs, opts ...InvokeOption) LookupVariablesResultOutput
Copy

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

public static class GetVariables 
{
    public static Task<GetVariablesResult> InvokeAsync(GetVariablesArgs args, InvokeOptions? opts = null)
    public static Output<GetVariablesResult> Invoke(GetVariablesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetVariablesResult> getVariables(GetVariablesArgs args, InvokeOptions options)
public static Output<GetVariablesResult> getVariables(GetVariablesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: harness:platform/getVariables:getVariables
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Identifier This property is required. string
Unique identifier of the resource
OrgId string
Organization Identifier for the Entity
ProjectId string
Project Identifier for the Entity
Identifier This property is required. string
Unique identifier of the resource
OrgId string
Organization Identifier for the Entity
ProjectId string
Project Identifier for the Entity
identifier This property is required. String
Unique identifier of the resource
orgId String
Organization Identifier for the Entity
projectId String
Project Identifier for the Entity
identifier This property is required. string
Unique identifier of the resource
orgId string
Organization Identifier for the Entity
projectId string
Project Identifier for the Entity
identifier This property is required. str
Unique identifier of the resource
org_id str
Organization Identifier for the Entity
project_id str
Project Identifier for the Entity
identifier This property is required. String
Unique identifier of the resource
orgId String
Organization Identifier for the Entity
projectId String
Project Identifier for the Entity

getVariables Result

The following output properties are available:

Description string
Description of the entity
Id string
The provider-assigned unique ID for this managed resource.
Identifier string
Unique identifier of the resource
Name string
Name of the Variable
Specs List<GetVariablesSpec>
List of Spce Fields.
Type string
Type of Variable
OrgId string
Organization Identifier for the Entity
ProjectId string
Project Identifier for the Entity
Description string
Description of the entity
Id string
The provider-assigned unique ID for this managed resource.
Identifier string
Unique identifier of the resource
Name string
Name of the Variable
Specs []GetVariablesSpec
List of Spce Fields.
Type string
Type of Variable
OrgId string
Organization Identifier for the Entity
ProjectId string
Project Identifier for the Entity
description String
Description of the entity
id String
The provider-assigned unique ID for this managed resource.
identifier String
Unique identifier of the resource
name String
Name of the Variable
specs List<GetVariablesSpec>
List of Spce Fields.
type String
Type of Variable
orgId String
Organization Identifier for the Entity
projectId String
Project Identifier for the Entity
description string
Description of the entity
id string
The provider-assigned unique ID for this managed resource.
identifier string
Unique identifier of the resource
name string
Name of the Variable
specs GetVariablesSpec[]
List of Spce Fields.
type string
Type of Variable
orgId string
Organization Identifier for the Entity
projectId string
Project Identifier for the Entity
description str
Description of the entity
id str
The provider-assigned unique ID for this managed resource.
identifier str
Unique identifier of the resource
name str
Name of the Variable
specs Sequence[GetVariablesSpec]
List of Spce Fields.
type str
Type of Variable
org_id str
Organization Identifier for the Entity
project_id str
Project Identifier for the Entity
description String
Description of the entity
id String
The provider-assigned unique ID for this managed resource.
identifier String
Unique identifier of the resource
name String
Name of the Variable
specs List<Property Map>
List of Spce Fields.
type String
Type of Variable
orgId String
Organization Identifier for the Entity
projectId String
Project Identifier for the Entity

Supporting Types

GetVariablesSpec

FixedValue This property is required. string
FixedValue of the variable
ValueType This property is required. string
Type of Value of the Variable. For now only FIXED is supported
FixedValue This property is required. string
FixedValue of the variable
ValueType This property is required. string
Type of Value of the Variable. For now only FIXED is supported
fixedValue This property is required. String
FixedValue of the variable
valueType This property is required. String
Type of Value of the Variable. For now only FIXED is supported
fixedValue This property is required. string
FixedValue of the variable
valueType This property is required. string
Type of Value of the Variable. For now only FIXED is supported
fixed_value This property is required. str
FixedValue of the variable
value_type This property is required. str
Type of Value of the Variable. For now only FIXED is supported
fixedValue This property is required. String
FixedValue of the variable
valueType This property is required. String
Type of Value of the Variable. For now only FIXED is supported

Package Details

Repository
harness pulumi/pulumi-harness
License
Apache-2.0
Notes
This Pulumi package is based on the harness Terraform Provider.
Harness v0.7.1 published on Saturday, Mar 29, 2025 by Pulumi