Harness v0.8.4 published on Thursday, Sep 11, 2025 by Pulumi
harness.chaos.getSecurityGovernanceCondition
Explore with Pulumi AI
Data source for retrieving a Harness Chaos Security Governance Condition
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
// Example of looking up a security governance condition by name
const byName = harness.chaos.getSecurityGovernanceCondition({
orgId: orgId,
projectId: projectId,
name: "k8s-security-condition",
});
// Example of looking up a security governance condition by ID
const byId = harness.chaos.getSecurityGovernanceCondition({
orgId: orgId,
projectId: projectId,
id: "<condition_id>",
});
export const securityGovernanceConditionByName = byName;
export const securityGovernanceConditionById = byId;
import pulumi
import pulumi_harness as harness
# Example of looking up a security governance condition by name
by_name = harness.chaos.get_security_governance_condition(org_id=org_id,
project_id=project_id,
name="k8s-security-condition")
# Example of looking up a security governance condition by ID
by_id = harness.chaos.get_security_governance_condition(org_id=org_id,
project_id=project_id,
id="<condition_id>")
pulumi.export("securityGovernanceConditionByName", by_name)
pulumi.export("securityGovernanceConditionById", by_id)
package main
import (
"github.com/pulumi/pulumi-harness/sdk/go/harness/chaos"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Example of looking up a security governance condition by name
byName, err := chaos.LookupSecurityGovernanceCondition(ctx, &chaos.LookupSecurityGovernanceConditionArgs{
OrgId: pulumi.StringRef(orgId),
ProjectId: pulumi.StringRef(projectId),
Name: pulumi.StringRef("k8s-security-condition"),
}, nil)
if err != nil {
return err
}
// Example of looking up a security governance condition by ID
byId, err := chaos.LookupSecurityGovernanceCondition(ctx, &chaos.LookupSecurityGovernanceConditionArgs{
OrgId: pulumi.StringRef(orgId),
ProjectId: pulumi.StringRef(projectId),
Id: pulumi.StringRef("<condition_id>"),
}, nil)
if err != nil {
return err
}
ctx.Export("securityGovernanceConditionByName", byName)
ctx.Export("securityGovernanceConditionById", byId)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() =>
{
// Example of looking up a security governance condition by name
var byName = Harness.Chaos.GetSecurityGovernanceCondition.Invoke(new()
{
OrgId = orgId,
ProjectId = projectId,
Name = "k8s-security-condition",
});
// Example of looking up a security governance condition by ID
var byId = Harness.Chaos.GetSecurityGovernanceCondition.Invoke(new()
{
OrgId = orgId,
ProjectId = projectId,
Id = "<condition_id>",
});
return new Dictionary<string, object?>
{
["securityGovernanceConditionByName"] = byName,
["securityGovernanceConditionById"] = byId,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.chaos.ChaosFunctions;
import com.pulumi.harness.chaos.inputs.GetSecurityGovernanceConditionArgs;
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) {
// Example of looking up a security governance condition by name
final var byName = ChaosFunctions.getSecurityGovernanceCondition(GetSecurityGovernanceConditionArgs.builder()
.orgId(orgId)
.projectId(projectId)
.name("k8s-security-condition")
.build());
// Example of looking up a security governance condition by ID
final var byId = ChaosFunctions.getSecurityGovernanceCondition(GetSecurityGovernanceConditionArgs.builder()
.orgId(orgId)
.projectId(projectId)
.id("<condition_id>")
.build());
ctx.export("securityGovernanceConditionByName", byName);
ctx.export("securityGovernanceConditionById", byId);
}
}
variables:
# Example of looking up a security governance condition by name
byName:
fn::invoke:
function: harness:chaos:getSecurityGovernanceCondition
arguments:
orgId: ${orgId}
projectId: ${projectId}
name: k8s-security-condition
# Example of looking up a security governance condition by ID
byId:
fn::invoke:
function: harness:chaos:getSecurityGovernanceCondition
arguments:
orgId: ${orgId}
projectId: ${projectId}
id: <condition_id>
outputs:
# Output the retrieved conditions
securityGovernanceConditionByName: ${byName}
securityGovernanceConditionById: ${byId}
Using getSecurityGovernanceCondition
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 getSecurityGovernanceCondition(args: GetSecurityGovernanceConditionArgs, opts?: InvokeOptions): Promise<GetSecurityGovernanceConditionResult>
function getSecurityGovernanceConditionOutput(args: GetSecurityGovernanceConditionOutputArgs, opts?: InvokeOptions): Output<GetSecurityGovernanceConditionResult>
def get_security_governance_condition(id: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSecurityGovernanceConditionResult
def get_security_governance_condition_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
org_id: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSecurityGovernanceConditionResult]
func LookupSecurityGovernanceCondition(ctx *Context, args *LookupSecurityGovernanceConditionArgs, opts ...InvokeOption) (*LookupSecurityGovernanceConditionResult, error)
func LookupSecurityGovernanceConditionOutput(ctx *Context, args *LookupSecurityGovernanceConditionOutputArgs, opts ...InvokeOption) LookupSecurityGovernanceConditionResultOutput
> Note: This function is named LookupSecurityGovernanceCondition
in the Go SDK.
public static class GetSecurityGovernanceCondition
{
public static Task<GetSecurityGovernanceConditionResult> InvokeAsync(GetSecurityGovernanceConditionArgs args, InvokeOptions? opts = null)
public static Output<GetSecurityGovernanceConditionResult> Invoke(GetSecurityGovernanceConditionInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSecurityGovernanceConditionResult> getSecurityGovernanceCondition(GetSecurityGovernanceConditionArgs args, InvokeOptions options)
public static Output<GetSecurityGovernanceConditionResult> getSecurityGovernanceCondition(GetSecurityGovernanceConditionArgs args, InvokeOptions options)
fn::invoke:
function: harness:chaos/getSecurityGovernanceCondition:getSecurityGovernanceCondition
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- The ID of the security governance condition. Either
id
orname
must be specified. - Name string
- The name of the security governance condition. Either
id
orname
must be specified. - Org
Id string - The organization ID of the security governance condition
- Project
Id string - The project ID of the security governance condition
- Id string
- The ID of the security governance condition. Either
id
orname
must be specified. - Name string
- The name of the security governance condition. Either
id
orname
must be specified. - Org
Id string - The organization ID of the security governance condition
- Project
Id string - The project ID of the security governance condition
- id String
- The ID of the security governance condition. Either
id
orname
must be specified. - name String
- The name of the security governance condition. Either
id
orname
must be specified. - org
Id String - The organization ID of the security governance condition
- project
Id String - The project ID of the security governance condition
- id string
- The ID of the security governance condition. Either
id
orname
must be specified. - name string
- The name of the security governance condition. Either
id
orname
must be specified. - org
Id string - The organization ID of the security governance condition
- project
Id string - The project ID of the security governance condition
- id str
- The ID of the security governance condition. Either
id
orname
must be specified. - name str
- The name of the security governance condition. Either
id
orname
must be specified. - org_
id str - The organization ID of the security governance condition
- project_
id str - The project ID of the security governance condition
- id String
- The ID of the security governance condition. Either
id
orname
must be specified. - name String
- The name of the security governance condition. Either
id
orname
must be specified. - org
Id String - The organization ID of the security governance condition
- project
Id String - The project ID of the security governance condition
getSecurityGovernanceCondition Result
The following output properties are available:
- Description string
- The description of the security governance condition
- Fault
Specs List<GetSecurity Governance Condition Fault Spec> - Fault specification for the condition
- Id string
- The ID of the security governance condition. Either
id
orname
must be specified. - Infra
Type string - The infrastructure type (KubernetesV2, Linux, Windows)
- K8s
Specs List<GetSecurity Governance Condition K8s Spec> - Kubernetes specific configuration
- Machine
Specs List<GetSecurity Governance Condition Machine Spec> - Machine specific configuration
- Name string
- The name of the security governance condition. Either
id
orname
must be specified. - List<string>
- Tags associated with the condition
- Org
Id string - The organization ID of the security governance condition
- Project
Id string - The project ID of the security governance condition
- Description string
- The description of the security governance condition
- Fault
Specs []GetSecurity Governance Condition Fault Spec - Fault specification for the condition
- Id string
- The ID of the security governance condition. Either
id
orname
must be specified. - Infra
Type string - The infrastructure type (KubernetesV2, Linux, Windows)
- K8s
Specs []GetSecurity Governance Condition K8s Spec - Kubernetes specific configuration
- Machine
Specs []GetSecurity Governance Condition Machine Spec - Machine specific configuration
- Name string
- The name of the security governance condition. Either
id
orname
must be specified. - []string
- Tags associated with the condition
- Org
Id string - The organization ID of the security governance condition
- Project
Id string - The project ID of the security governance condition
- description String
- The description of the security governance condition
- fault
Specs List<GetSecurity Governance Condition Fault Spec> - Fault specification for the condition
- id String
- The ID of the security governance condition. Either
id
orname
must be specified. - infra
Type String - The infrastructure type (KubernetesV2, Linux, Windows)
- k8s
Specs List<GetSecurity Governance Condition K8s Spec> - Kubernetes specific configuration
- machine
Specs List<GetSecurity Governance Condition Machine Spec> - Machine specific configuration
- name String
- The name of the security governance condition. Either
id
orname
must be specified. - List<String>
- Tags associated with the condition
- org
Id String - The organization ID of the security governance condition
- project
Id String - The project ID of the security governance condition
- description string
- The description of the security governance condition
- fault
Specs GetSecurity Governance Condition Fault Spec[] - Fault specification for the condition
- id string
- The ID of the security governance condition. Either
id
orname
must be specified. - infra
Type string - The infrastructure type (KubernetesV2, Linux, Windows)
- k8s
Specs GetSecurity Governance Condition K8s Spec[] - Kubernetes specific configuration
- machine
Specs GetSecurity Governance Condition Machine Spec[] - Machine specific configuration
- name string
- The name of the security governance condition. Either
id
orname
must be specified. - string[]
- Tags associated with the condition
- org
Id string - The organization ID of the security governance condition
- project
Id string - The project ID of the security governance condition
- description str
- The description of the security governance condition
- fault_
specs Sequence[GetSecurity Governance Condition Fault Spec] - Fault specification for the condition
- id str
- The ID of the security governance condition. Either
id
orname
must be specified. - infra_
type str - The infrastructure type (KubernetesV2, Linux, Windows)
- k8s_
specs Sequence[GetSecurity Governance Condition K8s Spec] - Kubernetes specific configuration
- machine_
specs Sequence[GetSecurity Governance Condition Machine Spec] - Machine specific configuration
- name str
- The name of the security governance condition. Either
id
orname
must be specified. - Sequence[str]
- Tags associated with the condition
- org_
id str - The organization ID of the security governance condition
- project_
id str - The project ID of the security governance condition
- description String
- The description of the security governance condition
- fault
Specs List<Property Map> - Fault specification for the condition
- id String
- The ID of the security governance condition. Either
id
orname
must be specified. - infra
Type String - The infrastructure type (KubernetesV2, Linux, Windows)
- k8s
Specs List<Property Map> - Kubernetes specific configuration
- machine
Specs List<Property Map> - Machine specific configuration
- name String
- The name of the security governance condition. Either
id
orname
must be specified. - List<String>
- Tags associated with the condition
- org
Id String - The organization ID of the security governance condition
- project
Id String - The project ID of the security governance condition
Supporting Types
GetSecurityGovernanceConditionFaultSpec
- Faults
List<Get
Security Governance Condition Fault Spec Fault> - List of fault specifications
- Operator string
- Operator for the fault specification
- Faults
[]Get
Security Governance Condition Fault Spec Fault - List of fault specifications
- Operator string
- Operator for the fault specification
- faults
List<Get
Security Governance Condition Fault Spec Fault> - List of fault specifications
- operator String
- Operator for the fault specification
- faults
Get
Security Governance Condition Fault Spec Fault[] - List of fault specifications
- operator string
- Operator for the fault specification
- faults
Sequence[Get
Security Governance Condition Fault Spec Fault] - List of fault specifications
- operator str
- Operator for the fault specification
- faults List<Property Map>
- List of fault specifications
- operator String
- Operator for the fault specification
GetSecurityGovernanceConditionFaultSpecFault
- fault_
type str - Type of the fault
- name str
- Name of the fault
GetSecurityGovernanceConditionK8sSpec
- Infra
Specs List<GetSecurity Governance Condition K8s Spec Infra Spec> - Infrastructure specification
- Infra
Specs []GetSecurity Governance Condition K8s Spec Infra Spec - Infrastructure specification
- infra
Specs List<GetSecurity Governance Condition K8s Spec Infra Spec> - Infrastructure specification
- infra
Specs GetSecurity Governance Condition K8s Spec Infra Spec[] - Infrastructure specification
- infra_
specs Sequence[GetSecurity Governance Condition K8s Spec Infra Spec] - Infrastructure specification
- infra
Specs List<Property Map> - Infrastructure specification
GetSecurityGovernanceConditionK8sSpecInfraSpec
GetSecurityGovernanceConditionMachineSpec
- Infra
Specs List<GetSecurity Governance Condition Machine Spec Infra Spec> - Infrastructure specification
- Infra
Specs []GetSecurity Governance Condition Machine Spec Infra Spec - Infrastructure specification
- infra
Specs List<GetSecurity Governance Condition Machine Spec Infra Spec> - Infrastructure specification
- infra
Specs GetSecurity Governance Condition Machine Spec Infra Spec[] - Infrastructure specification
- infra_
specs Sequence[GetSecurity Governance Condition Machine Spec Infra Spec] - Infrastructure specification
- infra
Specs List<Property Map> - Infrastructure specification
GetSecurityGovernanceConditionMachineSpecInfraSpec
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.