1. Packages
  2. Vra Provider
  3. API Docs
  4. PolicyApproval
vra 0.13.0 published on Wednesday, May 14, 2025 by vmware

vra.PolicyApproval

Explore with Pulumi AI

vra logo
vra 0.13.0 published on Wednesday, May 14, 2025 by vmware

    Creates an Approval policy resource to request approval for catalog deployments from specified users.

    Example Usage

    S

    The following example shows how to create an approval policy resource:

    import * as pulumi from "@pulumi/pulumi";
    import * as vra from "@pulumi/vra";
    
    const policyApproval = new vra.PolicyApproval("policyApproval", {
        actions: ["Deployment.ChangeLease"],
        approvalLevel: 1,
        approvalMode: "ANY_OF",
        approvalType: "ROLE",
        approvers: ["ROLE:PROJECT_ADMINISTRATORS"],
        autoApprovalDecision: "APPROVE",
        autoApprovalExpiry: 30,
        description: "Approval Policy [terraform-approval-policy] created by Terraform",
        enforcementType: "HARD",
    });
    
    import pulumi
    import pulumi_vra as vra
    
    policy_approval = vra.PolicyApproval("policyApproval",
        actions=["Deployment.ChangeLease"],
        approval_level=1,
        approval_mode="ANY_OF",
        approval_type="ROLE",
        approvers=["ROLE:PROJECT_ADMINISTRATORS"],
        auto_approval_decision="APPROVE",
        auto_approval_expiry=30,
        description="Approval Policy [terraform-approval-policy] created by Terraform",
        enforcement_type="HARD")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vra/vra"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vra.NewPolicyApproval(ctx, "policyApproval", &vra.PolicyApprovalArgs{
    			Actions: pulumi.StringArray{
    				pulumi.String("Deployment.ChangeLease"),
    			},
    			ApprovalLevel: pulumi.Float64(1),
    			ApprovalMode:  pulumi.String("ANY_OF"),
    			ApprovalType:  pulumi.String("ROLE"),
    			Approvers: pulumi.StringArray{
    				pulumi.String("ROLE:PROJECT_ADMINISTRATORS"),
    			},
    			AutoApprovalDecision: pulumi.String("APPROVE"),
    			AutoApprovalExpiry:   pulumi.Float64(30),
    			Description:          pulumi.String("Approval Policy [terraform-approval-policy] created by Terraform"),
    			EnforcementType:      pulumi.String("HARD"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vra = Pulumi.Vra;
    
    return await Deployment.RunAsync(() => 
    {
        var policyApproval = new Vra.PolicyApproval("policyApproval", new()
        {
            Actions = new[]
            {
                "Deployment.ChangeLease",
            },
            ApprovalLevel = 1,
            ApprovalMode = "ANY_OF",
            ApprovalType = "ROLE",
            Approvers = new[]
            {
                "ROLE:PROJECT_ADMINISTRATORS",
            },
            AutoApprovalDecision = "APPROVE",
            AutoApprovalExpiry = 30,
            Description = "Approval Policy [terraform-approval-policy] created by Terraform",
            EnforcementType = "HARD",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vra.PolicyApproval;
    import com.pulumi.vra.PolicyApprovalArgs;
    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) {
            var policyApproval = new PolicyApproval("policyApproval", PolicyApprovalArgs.builder()
                .actions("Deployment.ChangeLease")
                .approvalLevel(1)
                .approvalMode("ANY_OF")
                .approvalType("ROLE")
                .approvers("ROLE:PROJECT_ADMINISTRATORS")
                .autoApprovalDecision("APPROVE")
                .autoApprovalExpiry(30)
                .description("Approval Policy [terraform-approval-policy] created by Terraform")
                .enforcementType("HARD")
                .build());
    
        }
    }
    
    resources:
      policyApproval:
        type: vra:PolicyApproval
        properties:
          actions:
            - Deployment.ChangeLease
          approvalLevel: 1
          approvalMode: ANY_OF
          approvalType: ROLE
          approvers:
            - ROLE:PROJECT_ADMINISTRATORS
          autoApprovalDecision: APPROVE
          autoApprovalExpiry: 30
          description: Approval Policy [terraform-approval-policy] created by Terraform
          enforcementType: HARD
    

    Create PolicyApproval Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PolicyApproval(name: string, args: PolicyApprovalArgs, opts?: CustomResourceOptions);
    @overload
    def PolicyApproval(resource_name: str,
                       args: PolicyApprovalArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def PolicyApproval(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       auto_approval_expiry: Optional[float] = None,
                       approval_level: Optional[float] = None,
                       approval_mode: Optional[str] = None,
                       approval_type: Optional[str] = None,
                       approvers: Optional[Sequence[str]] = None,
                       auto_approval_decision: Optional[str] = None,
                       enforcement_type: Optional[str] = None,
                       actions: Optional[Sequence[str]] = None,
                       project_criterias: Optional[Sequence[Mapping[str, str]]] = None,
                       description: Optional[str] = None,
                       name: Optional[str] = None,
                       policy_approval_id: Optional[str] = None,
                       criterias: Optional[Sequence[Mapping[str, str]]] = None,
                       project_id: Optional[str] = None)
    func NewPolicyApproval(ctx *Context, name string, args PolicyApprovalArgs, opts ...ResourceOption) (*PolicyApproval, error)
    public PolicyApproval(string name, PolicyApprovalArgs args, CustomResourceOptions? opts = null)
    public PolicyApproval(String name, PolicyApprovalArgs args)
    public PolicyApproval(String name, PolicyApprovalArgs args, CustomResourceOptions options)
    
    type: vra:PolicyApproval
    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 PolicyApprovalArgs
    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 PolicyApprovalArgs
    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 PolicyApprovalArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PolicyApprovalArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PolicyApprovalArgs
    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 policyApprovalResource = new Vra.PolicyApproval("policyApprovalResource", new()
    {
        AutoApprovalExpiry = 0,
        ApprovalLevel = 0,
        ApprovalMode = "string",
        ApprovalType = "string",
        Approvers = new[]
        {
            "string",
        },
        AutoApprovalDecision = "string",
        EnforcementType = "string",
        Actions = new[]
        {
            "string",
        },
        ProjectCriterias = new[]
        {
            
            {
                { "string", "string" },
            },
        },
        Description = "string",
        Name = "string",
        PolicyApprovalId = "string",
        Criterias = new[]
        {
            
            {
                { "string", "string" },
            },
        },
        ProjectId = "string",
    });
    
    example, err := vra.NewPolicyApproval(ctx, "policyApprovalResource", &vra.PolicyApprovalArgs{
    	AutoApprovalExpiry: pulumi.Float64(0),
    	ApprovalLevel:      pulumi.Float64(0),
    	ApprovalMode:       pulumi.String("string"),
    	ApprovalType:       pulumi.String("string"),
    	Approvers: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	AutoApprovalDecision: pulumi.String("string"),
    	EnforcementType:      pulumi.String("string"),
    	Actions: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ProjectCriterias: pulumi.StringMapArray{
    		pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    	},
    	Description:      pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	PolicyApprovalId: pulumi.String("string"),
    	Criterias: pulumi.StringMapArray{
    		pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    	},
    	ProjectId: pulumi.String("string"),
    })
    
    var policyApprovalResource = new PolicyApproval("policyApprovalResource", PolicyApprovalArgs.builder()
        .autoApprovalExpiry(0.0)
        .approvalLevel(0.0)
        .approvalMode("string")
        .approvalType("string")
        .approvers("string")
        .autoApprovalDecision("string")
        .enforcementType("string")
        .actions("string")
        .projectCriterias(Map.of("string", "string"))
        .description("string")
        .name("string")
        .policyApprovalId("string")
        .criterias(Map.of("string", "string"))
        .projectId("string")
        .build());
    
    policy_approval_resource = vra.PolicyApproval("policyApprovalResource",
        auto_approval_expiry=0,
        approval_level=0,
        approval_mode="string",
        approval_type="string",
        approvers=["string"],
        auto_approval_decision="string",
        enforcement_type="string",
        actions=["string"],
        project_criterias=[{
            "string": "string",
        }],
        description="string",
        name="string",
        policy_approval_id="string",
        criterias=[{
            "string": "string",
        }],
        project_id="string")
    
    const policyApprovalResource = new vra.PolicyApproval("policyApprovalResource", {
        autoApprovalExpiry: 0,
        approvalLevel: 0,
        approvalMode: "string",
        approvalType: "string",
        approvers: ["string"],
        autoApprovalDecision: "string",
        enforcementType: "string",
        actions: ["string"],
        projectCriterias: [{
            string: "string",
        }],
        description: "string",
        name: "string",
        policyApprovalId: "string",
        criterias: [{
            string: "string",
        }],
        projectId: "string",
    });
    
    type: vra:PolicyApproval
    properties:
        actions:
            - string
        approvalLevel: 0
        approvalMode: string
        approvalType: string
        approvers:
            - string
        autoApprovalDecision: string
        autoApprovalExpiry: 0
        criterias:
            - string: string
        description: string
        enforcementType: string
        name: string
        policyApprovalId: string
        projectCriterias:
            - string: string
        projectId: string
    

    PolicyApproval Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The PolicyApproval resource accepts the following input properties:

    Actions List<string>
    List of actions to trigger approval.
    ApprovalLevel double
    The level defines the order in which the policy is enforced. Level 1 approvals are applied first, followed by level 2 approvals, and so on. Valid range: 1 - 99.
    ApprovalMode string
    Who must approve the request. Supported values: ANY_OF, ALL_OF.
    ApprovalType string
    Approval Type. Supported values: USER, ROLE.
    Approvers List<string>
    List of approvers of the policy.
    AutoApprovalDecision string
    Automatically approve or reject a request after the number of days specified in the Auto expiry trigger field. Supported values: APPROVE, REJECT, NO_EXPIRY.
    AutoApprovalExpiry double
    The number of days the approvers have to respond before the Auto action is triggered. Valid range: 1 - 30.
    EnforcementType string
    The type of enforcement for the policy. Supported values: HARD, SOFT.
    Criterias List<ImmutableDictionary<string, string>>
    The policy criteria.
    Description string
    A human-friendly description for the policy instance.
    Name string
    A human-friendly name used as an identifier for the policy instance.
    PolicyApprovalId string
    ProjectCriterias List<ImmutableDictionary<string, string>>
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    ProjectId string
    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
    Actions []string
    List of actions to trigger approval.
    ApprovalLevel float64
    The level defines the order in which the policy is enforced. Level 1 approvals are applied first, followed by level 2 approvals, and so on. Valid range: 1 - 99.
    ApprovalMode string
    Who must approve the request. Supported values: ANY_OF, ALL_OF.
    ApprovalType string
    Approval Type. Supported values: USER, ROLE.
    Approvers []string
    List of approvers of the policy.
    AutoApprovalDecision string
    Automatically approve or reject a request after the number of days specified in the Auto expiry trigger field. Supported values: APPROVE, REJECT, NO_EXPIRY.
    AutoApprovalExpiry float64
    The number of days the approvers have to respond before the Auto action is triggered. Valid range: 1 - 30.
    EnforcementType string
    The type of enforcement for the policy. Supported values: HARD, SOFT.
    Criterias []map[string]string
    The policy criteria.
    Description string
    A human-friendly description for the policy instance.
    Name string
    A human-friendly name used as an identifier for the policy instance.
    PolicyApprovalId string
    ProjectCriterias []map[string]string
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    ProjectId string
    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
    actions List<String>
    List of actions to trigger approval.
    approvalLevel Double
    The level defines the order in which the policy is enforced. Level 1 approvals are applied first, followed by level 2 approvals, and so on. Valid range: 1 - 99.
    approvalMode String
    Who must approve the request. Supported values: ANY_OF, ALL_OF.
    approvalType String
    Approval Type. Supported values: USER, ROLE.
    approvers List<String>
    List of approvers of the policy.
    autoApprovalDecision String
    Automatically approve or reject a request after the number of days specified in the Auto expiry trigger field. Supported values: APPROVE, REJECT, NO_EXPIRY.
    autoApprovalExpiry Double
    The number of days the approvers have to respond before the Auto action is triggered. Valid range: 1 - 30.
    enforcementType String
    The type of enforcement for the policy. Supported values: HARD, SOFT.
    criterias List<Map<String,String>>
    The policy criteria.
    description String
    A human-friendly description for the policy instance.
    name String
    A human-friendly name used as an identifier for the policy instance.
    policyApprovalId String
    projectCriterias List<Map<String,String>>
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    projectId String
    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
    actions string[]
    List of actions to trigger approval.
    approvalLevel number
    The level defines the order in which the policy is enforced. Level 1 approvals are applied first, followed by level 2 approvals, and so on. Valid range: 1 - 99.
    approvalMode string
    Who must approve the request. Supported values: ANY_OF, ALL_OF.
    approvalType string
    Approval Type. Supported values: USER, ROLE.
    approvers string[]
    List of approvers of the policy.
    autoApprovalDecision string
    Automatically approve or reject a request after the number of days specified in the Auto expiry trigger field. Supported values: APPROVE, REJECT, NO_EXPIRY.
    autoApprovalExpiry number
    The number of days the approvers have to respond before the Auto action is triggered. Valid range: 1 - 30.
    enforcementType string
    The type of enforcement for the policy. Supported values: HARD, SOFT.
    criterias {[key: string]: string}[]
    The policy criteria.
    description string
    A human-friendly description for the policy instance.
    name string
    A human-friendly name used as an identifier for the policy instance.
    policyApprovalId string
    projectCriterias {[key: string]: string}[]
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    projectId string
    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
    actions Sequence[str]
    List of actions to trigger approval.
    approval_level float
    The level defines the order in which the policy is enforced. Level 1 approvals are applied first, followed by level 2 approvals, and so on. Valid range: 1 - 99.
    approval_mode str
    Who must approve the request. Supported values: ANY_OF, ALL_OF.
    approval_type str
    Approval Type. Supported values: USER, ROLE.
    approvers Sequence[str]
    List of approvers of the policy.
    auto_approval_decision str
    Automatically approve or reject a request after the number of days specified in the Auto expiry trigger field. Supported values: APPROVE, REJECT, NO_EXPIRY.
    auto_approval_expiry float
    The number of days the approvers have to respond before the Auto action is triggered. Valid range: 1 - 30.
    enforcement_type str
    The type of enforcement for the policy. Supported values: HARD, SOFT.
    criterias Sequence[Mapping[str, str]]
    The policy criteria.
    description str
    A human-friendly description for the policy instance.
    name str
    A human-friendly name used as an identifier for the policy instance.
    policy_approval_id str
    project_criterias Sequence[Mapping[str, str]]
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    project_id str
    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
    actions List<String>
    List of actions to trigger approval.
    approvalLevel Number
    The level defines the order in which the policy is enforced. Level 1 approvals are applied first, followed by level 2 approvals, and so on. Valid range: 1 - 99.
    approvalMode String
    Who must approve the request. Supported values: ANY_OF, ALL_OF.
    approvalType String
    Approval Type. Supported values: USER, ROLE.
    approvers List<String>
    List of approvers of the policy.
    autoApprovalDecision String
    Automatically approve or reject a request after the number of days specified in the Auto expiry trigger field. Supported values: APPROVE, REJECT, NO_EXPIRY.
    autoApprovalExpiry Number
    The number of days the approvers have to respond before the Auto action is triggered. Valid range: 1 - 30.
    enforcementType String
    The type of enforcement for the policy. Supported values: HARD, SOFT.
    criterias List<Map<String>>
    The policy criteria.
    description String
    A human-friendly description for the policy instance.
    name String
    A human-friendly name used as an identifier for the policy instance.
    policyApprovalId String
    projectCriterias List<Map<String>>
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    projectId String
    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PolicyApproval resource produces the following output properties:

    CreatedAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    CreatedBy string
    The user the entity was created by.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    LastUpdatedBy string
    The user the entity was last updated by.
    OrgId string
    The id of the organization this entity belongs to.
    CreatedAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    CreatedBy string
    The user the entity was created by.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    LastUpdatedBy string
    The user the entity was last updated by.
    OrgId string
    The id of the organization this entity belongs to.
    createdAt String
    Date when the entity was created. The date is in ISO 8601 and UTC.
    createdBy String
    The user the entity was created by.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdatedAt String
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    lastUpdatedBy String
    The user the entity was last updated by.
    orgId String
    The id of the organization this entity belongs to.
    createdAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    createdBy string
    The user the entity was created by.
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    lastUpdatedBy string
    The user the entity was last updated by.
    orgId string
    The id of the organization this entity belongs to.
    created_at str
    Date when the entity was created. The date is in ISO 8601 and UTC.
    created_by str
    The user the entity was created by.
    id str
    The provider-assigned unique ID for this managed resource.
    last_updated_at str
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    last_updated_by str
    The user the entity was last updated by.
    org_id str
    The id of the organization this entity belongs to.
    createdAt String
    Date when the entity was created. The date is in ISO 8601 and UTC.
    createdBy String
    The user the entity was created by.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdatedAt String
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    lastUpdatedBy String
    The user the entity was last updated by.
    orgId String
    The id of the organization this entity belongs to.

    Look up Existing PolicyApproval Resource

    Get an existing PolicyApproval 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?: PolicyApprovalState, opts?: CustomResourceOptions): PolicyApproval
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            actions: Optional[Sequence[str]] = None,
            approval_level: Optional[float] = None,
            approval_mode: Optional[str] = None,
            approval_type: Optional[str] = None,
            approvers: Optional[Sequence[str]] = None,
            auto_approval_decision: Optional[str] = None,
            auto_approval_expiry: Optional[float] = None,
            created_at: Optional[str] = None,
            created_by: Optional[str] = None,
            criterias: Optional[Sequence[Mapping[str, str]]] = None,
            description: Optional[str] = None,
            enforcement_type: Optional[str] = None,
            last_updated_at: Optional[str] = None,
            last_updated_by: Optional[str] = None,
            name: Optional[str] = None,
            org_id: Optional[str] = None,
            policy_approval_id: Optional[str] = None,
            project_criterias: Optional[Sequence[Mapping[str, str]]] = None,
            project_id: Optional[str] = None) -> PolicyApproval
    func GetPolicyApproval(ctx *Context, name string, id IDInput, state *PolicyApprovalState, opts ...ResourceOption) (*PolicyApproval, error)
    public static PolicyApproval Get(string name, Input<string> id, PolicyApprovalState? state, CustomResourceOptions? opts = null)
    public static PolicyApproval get(String name, Output<String> id, PolicyApprovalState state, CustomResourceOptions options)
    resources:  _:    type: vra:PolicyApproval    get:      id: ${id}
    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.
    The following state arguments are supported:
    Actions List<string>
    List of actions to trigger approval.
    ApprovalLevel double
    The level defines the order in which the policy is enforced. Level 1 approvals are applied first, followed by level 2 approvals, and so on. Valid range: 1 - 99.
    ApprovalMode string
    Who must approve the request. Supported values: ANY_OF, ALL_OF.
    ApprovalType string
    Approval Type. Supported values: USER, ROLE.
    Approvers List<string>
    List of approvers of the policy.
    AutoApprovalDecision string
    Automatically approve or reject a request after the number of days specified in the Auto expiry trigger field. Supported values: APPROVE, REJECT, NO_EXPIRY.
    AutoApprovalExpiry double
    The number of days the approvers have to respond before the Auto action is triggered. Valid range: 1 - 30.
    CreatedAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    CreatedBy string
    The user the entity was created by.
    Criterias List<ImmutableDictionary<string, string>>
    The policy criteria.
    Description string
    A human-friendly description for the policy instance.
    EnforcementType string
    The type of enforcement for the policy. Supported values: HARD, SOFT.
    LastUpdatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    LastUpdatedBy string
    The user the entity was last updated by.
    Name string
    A human-friendly name used as an identifier for the policy instance.
    OrgId string
    The id of the organization this entity belongs to.
    PolicyApprovalId string
    ProjectCriterias List<ImmutableDictionary<string, string>>
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    ProjectId string
    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
    Actions []string
    List of actions to trigger approval.
    ApprovalLevel float64
    The level defines the order in which the policy is enforced. Level 1 approvals are applied first, followed by level 2 approvals, and so on. Valid range: 1 - 99.
    ApprovalMode string
    Who must approve the request. Supported values: ANY_OF, ALL_OF.
    ApprovalType string
    Approval Type. Supported values: USER, ROLE.
    Approvers []string
    List of approvers of the policy.
    AutoApprovalDecision string
    Automatically approve or reject a request after the number of days specified in the Auto expiry trigger field. Supported values: APPROVE, REJECT, NO_EXPIRY.
    AutoApprovalExpiry float64
    The number of days the approvers have to respond before the Auto action is triggered. Valid range: 1 - 30.
    CreatedAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    CreatedBy string
    The user the entity was created by.
    Criterias []map[string]string
    The policy criteria.
    Description string
    A human-friendly description for the policy instance.
    EnforcementType string
    The type of enforcement for the policy. Supported values: HARD, SOFT.
    LastUpdatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    LastUpdatedBy string
    The user the entity was last updated by.
    Name string
    A human-friendly name used as an identifier for the policy instance.
    OrgId string
    The id of the organization this entity belongs to.
    PolicyApprovalId string
    ProjectCriterias []map[string]string
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    ProjectId string
    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
    actions List<String>
    List of actions to trigger approval.
    approvalLevel Double
    The level defines the order in which the policy is enforced. Level 1 approvals are applied first, followed by level 2 approvals, and so on. Valid range: 1 - 99.
    approvalMode String
    Who must approve the request. Supported values: ANY_OF, ALL_OF.
    approvalType String
    Approval Type. Supported values: USER, ROLE.
    approvers List<String>
    List of approvers of the policy.
    autoApprovalDecision String
    Automatically approve or reject a request after the number of days specified in the Auto expiry trigger field. Supported values: APPROVE, REJECT, NO_EXPIRY.
    autoApprovalExpiry Double
    The number of days the approvers have to respond before the Auto action is triggered. Valid range: 1 - 30.
    createdAt String
    Date when the entity was created. The date is in ISO 8601 and UTC.
    createdBy String
    The user the entity was created by.
    criterias List<Map<String,String>>
    The policy criteria.
    description String
    A human-friendly description for the policy instance.
    enforcementType String
    The type of enforcement for the policy. Supported values: HARD, SOFT.
    lastUpdatedAt String
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    lastUpdatedBy String
    The user the entity was last updated by.
    name String
    A human-friendly name used as an identifier for the policy instance.
    orgId String
    The id of the organization this entity belongs to.
    policyApprovalId String
    projectCriterias List<Map<String,String>>
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    projectId String
    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
    actions string[]
    List of actions to trigger approval.
    approvalLevel number
    The level defines the order in which the policy is enforced. Level 1 approvals are applied first, followed by level 2 approvals, and so on. Valid range: 1 - 99.
    approvalMode string
    Who must approve the request. Supported values: ANY_OF, ALL_OF.
    approvalType string
    Approval Type. Supported values: USER, ROLE.
    approvers string[]
    List of approvers of the policy.
    autoApprovalDecision string
    Automatically approve or reject a request after the number of days specified in the Auto expiry trigger field. Supported values: APPROVE, REJECT, NO_EXPIRY.
    autoApprovalExpiry number
    The number of days the approvers have to respond before the Auto action is triggered. Valid range: 1 - 30.
    createdAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    createdBy string
    The user the entity was created by.
    criterias {[key: string]: string}[]
    The policy criteria.
    description string
    A human-friendly description for the policy instance.
    enforcementType string
    The type of enforcement for the policy. Supported values: HARD, SOFT.
    lastUpdatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    lastUpdatedBy string
    The user the entity was last updated by.
    name string
    A human-friendly name used as an identifier for the policy instance.
    orgId string
    The id of the organization this entity belongs to.
    policyApprovalId string
    projectCriterias {[key: string]: string}[]
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    projectId string
    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
    actions Sequence[str]
    List of actions to trigger approval.
    approval_level float
    The level defines the order in which the policy is enforced. Level 1 approvals are applied first, followed by level 2 approvals, and so on. Valid range: 1 - 99.
    approval_mode str
    Who must approve the request. Supported values: ANY_OF, ALL_OF.
    approval_type str
    Approval Type. Supported values: USER, ROLE.
    approvers Sequence[str]
    List of approvers of the policy.
    auto_approval_decision str
    Automatically approve or reject a request after the number of days specified in the Auto expiry trigger field. Supported values: APPROVE, REJECT, NO_EXPIRY.
    auto_approval_expiry float
    The number of days the approvers have to respond before the Auto action is triggered. Valid range: 1 - 30.
    created_at str
    Date when the entity was created. The date is in ISO 8601 and UTC.
    created_by str
    The user the entity was created by.
    criterias Sequence[Mapping[str, str]]
    The policy criteria.
    description str
    A human-friendly description for the policy instance.
    enforcement_type str
    The type of enforcement for the policy. Supported values: HARD, SOFT.
    last_updated_at str
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    last_updated_by str
    The user the entity was last updated by.
    name str
    A human-friendly name used as an identifier for the policy instance.
    org_id str
    The id of the organization this entity belongs to.
    policy_approval_id str
    project_criterias Sequence[Mapping[str, str]]
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    project_id str
    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
    actions List<String>
    List of actions to trigger approval.
    approvalLevel Number
    The level defines the order in which the policy is enforced. Level 1 approvals are applied first, followed by level 2 approvals, and so on. Valid range: 1 - 99.
    approvalMode String
    Who must approve the request. Supported values: ANY_OF, ALL_OF.
    approvalType String
    Approval Type. Supported values: USER, ROLE.
    approvers List<String>
    List of approvers of the policy.
    autoApprovalDecision String
    Automatically approve or reject a request after the number of days specified in the Auto expiry trigger field. Supported values: APPROVE, REJECT, NO_EXPIRY.
    autoApprovalExpiry Number
    The number of days the approvers have to respond before the Auto action is triggered. Valid range: 1 - 30.
    createdAt String
    Date when the entity was created. The date is in ISO 8601 and UTC.
    createdBy String
    The user the entity was created by.
    criterias List<Map<String>>
    The policy criteria.
    description String
    A human-friendly description for the policy instance.
    enforcementType String
    The type of enforcement for the policy. Supported values: HARD, SOFT.
    lastUpdatedAt String
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    lastUpdatedBy String
    The user the entity was last updated by.
    name String
    A human-friendly name used as an identifier for the policy instance.
    orgId String
    The id of the organization this entity belongs to.
    policyApprovalId String
    projectCriterias List<Map<String>>
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    projectId String
    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.

    Import

    To import an existing Approval policy, use the id as in the following example:

    $ pulumi import vra:index/policyApproval:PolicyApproval policy_approval "f40657aa-3089-4b80-8970-a8fa6f9f5314"`
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    vra vmware/terraform-provider-vra
    License
    Notes
    This Pulumi package is based on the vra Terraform Provider.
    vra logo
    vra 0.13.0 published on Wednesday, May 14, 2025 by vmware