harness.platform.PolicySet
Explore with Pulumi AI
Resource for creating a Harness Policyset.
Create PolicySet Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PolicySet(name: string, args: PolicySetArgs, opts?: CustomResourceOptions);
@overload
def PolicySet(resource_name: str,
args: PolicySetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PolicySet(resource_name: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
identifier: Optional[str] = None,
type: Optional[str] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
policies: Optional[Sequence[PolicySetPolicyArgs]] = None,
project_id: Optional[str] = None,
tags: Optional[Sequence[str]] = None)
func NewPolicySet(ctx *Context, name string, args PolicySetArgs, opts ...ResourceOption) (*PolicySet, error)
public PolicySet(string name, PolicySetArgs args, CustomResourceOptions? opts = null)
public PolicySet(String name, PolicySetArgs args)
public PolicySet(String name, PolicySetArgs args, CustomResourceOptions options)
type: harness:platform:PolicySet
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args PolicySetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PolicySetArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PolicySetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PolicySetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PolicySetArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var policySetResource = new Harness.Platform.PolicySet("policySetResource", new()
{
Action = "string",
Identifier = "string",
Type = "string",
Description = "string",
Enabled = false,
Name = "string",
OrgId = "string",
Policies = new[]
{
new Harness.Platform.Inputs.PolicySetPolicyArgs
{
Identifier = "string",
Severity = "string",
},
},
ProjectId = "string",
Tags = new[]
{
"string",
},
});
example, err := platform.NewPolicySet(ctx, "policySetResource", &platform.PolicySetArgs{
Action: pulumi.String("string"),
Identifier: pulumi.String("string"),
Type: pulumi.String("string"),
Description: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Name: pulumi.String("string"),
OrgId: pulumi.String("string"),
Policies: platform.PolicySetPolicyArray{
&platform.PolicySetPolicyArgs{
Identifier: pulumi.String("string"),
Severity: pulumi.String("string"),
},
},
ProjectId: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
var policySetResource = new PolicySet("policySetResource", PolicySetArgs.builder()
.action("string")
.identifier("string")
.type("string")
.description("string")
.enabled(false)
.name("string")
.orgId("string")
.policies(PolicySetPolicyArgs.builder()
.identifier("string")
.severity("string")
.build())
.projectId("string")
.tags("string")
.build());
policy_set_resource = harness.platform.PolicySet("policySetResource",
action="string",
identifier="string",
type="string",
description="string",
enabled=False,
name="string",
org_id="string",
policies=[harness.platform.PolicySetPolicyArgs(
identifier="string",
severity="string",
)],
project_id="string",
tags=["string"])
const policySetResource = new harness.platform.PolicySet("policySetResource", {
action: "string",
identifier: "string",
type: "string",
description: "string",
enabled: false,
name: "string",
orgId: "string",
policies: [{
identifier: "string",
severity: "string",
}],
projectId: "string",
tags: ["string"],
});
type: harness:platform:PolicySet
properties:
action: string
description: string
enabled: false
identifier: string
name: string
orgId: string
policies:
- identifier: string
severity: string
projectId: string
tags:
- string
type: string
PolicySet Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The PolicySet resource accepts the following input properties:
- Action string
- Action for the policyset.
- Identifier string
- Unique identifier of the resource.
- Type string
- Type for the policyset.
- Description string
- Description of the resource.
- Enabled bool
- Enabled for the policyset.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Policies
List<Policy
Set Policy> - List of policy identifiers / severity for the policyset.
- Project
Id string - Unique identifier of the project.
- List<string>
- Tags to associate with the resource.
- Action string
- Action for the policyset.
- Identifier string
- Unique identifier of the resource.
- Type string
- Type for the policyset.
- Description string
- Description of the resource.
- Enabled bool
- Enabled for the policyset.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Policies
[]Policy
Set Policy Args - List of policy identifiers / severity for the policyset.
- Project
Id string - Unique identifier of the project.
- []string
- Tags to associate with the resource.
- action String
- Action for the policyset.
- identifier String
- Unique identifier of the resource.
- type String
- Type for the policyset.
- description String
- Description of the resource.
- enabled Boolean
- Enabled for the policyset.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- policies
List<Policy
Set Policy> - List of policy identifiers / severity for the policyset.
- project
Id String - Unique identifier of the project.
- List<String>
- Tags to associate with the resource.
- action string
- Action for the policyset.
- identifier string
- Unique identifier of the resource.
- type string
- Type for the policyset.
- description string
- Description of the resource.
- enabled boolean
- Enabled for the policyset.
- name string
- Name of the resource.
- org
Id string - Unique identifier of the organization.
- policies
Policy
Set Policy[] - List of policy identifiers / severity for the policyset.
- project
Id string - Unique identifier of the project.
- string[]
- Tags to associate with the resource.
- action str
- Action for the policyset.
- identifier str
- Unique identifier of the resource.
- type str
- Type for the policyset.
- description str
- Description of the resource.
- enabled bool
- Enabled for the policyset.
- name str
- Name of the resource.
- org_
id str - Unique identifier of the organization.
- policies
Sequence[Policy
Set Policy Args] - List of policy identifiers / severity for the policyset.
- project_
id str - Unique identifier of the project.
- Sequence[str]
- Tags to associate with the resource.
- action String
- Action for the policyset.
- identifier String
- Unique identifier of the resource.
- type String
- Type for the policyset.
- description String
- Description of the resource.
- 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.
- project
Id String - Unique identifier of the project.
- List<String>
- Tags to associate with the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the PolicySet resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing PolicySet Resource
Get an existing PolicySet resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: PolicySetState, opts?: CustomResourceOptions): PolicySet
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
identifier: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
policies: Optional[Sequence[PolicySetPolicyArgs]] = None,
project_id: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
type: Optional[str] = None) -> PolicySet
func GetPolicySet(ctx *Context, name string, id IDInput, state *PolicySetState, opts ...ResourceOption) (*PolicySet, error)
public static PolicySet Get(string name, Input<string> id, PolicySetState? state, CustomResourceOptions? opts = null)
public static PolicySet get(String name, Output<String> id, PolicySetState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Action string
- Action for the policyset.
- Description string
- Description of the resource.
- Enabled bool
- Enabled for the policyset.
- Identifier string
- Unique identifier of the resource.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Policies
List<Policy
Set Policy> - List of policy identifiers / severity for the policyset.
- Project
Id string - Unique identifier of the project.
- List<string>
- Tags to associate with the resource.
- Type string
- Type for the policyset.
- Action string
- Action for the policyset.
- Description string
- Description of the resource.
- Enabled bool
- Enabled for the policyset.
- Identifier string
- Unique identifier of the resource.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Policies
[]Policy
Set Policy Args - List of policy identifiers / severity for the policyset.
- Project
Id string - Unique identifier of the project.
- []string
- Tags to associate with the resource.
- Type string
- Type for the policyset.
- action String
- Action for the policyset.
- description String
- Description of the resource.
- enabled Boolean
- Enabled for the policyset.
- identifier String
- Unique identifier of the resource.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- policies
List<Policy
Set Policy> - List of policy identifiers / severity for the policyset.
- project
Id String - Unique identifier of the project.
- List<String>
- Tags to associate with the resource.
- type String
- Type for the policyset.
- action string
- Action for the policyset.
- description string
- Description of the resource.
- enabled boolean
- Enabled for the policyset.
- identifier string
- Unique identifier of the resource.
- name string
- Name of the resource.
- org
Id string - Unique identifier of the organization.
- policies
Policy
Set Policy[] - List of policy identifiers / severity for the policyset.
- project
Id string - Unique identifier of the project.
- string[]
- Tags to associate with the resource.
- type string
- Type for the policyset.
- action str
- Action for the policyset.
- description str
- Description of the resource.
- enabled bool
- Enabled for the policyset.
- identifier str
- Unique identifier of the resource.
- name str
- Name of the resource.
- org_
id str - Unique identifier of the organization.
- policies
Sequence[Policy
Set Policy Args] - List of policy identifiers / severity for the policyset.
- project_
id str - Unique identifier of the project.
- Sequence[str]
- Tags to associate with the resource.
- type str
- Type for the policyset.
- action String
- Action for the policyset.
- description String
- Description of the resource.
- enabled Boolean
- Enabled for the policyset.
- identifier String
- Unique identifier of the resource.
- 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.
- project
Id String - Unique identifier of the project.
- List<String>
- Tags to associate with the resource.
- type String
- Type for the policyset.
Supporting Types
PolicySetPolicy, PolicySetPolicyArgs
- Identifier string
- Account Identifier of the account
- Severity string
- Policy failure response - 'warning' for continuation, 'error' for exit
- Identifier string
- Account Identifier of the account
- Severity string
- Policy failure response - 'warning' for continuation, 'error' for exit
- identifier String
- Account Identifier of the account
- severity String
- Policy failure response - 'warning' for continuation, 'error' for exit
- identifier string
- Account Identifier of the account
- severity string
- Policy failure response - 'warning' for continuation, 'error' for exit
- identifier str
- Account Identifier of the account
- severity str
- Policy failure response - 'warning' for continuation, 'error' for exit
- identifier String
- Account Identifier of the account
- severity String
- Policy failure response - 'warning' for continuation, 'error' for exit
Import
Import using the organization id
$ pulumi import harness:platform/policySet:PolicySet example <organization_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.