Viewing docs for Harness v0.11.6
published on Thursday, Mar 12, 2026 by Pulumi
published on Thursday, Mar 12, 2026 by Pulumi
Viewing docs for Harness v0.11.6
published on Thursday, Mar 12, 2026 by Pulumi
published on Thursday, Mar 12, 2026 by Pulumi
Data source for retrieving a Harness policyset.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const test = harness.platform.getPolicySet({
identifier: "harness_platform_policyset.test.identifier",
name: "harness_platform_policyset.test.name",
action: "onrun",
type: "pipeline",
enabled: true,
policyReferences: [{
identifier: "always_run",
severity: "warning",
}],
});
import pulumi
import pulumi_harness as harness
test = harness.platform.get_policy_set(identifier="harness_platform_policyset.test.identifier",
name="harness_platform_policyset.test.name",
action="onrun",
type="pipeline",
enabled=True,
policy_references=[{
"identifier": "always_run",
"severity": "warning",
}])
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.LookupPolicySet(ctx, &platform.LookupPolicySetArgs{
Identifier: "harness_platform_policyset.test.identifier",
Name: pulumi.StringRef("harness_platform_policyset.test.name"),
Action: "onrun",
Type: "pipeline",
Enabled: pulumi.BoolRef(true),
PolicyReferences: []platform.GetPolicySetPolicyReference{
{
Identifier: "always_run",
Severity: "warning",
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() =>
{
var test = Harness.Platform.GetPolicySet.Invoke(new()
{
Identifier = "harness_platform_policyset.test.identifier",
Name = "harness_platform_policyset.test.name",
Action = "onrun",
Type = "pipeline",
Enabled = true,
PolicyReferences = new[]
{
new Harness.Platform.Inputs.GetPolicySetPolicyReferenceInputArgs
{
Identifier = "always_run",
Severity = "warning",
},
},
});
});
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.GetPolicySetArgs;
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 test = PlatformFunctions.getPolicySet(GetPolicySetArgs.builder()
.identifier("harness_platform_policyset.test.identifier")
.name("harness_platform_policyset.test.name")
.action("onrun")
.type("pipeline")
.enabled(true)
.policyReferences(GetPolicySetPolicyReferenceArgs.builder()
.identifier("always_run")
.severity("warning")
.build())
.build());
}
}
variables:
test:
fn::invoke:
function: harness:platform:getPolicySet
arguments:
identifier: harness_platform_policyset.test.identifier
name: harness_platform_policyset.test.name
action: onrun
type: pipeline
enabled: true
policyReferences:
- identifier: always_run
severity: warning
Using getPolicySet
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 getPolicySet(args: GetPolicySetArgs, opts?: InvokeOptions): Promise<GetPolicySetResult>
function getPolicySetOutput(args: GetPolicySetOutputArgs, opts?: InvokeOptions): Output<GetPolicySetResult>def get_policy_set(action: Optional[str] = None,
enabled: Optional[bool] = None,
identifier: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
policies: Optional[Sequence[GetPolicySetPolicy]] = None,
policy_references: Optional[Sequence[GetPolicySetPolicyReference]] = None,
project_id: Optional[str] = None,
type: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPolicySetResult
def get_policy_set_output(action: Optional[pulumi.Input[str]] = None,
enabled: Optional[pulumi.Input[bool]] = None,
identifier: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
org_id: Optional[pulumi.Input[str]] = None,
policies: Optional[pulumi.Input[Sequence[pulumi.Input[GetPolicySetPolicyArgs]]]] = None,
policy_references: Optional[pulumi.Input[Sequence[pulumi.Input[GetPolicySetPolicyReferenceArgs]]]] = None,
project_id: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPolicySetResult]func LookupPolicySet(ctx *Context, args *LookupPolicySetArgs, opts ...InvokeOption) (*LookupPolicySetResult, error)
func LookupPolicySetOutput(ctx *Context, args *LookupPolicySetOutputArgs, opts ...InvokeOption) LookupPolicySetResultOutput> Note: This function is named LookupPolicySet in the Go SDK.
public static class GetPolicySet
{
public static Task<GetPolicySetResult> InvokeAsync(GetPolicySetArgs args, InvokeOptions? opts = null)
public static Output<GetPolicySetResult> Invoke(GetPolicySetInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPolicySetResult> getPolicySet(GetPolicySetArgs args, InvokeOptions options)
public static Output<GetPolicySetResult> getPolicySet(GetPolicySetArgs args, InvokeOptions options)
fn::invoke:
function: harness:platform/getPolicySet:getPolicySet
arguments:
# arguments dictionaryThe following arguments are supported:
- Action string
- Action code for the policyset.
- Identifier string
- Unique identifier of the resource.
- Type string
- Type of the policyset.
- Enabled bool
- Enabled for the policyset.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Policies
List<Get
Policy Set Policy> - List of policy identifiers / severity for the policyset. Deprecated: Use 'policy_references' instead.
- Policy
References List<GetPolicy Set Policy Reference> - Set of policy identifiers / severity for the policyset. Order is not significant.
- Project
Id string - Unique identifier of the project.
- Action string
- Action code for the policyset.
- Identifier string
- Unique identifier of the resource.
- Type string
- Type of the policyset.
- Enabled bool
- Enabled for the policyset.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Policies
[]Get
Policy Set Policy - List of policy identifiers / severity for the policyset. Deprecated: Use 'policy_references' instead.
- Policy
References []GetPolicy Set Policy Reference - Set of policy identifiers / severity for the policyset. Order is not significant.
- Project
Id string - Unique identifier of the project.
- action String
- Action code for the policyset.
- identifier String
- Unique identifier of the resource.
- type String
- Type of the policyset.
- enabled Boolean
- Enabled for the policyset.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- policies
List<Get
Policy Set Policy> - List of policy identifiers / severity for the policyset. Deprecated: Use 'policy_references' instead.
- policy
References List<GetPolicy Set Policy Reference> - Set of policy identifiers / severity for the policyset. Order is not significant.
- project
Id String - Unique identifier of the project.
- action string
- Action code for the policyset.
- identifier string
- Unique identifier of the resource.
- type string
- Type of the policyset.
- enabled boolean
- Enabled for the policyset.
- name string
- Name of the resource.
- org
Id string - Unique identifier of the organization.
- policies
Get
Policy Set Policy[] - List of policy identifiers / severity for the policyset. Deprecated: Use 'policy_references' instead.
- policy
References GetPolicy Set Policy Reference[] - Set of policy identifiers / severity for the policyset. Order is not significant.
- project
Id string - Unique identifier of the project.
- action str
- Action code for the policyset.
- identifier str
- Unique identifier of the resource.
- type str
- Type of the policyset.
- enabled bool
- Enabled for the policyset.
- name str
- Name of the resource.
- org_
id str - Unique identifier of the organization.
- policies
Sequence[Get
Policy Set Policy] - List of policy identifiers / severity for the policyset. Deprecated: Use 'policy_references' instead.
- policy_
references Sequence[GetPolicy Set Policy Reference] - Set of policy identifiers / severity for the policyset. Order is not significant.
- project_
id str - Unique identifier of the project.
- action String
- Action code for the policyset.
- identifier String
- Unique identifier of the resource.
- type String
- Type of the policyset.
- enabled Boolean
- Enabled for the policyset.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- policies List<Property Map>
- List of policy identifiers / severity for the policyset. Deprecated: Use 'policy_references' instead.
- policy
References List<Property Map> - Set of policy identifiers / severity for the policyset. Order is not significant.
- project
Id String - Unique identifier of the project.
getPolicySet Result
The following output properties are available:
- Action string
- Action code for the policyset.
- Description string
- Description of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Identifier string
- Unique identifier of the resource.
- Policies
List<Get
Policy Set Policy> - List of policy identifiers / severity for the policyset. Deprecated: Use 'policy_references' instead.
- Policy
References List<GetPolicy Set Policy Reference> - Set of policy identifiers / severity for the policyset. Order is not significant.
- List<string>
- Tags to associate with the resource.
- Type string
- Type of the policyset.
- Enabled bool
- Enabled for the policyset.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- Action string
- Action code for the policyset.
- Description string
- Description of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Identifier string
- Unique identifier of the resource.
- Policies
[]Get
Policy Set Policy - List of policy identifiers / severity for the policyset. Deprecated: Use 'policy_references' instead.
- Policy
References []GetPolicy Set Policy Reference - Set of policy identifiers / severity for the policyset. Order is not significant.
- []string
- Tags to associate with the resource.
- Type string
- Type of the policyset.
- Enabled bool
- Enabled for the policyset.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- action String
- Action code for the policyset.
- description String
- Description of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- identifier String
- Unique identifier of the resource.
- policies
List<Get
Policy Set Policy> - List of policy identifiers / severity for the policyset. Deprecated: Use 'policy_references' instead.
- policy
References List<GetPolicy Set Policy Reference> - Set of policy identifiers / severity for the policyset. Order is not significant.
- List<String>
- Tags to associate with the resource.
- type String
- Type of the policyset.
- enabled Boolean
- Enabled for the policyset.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- action string
- Action code for the policyset.
- description string
- Description of the resource.
- id string
- The provider-assigned unique ID for this managed resource.
- identifier string
- Unique identifier of the resource.
- policies
Get
Policy Set Policy[] - List of policy identifiers / severity for the policyset. Deprecated: Use 'policy_references' instead.
- policy
References GetPolicy Set Policy Reference[] - Set of policy identifiers / severity for the policyset. Order is not significant.
- string[]
- Tags to associate with the resource.
- type string
- Type of the policyset.
- enabled boolean
- Enabled for the policyset.
- name string
- Name of the resource.
- org
Id string - Unique identifier of the organization.
- project
Id string - Unique identifier of the project.
- action str
- Action code for the policyset.
- description str
- Description of the resource.
- id str
- The provider-assigned unique ID for this managed resource.
- identifier str
- Unique identifier of the resource.
- policies
Sequence[Get
Policy Set Policy] - List of policy identifiers / severity for the policyset. Deprecated: Use 'policy_references' instead.
- policy_
references Sequence[GetPolicy Set Policy Reference] - Set of policy identifiers / severity for the policyset. Order is not significant.
- Sequence[str]
- Tags to associate with the resource.
- type str
- Type of the policyset.
- enabled bool
- Enabled for the policyset.
- name str
- Name of the resource.
- org_
id str - Unique identifier of the organization.
- project_
id str - Unique identifier of the project.
- action String
- Action code for the policyset.
- description String
- Description of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- identifier String
- Unique identifier of the resource.
- policies List<Property Map>
- List of policy identifiers / severity for the policyset. Deprecated: Use 'policy_references' instead.
- policy
References List<Property Map> - Set of policy identifiers / severity for the policyset. Order is not significant.
- List<String>
- Tags to associate with the resource.
- type String
- Type of the policyset.
- enabled Boolean
- Enabled for the policyset.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
Supporting Types
GetPolicySetPolicy
- Identifier string
- Unique identifier of the policy
- Severity string
- Policy failure response - 'warning' for continuation, 'error' for exit
- Identifier string
- Unique identifier of the policy
- Severity string
- Policy failure response - 'warning' for continuation, 'error' for exit
- identifier String
- Unique identifier of the policy
- severity String
- Policy failure response - 'warning' for continuation, 'error' for exit
- identifier string
- Unique identifier of the policy
- severity string
- Policy failure response - 'warning' for continuation, 'error' for exit
- identifier str
- Unique identifier of the policy
- severity str
- Policy failure response - 'warning' for continuation, 'error' for exit
- identifier String
- Unique identifier of the policy
- severity String
- Policy failure response - 'warning' for continuation, 'error' for exit
GetPolicySetPolicyReference
- Identifier string
- Unique identifier of the policy
- Severity string
- Policy failure response - 'warning' for continuation, 'error' for exit
- Identifier string
- Unique identifier of the policy
- Severity string
- Policy failure response - 'warning' for continuation, 'error' for exit
- identifier String
- Unique identifier of the policy
- severity String
- Policy failure response - 'warning' for continuation, 'error' for exit
- identifier string
- Unique identifier of the policy
- severity string
- Policy failure response - 'warning' for continuation, 'error' for exit
- identifier str
- Unique identifier of the policy
- severity str
- Policy failure response - 'warning' for continuation, 'error' for exit
- identifier String
- Unique identifier of the policy
- severity String
- Policy failure response - 'warning' for continuation, 'error' for exit
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harnessTerraform Provider.
Viewing docs for Harness v0.11.6
published on Thursday, Mar 12, 2026 by Pulumi
published on Thursday, Mar 12, 2026 by Pulumi
