This provider is currently in preview.
published on Thursday, May 21, 2026 by Pulumi
This provider is currently in preview.
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:
- 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 stringId - 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 stringId - 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_ stringid - 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 StringId - 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 stringId - 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_ strid - 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.
- 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 StringId - 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.
- Applied
Policy List<object>Packs - List of policy packs that are applied to this policy group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Org boolDefault - 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.
- Applied
Policy []interface{}Packs - List of policy packs that are applied to this policy group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Org boolDefault - 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_ list(any)packs - List of policy packs that are applied to this policy group.
- id string
- The provider-assigned unique ID for this managed resource.
- is_
org_ booldefault - 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.
- applied
Policy List<Object>Packs - List of policy packs that are applied to this policy group.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Org BooleanDefault - 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.
- applied
Policy any[]Packs - List of policy packs that are applied to this policy group.
- id string
- The provider-assigned unique ID for this managed resource.
- is
Org booleanDefault - 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_ Sequence[Any]packs - List of policy packs that are applied to this policy group.
- id str
- The provider-assigned unique ID for this managed resource.
- is_
org_ booldefault - 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.
- applied
Policy List<Any>Packs - List of policy packs that are applied to this policy group.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Org BooleanDefault - 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
This provider is currently in preview.
published on Thursday, May 21, 2026 by Pulumi