1. Packages
  2. Harness Provider
  3. API Docs
  4. chaos
  5. getSecurityGovernanceCondition
Harness v0.8.4 published on Thursday, Sep 11, 2025 by Pulumi

harness.chaos.getSecurityGovernanceCondition

Explore with Pulumi AI

harness logo
Harness v0.8.4 published on Thursday, Sep 11, 2025 by Pulumi

    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 or name must be specified.
    Name string
    The name of the security governance condition. Either id or name must be specified.
    OrgId string
    The organization ID of the security governance condition
    ProjectId string
    The project ID of the security governance condition
    Id string
    The ID of the security governance condition. Either id or name must be specified.
    Name string
    The name of the security governance condition. Either id or name must be specified.
    OrgId string
    The organization ID of the security governance condition
    ProjectId string
    The project ID of the security governance condition
    id String
    The ID of the security governance condition. Either id or name must be specified.
    name String
    The name of the security governance condition. Either id or name must be specified.
    orgId String
    The organization ID of the security governance condition
    projectId String
    The project ID of the security governance condition
    id string
    The ID of the security governance condition. Either id or name must be specified.
    name string
    The name of the security governance condition. Either id or name must be specified.
    orgId string
    The organization ID of the security governance condition
    projectId string
    The project ID of the security governance condition
    id str
    The ID of the security governance condition. Either id or name must be specified.
    name str
    The name of the security governance condition. Either id or name 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 or name must be specified.
    name String
    The name of the security governance condition. Either id or name must be specified.
    orgId String
    The organization ID of the security governance condition
    projectId 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
    FaultSpecs List<GetSecurityGovernanceConditionFaultSpec>
    Fault specification for the condition
    Id string
    The ID of the security governance condition. Either id or name must be specified.
    InfraType string
    The infrastructure type (KubernetesV2, Linux, Windows)
    K8sSpecs List<GetSecurityGovernanceConditionK8sSpec>
    Kubernetes specific configuration
    MachineSpecs List<GetSecurityGovernanceConditionMachineSpec>
    Machine specific configuration
    Name string
    The name of the security governance condition. Either id or name must be specified.
    Tags List<string>
    Tags associated with the condition
    OrgId string
    The organization ID of the security governance condition
    ProjectId string
    The project ID of the security governance condition
    Description string
    The description of the security governance condition
    FaultSpecs []GetSecurityGovernanceConditionFaultSpec
    Fault specification for the condition
    Id string
    The ID of the security governance condition. Either id or name must be specified.
    InfraType string
    The infrastructure type (KubernetesV2, Linux, Windows)
    K8sSpecs []GetSecurityGovernanceConditionK8sSpec
    Kubernetes specific configuration
    MachineSpecs []GetSecurityGovernanceConditionMachineSpec
    Machine specific configuration
    Name string
    The name of the security governance condition. Either id or name must be specified.
    Tags []string
    Tags associated with the condition
    OrgId string
    The organization ID of the security governance condition
    ProjectId string
    The project ID of the security governance condition
    description String
    The description of the security governance condition
    faultSpecs List<GetSecurityGovernanceConditionFaultSpec>
    Fault specification for the condition
    id String
    The ID of the security governance condition. Either id or name must be specified.
    infraType String
    The infrastructure type (KubernetesV2, Linux, Windows)
    k8sSpecs List<GetSecurityGovernanceConditionK8sSpec>
    Kubernetes specific configuration
    machineSpecs List<GetSecurityGovernanceConditionMachineSpec>
    Machine specific configuration
    name String
    The name of the security governance condition. Either id or name must be specified.
    tags List<String>
    Tags associated with the condition
    orgId String
    The organization ID of the security governance condition
    projectId String
    The project ID of the security governance condition
    description string
    The description of the security governance condition
    faultSpecs GetSecurityGovernanceConditionFaultSpec[]
    Fault specification for the condition
    id string
    The ID of the security governance condition. Either id or name must be specified.
    infraType string
    The infrastructure type (KubernetesV2, Linux, Windows)
    k8sSpecs GetSecurityGovernanceConditionK8sSpec[]
    Kubernetes specific configuration
    machineSpecs GetSecurityGovernanceConditionMachineSpec[]
    Machine specific configuration
    name string
    The name of the security governance condition. Either id or name must be specified.
    tags string[]
    Tags associated with the condition
    orgId string
    The organization ID of the security governance condition
    projectId string
    The project ID of the security governance condition
    description str
    The description of the security governance condition
    fault_specs Sequence[GetSecurityGovernanceConditionFaultSpec]
    Fault specification for the condition
    id str
    The ID of the security governance condition. Either id or name must be specified.
    infra_type str
    The infrastructure type (KubernetesV2, Linux, Windows)
    k8s_specs Sequence[GetSecurityGovernanceConditionK8sSpec]
    Kubernetes specific configuration
    machine_specs Sequence[GetSecurityGovernanceConditionMachineSpec]
    Machine specific configuration
    name str
    The name of the security governance condition. Either id or name must be specified.
    tags 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
    faultSpecs List<Property Map>
    Fault specification for the condition
    id String
    The ID of the security governance condition. Either id or name must be specified.
    infraType String
    The infrastructure type (KubernetesV2, Linux, Windows)
    k8sSpecs List<Property Map>
    Kubernetes specific configuration
    machineSpecs List<Property Map>
    Machine specific configuration
    name String
    The name of the security governance condition. Either id or name must be specified.
    tags List<String>
    Tags associated with the condition
    orgId String
    The organization ID of the security governance condition
    projectId String
    The project ID of the security governance condition

    Supporting Types

    GetSecurityGovernanceConditionFaultSpec

    Faults List<GetSecurityGovernanceConditionFaultSpecFault>
    List of fault specifications
    Operator string
    Operator for the fault specification
    Faults []GetSecurityGovernanceConditionFaultSpecFault
    List of fault specifications
    Operator string
    Operator for the fault specification
    faults List<GetSecurityGovernanceConditionFaultSpecFault>
    List of fault specifications
    operator String
    Operator for the fault specification
    faults GetSecurityGovernanceConditionFaultSpecFault[]
    List of fault specifications
    operator string
    Operator for the fault specification
    faults Sequence[GetSecurityGovernanceConditionFaultSpecFault]
    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

    FaultType string
    Type of the fault
    Name string
    Name of the fault
    FaultType string
    Type of the fault
    Name string
    Name of the fault
    faultType String
    Type of the fault
    name String
    Name of the fault
    faultType string
    Type of the fault
    name string
    Name of the fault
    fault_type str
    Type of the fault
    name str
    Name of the fault
    faultType String
    Type of the fault
    name String
    Name of the fault

    GetSecurityGovernanceConditionK8sSpec

    infraSpecs List<Property Map>
    Infrastructure specification

    GetSecurityGovernanceConditionK8sSpecInfraSpec

    InfraIds List<string>
    List of infrastructure IDs
    Operator string
    Operator for comparing infrastructure IDs
    InfraIds []string
    List of infrastructure IDs
    Operator string
    Operator for comparing infrastructure IDs
    infraIds List<String>
    List of infrastructure IDs
    operator String
    Operator for comparing infrastructure IDs
    infraIds string[]
    List of infrastructure IDs
    operator string
    Operator for comparing infrastructure IDs
    infra_ids Sequence[str]
    List of infrastructure IDs
    operator str
    Operator for comparing infrastructure IDs
    infraIds List<String>
    List of infrastructure IDs
    operator String
    Operator for comparing infrastructure IDs

    GetSecurityGovernanceConditionMachineSpec

    infraSpecs List<Property Map>
    Infrastructure specification

    GetSecurityGovernanceConditionMachineSpecInfraSpec

    InfraIds List<string>
    List of infrastructure IDs
    Operator string
    Operator for comparing infrastructure IDs
    InfraIds []string
    List of infrastructure IDs
    Operator string
    Operator for comparing infrastructure IDs
    infraIds List<String>
    List of infrastructure IDs
    operator String
    Operator for comparing infrastructure IDs
    infraIds string[]
    List of infrastructure IDs
    operator string
    Operator for comparing infrastructure IDs
    infra_ids Sequence[str]
    List of infrastructure IDs
    operator str
    Operator for comparing infrastructure IDs
    infraIds List<String>
    List of infrastructure IDs
    operator String
    Operator for comparing infrastructure IDs

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.8.4 published on Thursday, Sep 11, 2025 by Pulumi