This provider is currently in preview.
This provider is currently in preview.
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.
- Organization
Name string - The name of the Pulumi organization the policy group belongs to.
- Accounts List<string>
- List of accounts that belong to this policy group.
- Entity
Type 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'.
- Policy
Packs List<Pulumi.Pulumi Service. Inputs. Policy Group Policy Pack Reference> - List of policy packs applied to this policy group.
- Stacks
List<Pulumi.
Pulumi Service. Inputs. Policy Group Stack Reference> - List of stack references that belong to this policy group.
- Name string
- The name of the policy group.
- Organization
Name string - The name of the Pulumi organization the policy group belongs to.
- Accounts []string
- List of accounts that belong to this policy group.
- Entity
Type 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'.
- Policy
Packs []PolicyGroup Policy Pack Reference Args - List of policy packs applied to this policy group.
- Stacks
[]Policy
Group Stack Reference Args - List of stack references that belong to this policy group.
- name String
- The name of the policy group.
- organization
Name String - The name of the Pulumi organization the policy group belongs to.
- accounts List<String>
- List of accounts that belong to this policy group.
- entity
Type 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'.
- policy
Packs List<PolicyGroup Policy Pack Reference> - List of policy packs applied to this policy group.
- stacks
List<Policy
Group Stack Reference> - List of stack references that belong to this policy group.
- name string
- The name of the policy group.
- organization
Name string - The name of the Pulumi organization the policy group belongs to.
- accounts string[]
- List of accounts that belong to this policy group.
- entity
Type 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'.
- policy
Packs PolicyGroup Policy Pack Reference[] - List of policy packs applied to this policy group.
- stacks
Policy
Group Stack Reference[] - 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[PolicyGroup Policy Pack Reference Args] - List of policy packs applied to this policy group.
- stacks
Sequence[Policy
Group Stack Reference Args] - List of stack references that belong to this policy group.
- name String
- The name of the policy group.
- organization
Name String - The name of the Pulumi organization the policy group belongs to.
- accounts List<String>
- List of accounts that belong to this policy group.
- entity
Type 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'.
- policy
Packs 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.
- Display
Name string - The display name of the policy pack.
- Version double
- The version of the policy pack.
- Version
Tag 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.
- Display
Name string - The display name of the policy pack.
- Version float64
- The version of the policy pack.
- Version
Tag 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.
- display
Name String - The display name of the policy pack.
- version Double
- The version of the policy pack.
- version
Tag 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.
- display
Name string - The display name of the policy pack.
- version number
- The version of the policy pack.
- version
Tag 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.
- display
Name String - The display name of the policy pack.
- version Number
- The version of the policy pack.
- version
Tag 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.
- Routing
Project string - The routing project name (also known as project name).
- Name string
- The name of the stack.
- Routing
Project string - The routing project name (also known as project name).
- name String
- The name of the stack.
- routing
Project String - The routing project name (also known as project name).
- name string
- The name of the stack.
- routing
Project 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.
- routing
Project String - The routing project name (also known as project name).
Package Details
- Repository
- pulumiservice pulumi/pulumi-pulumiservice
- License
- Apache-2.0
This provider is currently in preview.
