1. Packages
  2. Packages
  3. Pulumi Cloud (Pulumi Service provider)
  4. API Docs
  5. api
  6. PolicyGroup

This provider is currently in preview.

Viewing docs for Pulumi Cloud v1.1.0
published on Thursday, May 21, 2026 by Pulumi
pulumiservice logo

This provider is currently in preview.

Viewing docs for Pulumi Cloud v1.1.0
published on Thursday, May 21, 2026 by Pulumi

    Creates a new Policy Group for an organization. Policy Groups define which Policy Packs are enforced on which stacks or cloud accounts, with configurable enforcement levels (advisory, mandatory, or disabled) per pack. This allows different policy strictness for different environments, such as advisory-only in development and mandatory in production.

    Create PolicyGroup Resource

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

    Constructor syntax

    new PolicyGroup(name: string, args: PolicyGroupArgs, opts?: CustomResourceOptions);
    @overload
    def PolicyGroup(resource_name: str,
                    args: PolicyGroupArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def PolicyGroup(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    entity_type: Optional[str] = None,
                    name: Optional[str] = None,
                    org_name: Optional[str] = None,
                    agent_pool_id: Optional[str] = None,
                    mode: Optional[str] = None)
    func NewPolicyGroup(ctx *Context, name string, args PolicyGroupArgs, opts ...ResourceOption) (*PolicyGroup, error)
    public PolicyGroup(string name, PolicyGroupArgs args, CustomResourceOptions? opts = null)
    public PolicyGroup(String name, PolicyGroupArgs args)
    public PolicyGroup(String name, PolicyGroupArgs args, CustomResourceOptions options)
    
    type: pulumiservice:api:PolicyGroup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "pulumiservice_api_policygroup" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args PolicyGroupArgs
    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 PolicyGroupArgs
    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 PolicyGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PolicyGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PolicyGroupArgs
    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 policyGroupResource = new PulumiService.Api.PolicyGroup("policyGroupResource", new()
    {
        EntityType = "string",
        Name = "string",
        OrgName = "string",
        AgentPoolId = "string",
        Mode = "string",
    });
    
    example, err := api.NewPolicyGroup(ctx, "policyGroupResource", &api.PolicyGroupArgs{
    	EntityType:  pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	OrgName:     pulumi.String("string"),
    	AgentPoolId: pulumi.String("string"),
    	Mode:        pulumi.String("string"),
    })
    
    resource "pulumiservice_api_policygroup" "policyGroupResource" {
      entity_type   = "string"
      name          = "string"
      org_name      = "string"
      agent_pool_id = "string"
      mode          = "string"
    }
    
    var policyGroupResource = new com.pulumi.pulumiservice.api.PolicyGroup("policyGroupResource", com.pulumi.pulumiservice.api.PolicyGroupArgs.builder()
        .entityType("string")
        .name("string")
        .orgName("string")
        .agentPoolId("string")
        .mode("string")
        .build());
    
    policy_group_resource = pulumiservice.api.PolicyGroup("policyGroupResource",
        entity_type="string",
        name="string",
        org_name="string",
        agent_pool_id="string",
        mode="string")
    
    const policyGroupResource = new pulumiservice.api.PolicyGroup("policyGroupResource", {
        entityType: "string",
        name: "string",
        orgName: "string",
        agentPoolId: "string",
        mode: "string",
    });
    
    type: pulumiservice:api:PolicyGroup
    properties:
        agentPoolId: string
        entityType: string
        mode: string
        name: string
        orgName: string
    

    PolicyGroup 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 PolicyGroup resource accepts the following input properties:

    EntityType string
    The type of entities this policy group applies to (stacks or accounts).
    Name string
    The name of the new policy group.
    OrgName string
    The organization name
    AgentPoolId string
    Agent pool ID for policy evaluation. Defaults to Pulumi hosted pool if not specified.
    Mode string
    The enforcement mode for the policy group (audit or preventative). Defaults to 'audit' for account policy groups, 'preventative' for stack policy groups.
    EntityType string
    The type of entities this policy group applies to (stacks or accounts).
    Name string
    The name of the new policy group.
    OrgName string
    The organization name
    AgentPoolId string
    Agent pool ID for policy evaluation. Defaults to Pulumi hosted pool if not specified.
    Mode string
    The enforcement mode for the policy group (audit or preventative). Defaults to 'audit' for account policy groups, 'preventative' for stack policy groups.
    entity_type string
    The type of entities this policy group applies to (stacks or accounts).
    name string
    The name of the new policy group.
    org_name string
    The organization name
    agent_pool_id string
    Agent pool ID for policy evaluation. Defaults to Pulumi hosted pool if not specified.
    mode string
    The enforcement mode for the policy group (audit or preventative). Defaults to 'audit' for account policy groups, 'preventative' for stack policy groups.
    entityType String
    The type of entities this policy group applies to (stacks or accounts).
    name String
    The name of the new policy group.
    orgName String
    The organization name
    agentPoolId String
    Agent pool ID for policy evaluation. Defaults to Pulumi hosted pool if not specified.
    mode String
    The enforcement mode for the policy group (audit or preventative). Defaults to 'audit' for account policy groups, 'preventative' for stack policy groups.
    entityType string
    The type of entities this policy group applies to (stacks or accounts).
    name string
    The name of the new policy group.
    orgName string
    The organization name
    agentPoolId string
    Agent pool ID for policy evaluation. Defaults to Pulumi hosted pool if not specified.
    mode string
    The enforcement mode for the policy group (audit or preventative). Defaults to 'audit' for account policy groups, 'preventative' for stack policy groups.
    entity_type str
    The type of entities this policy group applies to (stacks or accounts).
    name str
    The name of the new policy group.
    org_name str
    The organization name
    agent_pool_id str
    Agent pool ID for policy evaluation. Defaults to Pulumi hosted pool if not specified.
    mode str
    The enforcement mode for the policy group (audit or preventative). Defaults to 'audit' for account policy groups, 'preventative' for stack policy groups.
    entityType String
    The type of entities this policy group applies to (stacks or accounts).
    name String
    The name of the new policy group.
    orgName String
    The organization name
    agentPoolId String
    Agent pool ID for policy evaluation. Defaults to Pulumi hosted pool if not specified.
    mode String
    The enforcement mode for the policy group (audit or preventative). Defaults to 'audit' for account policy groups, 'preventative' for stack policy groups.

    Outputs

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

    Accounts List<string>
    List of Insights account names that are members of this policy group.
    AppliedPolicyPacks List<object>
    List of policy packs that are applied to this policy group.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsOrgDefault bool
    True if this is either the default stacks or default accounts policy group for the organization.
    Stacks List<object>
    List of stacks that are members of this policy group.
    Accounts []string
    List of Insights account names that are members of this policy group.
    AppliedPolicyPacks []interface{}
    List of policy packs that are applied to this policy group.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsOrgDefault bool
    True if this is either the default stacks or default accounts policy group for the organization.
    Stacks []interface{}
    List of stacks that are members of this policy group.
    accounts list(string)
    List of Insights account names that are members of this policy group.
    applied_policy_packs list(any)
    List of policy packs that are applied to this policy group.
    id string
    The provider-assigned unique ID for this managed resource.
    is_org_default bool
    True if this is either the default stacks or default accounts policy group for the organization.
    stacks list(any)
    List of stacks that are members of this policy group.
    accounts List<String>
    List of Insights account names that are members of this policy group.
    appliedPolicyPacks List<Object>
    List of policy packs that are applied to this policy group.
    id String
    The provider-assigned unique ID for this managed resource.
    isOrgDefault Boolean
    True if this is either the default stacks or default accounts policy group for the organization.
    stacks List<Object>
    List of stacks that are members of this policy group.
    accounts string[]
    List of Insights account names that are members of this policy group.
    appliedPolicyPacks any[]
    List of policy packs that are applied to this policy group.
    id string
    The provider-assigned unique ID for this managed resource.
    isOrgDefault boolean
    True if this is either the default stacks or default accounts policy group for the organization.
    stacks any[]
    List of stacks that are members of this policy group.
    accounts Sequence[str]
    List of Insights account names that are members of this policy group.
    applied_policy_packs Sequence[Any]
    List of policy packs that are applied to this policy group.
    id str
    The provider-assigned unique ID for this managed resource.
    is_org_default bool
    True if this is either the default stacks or default accounts policy group for the organization.
    stacks Sequence[Any]
    List of stacks that are members of this policy group.
    accounts List<String>
    List of Insights account names that are members of this policy group.
    appliedPolicyPacks List<Any>
    List of policy packs that are applied to this policy group.
    id String
    The provider-assigned unique ID for this managed resource.
    isOrgDefault Boolean
    True if this is either the default stacks or default accounts policy group for the organization.
    stacks List<Any>
    List of stacks that are members of this policy group.

    Package Details

    Repository
    pulumiservice pulumi/pulumi-pulumiservice
    License
    Apache-2.0
    pulumiservice logo

    This provider is currently in preview.

    Viewing docs for Pulumi Cloud v1.1.0
    published on Thursday, May 21, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial