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

This provider is currently in preview.

Pulumi Cloud v0.34.0 published on Friday, Jan 23, 2026 by Pulumi
pulumiservice logo

This provider is currently in preview.

Pulumi Cloud v0.34.0 published on Friday, Jan 23, 2026 by Pulumi

    A Policy Group allows you to apply policy packs to a set of stacks in your organization.

    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,
                    name: Optional[str] = None,
                    organization_name: Optional[str] = None,
                    accounts: Optional[Sequence[str]] = None,
                    entity_type: Optional[str] = None,
                    mode: Optional[str] = None,
                    policy_packs: Optional[Sequence[PolicyGroupPolicyPackReferenceArgs]] = None,
                    stacks: Optional[Sequence[PolicyGroupStackReferenceArgs]] = 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:PolicyGroup
    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 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.PolicyGroup("policyGroupResource", new()
    {
        Name = "string",
        OrganizationName = "string",
        Accounts = new[]
        {
            "string",
        },
        EntityType = "string",
        Mode = "string",
        PolicyPacks = new[]
        {
            new PulumiService.Inputs.PolicyGroupPolicyPackReferenceArgs
            {
                Name = "string",
                Config = 
                {
                    { "string", "any" },
                },
                DisplayName = "string",
                Version = 0,
                VersionTag = "string",
            },
        },
        Stacks = new[]
        {
            new PulumiService.Inputs.PolicyGroupStackReferenceArgs
            {
                Name = "string",
                RoutingProject = "string",
            },
        },
    });
    
    example, err := pulumiservice.NewPolicyGroup(ctx, "policyGroupResource", &pulumiservice.PolicyGroupArgs{
    	Name:             pulumi.String("string"),
    	OrganizationName: pulumi.String("string"),
    	Accounts: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	EntityType: pulumi.String("string"),
    	Mode:       pulumi.String("string"),
    	PolicyPacks: pulumiservice.PolicyGroupPolicyPackReferenceArray{
    		&pulumiservice.PolicyGroupPolicyPackReferenceArgs{
    			Name: pulumi.String("string"),
    			Config: pulumi.Map{
    				"string": pulumi.Any("any"),
    			},
    			DisplayName: pulumi.String("string"),
    			Version:     pulumi.Float64(0),
    			VersionTag:  pulumi.String("string"),
    		},
    	},
    	Stacks: pulumiservice.PolicyGroupStackReferenceArray{
    		&pulumiservice.PolicyGroupStackReferenceArgs{
    			Name:           pulumi.String("string"),
    			RoutingProject: pulumi.String("string"),
    		},
    	},
    })
    
    var policyGroupResource = new PolicyGroup("policyGroupResource", PolicyGroupArgs.builder()
        .name("string")
        .organizationName("string")
        .accounts("string")
        .entityType("string")
        .mode("string")
        .policyPacks(PolicyGroupPolicyPackReferenceArgs.builder()
            .name("string")
            .config(Map.of("string", "any"))
            .displayName("string")
            .version(0.0)
            .versionTag("string")
            .build())
        .stacks(PolicyGroupStackReferenceArgs.builder()
            .name("string")
            .routingProject("string")
            .build())
        .build());
    
    policy_group_resource = pulumiservice.PolicyGroup("policyGroupResource",
        name="string",
        organization_name="string",
        accounts=["string"],
        entity_type="string",
        mode="string",
        policy_packs=[{
            "name": "string",
            "config": {
                "string": "any",
            },
            "display_name": "string",
            "version": 0,
            "version_tag": "string",
        }],
        stacks=[{
            "name": "string",
            "routing_project": "string",
        }])
    
    const policyGroupResource = new pulumiservice.PolicyGroup("policyGroupResource", {
        name: "string",
        organizationName: "string",
        accounts: ["string"],
        entityType: "string",
        mode: "string",
        policyPacks: [{
            name: "string",
            config: {
                string: "any",
            },
            displayName: "string",
            version: 0,
            versionTag: "string",
        }],
        stacks: [{
            name: "string",
            routingProject: "string",
        }],
    });
    
    type: pulumiservice:PolicyGroup
    properties:
        accounts:
            - string
        entityType: string
        mode: string
        name: string
        organizationName: string
        policyPacks:
            - config:
                string: any
              displayName: string
              name: string
              version: 0
              versionTag: string
        stacks:
            - name: string
              routingProject: 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:

    Name string
    The name of the policy group.
    OrganizationName string
    The name of the Pulumi organization the policy group belongs to.
    Accounts List<string>
    List of accounts that belong to this policy group.
    EntityType string
    The entity type for the policy group. Valid values are 'stacks' or 'accounts'. Defaults to 'stacks'.
    Mode string
    The mode for the policy group. Valid values are 'audit' (reports violations) or 'preventative' (blocks operations). Defaults to 'audit'.
    PolicyPacks List<Pulumi.PulumiService.Inputs.PolicyGroupPolicyPackReference>
    List of policy packs applied to this policy group.
    Stacks List<Pulumi.PulumiService.Inputs.PolicyGroupStackReference>
    List of stack references that belong to this policy group.
    Name string
    The name of the policy group.
    OrganizationName string
    The name of the Pulumi organization the policy group belongs to.
    Accounts []string
    List of accounts that belong to this policy group.
    EntityType string
    The entity type for the policy group. Valid values are 'stacks' or 'accounts'. Defaults to 'stacks'.
    Mode string
    The mode for the policy group. Valid values are 'audit' (reports violations) or 'preventative' (blocks operations). Defaults to 'audit'.
    PolicyPacks []PolicyGroupPolicyPackReferenceArgs
    List of policy packs applied to this policy group.
    Stacks []PolicyGroupStackReferenceArgs
    List of stack references that belong to this policy group.
    name String
    The name of the policy group.
    organizationName String
    The name of the Pulumi organization the policy group belongs to.
    accounts List<String>
    List of accounts that belong to this policy group.
    entityType String
    The entity type for the policy group. Valid values are 'stacks' or 'accounts'. Defaults to 'stacks'.
    mode String
    The mode for the policy group. Valid values are 'audit' (reports violations) or 'preventative' (blocks operations). Defaults to 'audit'.
    policyPacks List<PolicyGroupPolicyPackReference>
    List of policy packs applied to this policy group.
    stacks List<PolicyGroupStackReference>
    List of stack references that belong to this policy group.
    name string
    The name of the policy group.
    organizationName string
    The name of the Pulumi organization the policy group belongs to.
    accounts string[]
    List of accounts that belong to this policy group.
    entityType string
    The entity type for the policy group. Valid values are 'stacks' or 'accounts'. Defaults to 'stacks'.
    mode string
    The mode for the policy group. Valid values are 'audit' (reports violations) or 'preventative' (blocks operations). Defaults to 'audit'.
    policyPacks PolicyGroupPolicyPackReference[]
    List of policy packs applied to this policy group.
    stacks PolicyGroupStackReference[]
    List of stack references that belong to this policy group.
    name str
    The name of the policy group.
    organization_name str
    The name of the Pulumi organization the policy group belongs to.
    accounts Sequence[str]
    List of accounts that belong to this policy group.
    entity_type str
    The entity type for the policy group. Valid values are 'stacks' or 'accounts'. Defaults to 'stacks'.
    mode str
    The mode for the policy group. Valid values are 'audit' (reports violations) or 'preventative' (blocks operations). Defaults to 'audit'.
    policy_packs Sequence[PolicyGroupPolicyPackReferenceArgs]
    List of policy packs applied to this policy group.
    stacks Sequence[PolicyGroupStackReferenceArgs]
    List of stack references that belong to this policy group.
    name String
    The name of the policy group.
    organizationName String
    The name of the Pulumi organization the policy group belongs to.
    accounts List<String>
    List of accounts that belong to this policy group.
    entityType String
    The entity type for the policy group. Valid values are 'stacks' or 'accounts'. Defaults to 'stacks'.
    mode String
    The mode for the policy group. Valid values are 'audit' (reports violations) or 'preventative' (blocks operations). Defaults to 'audit'.
    policyPacks List<Property Map>
    List of policy packs applied to this policy group.
    stacks List<Property Map>
    List of stack references that belong to this policy group.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PolicyGroup 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.

    Supporting Types

    PolicyGroupPolicyPackReference, PolicyGroupPolicyPackReferenceArgs

    A reference to a policy pack within a policy group.
    Name string
    The name of the policy pack.
    Config Dictionary<string, object>
    Optional configuration for the policy pack.
    DisplayName string
    The display name of the policy pack.
    Version double
    The version of the policy pack.
    VersionTag string
    The version tag of the policy pack.
    Name string
    The name of the policy pack.
    Config map[string]interface{}
    Optional configuration for the policy pack.
    DisplayName string
    The display name of the policy pack.
    Version float64
    The version of the policy pack.
    VersionTag string
    The version tag of the policy pack.
    name String
    The name of the policy pack.
    config Map<String,Object>
    Optional configuration for the policy pack.
    displayName String
    The display name of the policy pack.
    version Double
    The version of the policy pack.
    versionTag String
    The version tag of the policy pack.
    name string
    The name of the policy pack.
    config {[key: string]: any}
    Optional configuration for the policy pack.
    displayName string
    The display name of the policy pack.
    version number
    The version of the policy pack.
    versionTag string
    The version tag of the policy pack.
    name str
    The name of the policy pack.
    config Mapping[str, Any]
    Optional configuration for the policy pack.
    display_name str
    The display name of the policy pack.
    version float
    The version of the policy pack.
    version_tag str
    The version tag of the policy pack.
    name String
    The name of the policy pack.
    config Map<Any>
    Optional configuration for the policy pack.
    displayName String
    The display name of the policy pack.
    version Number
    The version of the policy pack.
    versionTag String
    The version tag of the policy pack.

    PolicyGroupStackReference, PolicyGroupStackReferenceArgs

    A reference to a stack within a policy group.
    Name string
    The name of the stack.
    RoutingProject string
    The routing project name (also known as project name).
    Name string
    The name of the stack.
    RoutingProject string
    The routing project name (also known as project name).
    name String
    The name of the stack.
    routingProject String
    The routing project name (also known as project name).
    name string
    The name of the stack.
    routingProject string
    The routing project name (also known as project name).
    name str
    The name of the stack.
    routing_project str
    The routing project name (also known as project name).
    name String
    The name of the stack.
    routingProject String
    The routing project name (also known as project name).

    Package Details

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

    This provider is currently in preview.

    Pulumi Cloud v0.34.0 published on Friday, Jan 23, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate