Documentation ¶
Overview ¶
nolint: lll Package policy exports types, functions, subpackages for provisioning policy resources.
> This provider is a derived work of the [Terraform Provider](https://github.com/terraform-providers/terraform-provider-azure) > distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature, > first check the [`pulumi/pulumi-azure` repo](https://github.com/pulumi/pulumi-azure/issues); however, if that doesn't turn up anything, > please consult the source [`terraform-providers/terraform-provider-azure` repo](https://github.com/terraform-providers/terraform-provider-azure/issues).
Index ¶
- type Assignment
- func (r *Assignment) Description() *pulumi.StringOutput
- func (r *Assignment) DisplayName() *pulumi.StringOutput
- func (r *Assignment) ID() *pulumi.IDOutput
- func (r *Assignment) Identity() *pulumi.Output
- func (r *Assignment) Location() *pulumi.StringOutput
- func (r *Assignment) Name() *pulumi.StringOutput
- func (r *Assignment) NotScopes() *pulumi.ArrayOutput
- func (r *Assignment) Parameters() *pulumi.StringOutput
- func (r *Assignment) PolicyDefinitionId() *pulumi.StringOutput
- func (r *Assignment) Scope() *pulumi.StringOutput
- func (r *Assignment) URN() *pulumi.URNOutput
- type AssignmentArgs
- type AssignmentState
- type Definition
- func (r *Definition) Description() *pulumi.StringOutput
- func (r *Definition) DisplayName() *pulumi.StringOutput
- func (r *Definition) ID() *pulumi.IDOutput
- func (r *Definition) ManagementGroupId() *pulumi.StringOutput
- func (r *Definition) Metadata() *pulumi.StringOutput
- func (r *Definition) Mode() *pulumi.StringOutput
- func (r *Definition) Name() *pulumi.StringOutput
- func (r *Definition) Parameters() *pulumi.StringOutput
- func (r *Definition) PolicyRule() *pulumi.StringOutput
- func (r *Definition) PolicyType() *pulumi.StringOutput
- func (r *Definition) URN() *pulumi.URNOutput
- type DefinitionArgs
- type DefinitionState
- type GetPolicyDefintionArgs
- type GetPolicyDefintionResult
- type PolicySetDefinition
- func (r *PolicySetDefinition) Description() *pulumi.StringOutput
- func (r *PolicySetDefinition) DisplayName() *pulumi.StringOutput
- func (r *PolicySetDefinition) ID() *pulumi.IDOutput
- func (r *PolicySetDefinition) ManagementGroupId() *pulumi.StringOutput
- func (r *PolicySetDefinition) Metadata() *pulumi.StringOutput
- func (r *PolicySetDefinition) Name() *pulumi.StringOutput
- func (r *PolicySetDefinition) Parameters() *pulumi.StringOutput
- func (r *PolicySetDefinition) PolicyDefinitions() *pulumi.StringOutput
- func (r *PolicySetDefinition) PolicyType() *pulumi.StringOutput
- func (r *PolicySetDefinition) URN() *pulumi.URNOutput
- type PolicySetDefinitionArgs
- type PolicySetDefinitionState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assignment ¶
type Assignment struct {
// contains filtered or unexported fields
}
Configures the specified Policy Definition at the specified Scope. Also, Policy Set Definitions are supported.
> This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/policy_assignment.html.markdown.
func GetAssignment ¶
func GetAssignment(ctx *pulumi.Context, name string, id pulumi.ID, state *AssignmentState, opts ...pulumi.ResourceOpt) (*Assignment, error)
GetAssignment gets an existing Assignment resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewAssignment ¶
func NewAssignment(ctx *pulumi.Context, name string, args *AssignmentArgs, opts ...pulumi.ResourceOpt) (*Assignment, error)
NewAssignment registers a new resource with the given unique name, arguments, and options.
func (*Assignment) Description ¶
func (r *Assignment) Description() *pulumi.StringOutput
A description to use for this Policy Assignment. Changing this forces a new resource to be created.
func (*Assignment) DisplayName ¶
func (r *Assignment) DisplayName() *pulumi.StringOutput
A friendly display name to use for this Policy Assignment. Changing this forces a new resource to be created.
func (*Assignment) ID ¶
func (r *Assignment) ID() *pulumi.IDOutput
ID is this resource's unique identifier assigned by its provider.
func (*Assignment) Identity ¶ added in v0.16.7
func (r *Assignment) Identity() *pulumi.Output
An `identity` block.
func (*Assignment) Location ¶ added in v0.16.7
func (r *Assignment) Location() *pulumi.StringOutput
The Azure location where this policy assignment should exist. This is required when an Identity is assigned. Changing this forces a new resource to be created.
func (*Assignment) Name ¶
func (r *Assignment) Name() *pulumi.StringOutput
The name of the Policy Assignment. Changing this forces a new resource to be created.
func (*Assignment) NotScopes ¶ added in v0.16.7
func (r *Assignment) NotScopes() *pulumi.ArrayOutput
A list of the Policy Assignment's excluded scopes. The list must contain Resource IDs (such as Subscriptions e.g. `/subscriptions/00000000-0000-0000-000000000000` or Resource Groups e.g.`/subscriptions/00000000-0000-0000-000000000000/resourceGroups/myResourceGroup`).
func (*Assignment) Parameters ¶
func (r *Assignment) Parameters() *pulumi.StringOutput
Parameters for the policy definition. This field is a JSON object that maps to the Parameters field from the Policy Definition. Changing this forces a new resource to be created.
func (*Assignment) PolicyDefinitionId ¶
func (r *Assignment) PolicyDefinitionId() *pulumi.StringOutput
The ID of the Policy Definition to be applied at the specified Scope.
func (*Assignment) Scope ¶
func (r *Assignment) Scope() *pulumi.StringOutput
func (*Assignment) URN ¶
func (r *Assignment) URN() *pulumi.URNOutput
URN is this resource's unique name assigned by Pulumi.
type AssignmentArgs ¶
type AssignmentArgs struct { // A description to use for this Policy Assignment. Changing this forces a new resource to be created. Description interface{} // A friendly display name to use for this Policy Assignment. Changing this forces a new resource to be created. DisplayName interface{} // An `identity` block. Identity interface{} // The Azure location where this policy assignment should exist. This is required when an Identity is assigned. Changing this forces a new resource to be created. Location interface{} // The name of the Policy Assignment. Changing this forces a new resource to be created. Name interface{} // A list of the Policy Assignment's excluded scopes. The list must contain Resource IDs (such as Subscriptions e.g. `/subscriptions/00000000-0000-0000-000000000000` or Resource Groups e.g.`/subscriptions/00000000-0000-0000-000000000000/resourceGroups/myResourceGroup`). NotScopes interface{} // Parameters for the policy definition. This field is a JSON object that maps to the Parameters field from the Policy Definition. Changing this forces a new resource to be created. Parameters interface{} // The ID of the Policy Definition to be applied at the specified Scope. PolicyDefinitionId interface{} Scope interface{} }
The set of arguments for constructing a Assignment resource.
type AssignmentState ¶
type AssignmentState struct { // A description to use for this Policy Assignment. Changing this forces a new resource to be created. Description interface{} // A friendly display name to use for this Policy Assignment. Changing this forces a new resource to be created. DisplayName interface{} // An `identity` block. Identity interface{} // The Azure location where this policy assignment should exist. This is required when an Identity is assigned. Changing this forces a new resource to be created. Location interface{} // The name of the Policy Assignment. Changing this forces a new resource to be created. Name interface{} // A list of the Policy Assignment's excluded scopes. The list must contain Resource IDs (such as Subscriptions e.g. `/subscriptions/00000000-0000-0000-000000000000` or Resource Groups e.g.`/subscriptions/00000000-0000-0000-000000000000/resourceGroups/myResourceGroup`). NotScopes interface{} // Parameters for the policy definition. This field is a JSON object that maps to the Parameters field from the Policy Definition. Changing this forces a new resource to be created. Parameters interface{} // The ID of the Policy Definition to be applied at the specified Scope. PolicyDefinitionId interface{} Scope interface{} }
Input properties used for looking up and filtering Assignment resources.
type Definition ¶
type Definition struct {
// contains filtered or unexported fields
}
Manages a policy rule definition on a management group or your provider subscription.
Policy definitions do not take effect until they are assigned to a scope using a Policy Assignment.
> This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/policy_definition.html.markdown.
func GetDefinition ¶
func GetDefinition(ctx *pulumi.Context, name string, id pulumi.ID, state *DefinitionState, opts ...pulumi.ResourceOpt) (*Definition, error)
GetDefinition gets an existing Definition resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewDefinition ¶
func NewDefinition(ctx *pulumi.Context, name string, args *DefinitionArgs, opts ...pulumi.ResourceOpt) (*Definition, error)
NewDefinition registers a new resource with the given unique name, arguments, and options.
func (*Definition) Description ¶
func (r *Definition) Description() *pulumi.StringOutput
The description of the policy definition.
func (*Definition) DisplayName ¶
func (r *Definition) DisplayName() *pulumi.StringOutput
The display name of the policy definition.
func (*Definition) ID ¶
func (r *Definition) ID() *pulumi.IDOutput
ID is this resource's unique identifier assigned by its provider.
func (*Definition) ManagementGroupId ¶ added in v0.16.7
func (r *Definition) ManagementGroupId() *pulumi.StringOutput
The ID of the Management Group where this policy should be defined. Changing this forces a new resource to be created.
func (*Definition) Metadata ¶
func (r *Definition) Metadata() *pulumi.StringOutput
The metadata for the policy definition. This is a json object representing additional metadata that should be stored with the policy definition.
func (*Definition) Mode ¶
func (r *Definition) Mode() *pulumi.StringOutput
The policy mode that allows you to specify which resource types will be evaluated. The value can be "All", "Indexed" or "NotSpecified". Changing this resource forces a new resource to be created.
func (*Definition) Name ¶
func (r *Definition) Name() *pulumi.StringOutput
The name of the policy definition. Changing this forces a new resource to be created.
func (*Definition) Parameters ¶
func (r *Definition) Parameters() *pulumi.StringOutput
Parameters for the policy definition. This field is a json object that allows you to parameterize your policy definition.
func (*Definition) PolicyRule ¶
func (r *Definition) PolicyRule() *pulumi.StringOutput
The policy rule for the policy definition. This is a json object representing the rule that contains an if and a then block.
func (*Definition) PolicyType ¶
func (r *Definition) PolicyType() *pulumi.StringOutput
The policy type. The value can be "BuiltIn", "Custom" or "NotSpecified". Changing this forces a new resource to be created.
func (*Definition) URN ¶
func (r *Definition) URN() *pulumi.URNOutput
URN is this resource's unique name assigned by Pulumi.
type DefinitionArgs ¶
type DefinitionArgs struct { // The description of the policy definition. Description interface{} // The display name of the policy definition. DisplayName interface{} // The ID of the Management Group where this policy should be defined. Changing this forces a new resource to be created. ManagementGroupId interface{} // The metadata for the policy definition. This // is a json object representing additional metadata that should be stored // with the policy definition. Metadata interface{} // The policy mode that allows you to specify which resource // types will be evaluated. The value can be "All", "Indexed" or // "NotSpecified". Changing this resource forces a new resource to be // created. Mode interface{} // The name of the policy definition. Changing this forces a // new resource to be created. Name interface{} // Parameters for the policy definition. This field // is a json object that allows you to parameterize your policy definition. Parameters interface{} // The policy rule for the policy definition. This // is a json object representing the rule that contains an if and // a then block. PolicyRule interface{} // The policy type. The value can be "BuiltIn", "Custom" // or "NotSpecified". Changing this forces a new resource to be created. PolicyType interface{} }
The set of arguments for constructing a Definition resource.
type DefinitionState ¶
type DefinitionState struct { // The description of the policy definition. Description interface{} // The display name of the policy definition. DisplayName interface{} // The ID of the Management Group where this policy should be defined. Changing this forces a new resource to be created. ManagementGroupId interface{} // The metadata for the policy definition. This // is a json object representing additional metadata that should be stored // with the policy definition. Metadata interface{} // The policy mode that allows you to specify which resource // types will be evaluated. The value can be "All", "Indexed" or // "NotSpecified". Changing this resource forces a new resource to be // created. Mode interface{} // The name of the policy definition. Changing this forces a // new resource to be created. Name interface{} // Parameters for the policy definition. This field // is a json object that allows you to parameterize your policy definition. Parameters interface{} // The policy rule for the policy definition. This // is a json object representing the rule that contains an if and // a then block. PolicyRule interface{} // The policy type. The value can be "BuiltIn", "Custom" // or "NotSpecified". Changing this forces a new resource to be created. PolicyType interface{} }
Input properties used for looking up and filtering Definition resources.
type GetPolicyDefintionArgs ¶ added in v0.16.8
type GetPolicyDefintionArgs struct { // Specifies the name of the Policy Definition. DisplayName interface{} // Only retrieve Policy Definitions from this Management Group. ManagementGroupId interface{} }
A collection of arguments for invoking getPolicyDefintion.
type GetPolicyDefintionResult ¶ added in v0.16.8
type GetPolicyDefintionResult struct { // The Description of the Policy. Description interface{} DisplayName interface{} ManagementGroupId interface{} // Any Metadata defined in the Policy. Metadata interface{} // The Name of the Policy Definition. Name interface{} // Any Parameters defined in the Policy. Parameters interface{} // The Rule as defined (in JSON) in the Policy. PolicyRule interface{} // The Type of the Policy, such as `Microsoft.Authorization/policyDefinitions`. PolicyType interface{} // The Type of Policy. Type interface{} // id is the provider-assigned unique ID for this managed resource. Id interface{} }
A collection of values returned by getPolicyDefintion.
func LookupPolicyDefintion ¶ added in v0.16.8
func LookupPolicyDefintion(ctx *pulumi.Context, args *GetPolicyDefintionArgs) (*GetPolicyDefintionResult, error)
Use this data source to access information about a Policy Definition, both custom and built in. Retrieves Policy Definitions from your current subscription by default.
> This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/d/policy_definition.html.markdown.
type PolicySetDefinition ¶ added in v0.16.7
type PolicySetDefinition struct {
// contains filtered or unexported fields
}
Manages a policy set definition.
> **NOTE:** Policy set definitions (also known as policy initiatives) do not take effect until they are assigned to a scope using a Policy Set Assignment.
> This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/policy_set_definition.html.markdown.
func GetPolicySetDefinition ¶ added in v0.16.7
func GetPolicySetDefinition(ctx *pulumi.Context, name string, id pulumi.ID, state *PolicySetDefinitionState, opts ...pulumi.ResourceOpt) (*PolicySetDefinition, error)
GetPolicySetDefinition gets an existing PolicySetDefinition resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewPolicySetDefinition ¶ added in v0.16.7
func NewPolicySetDefinition(ctx *pulumi.Context, name string, args *PolicySetDefinitionArgs, opts ...pulumi.ResourceOpt) (*PolicySetDefinition, error)
NewPolicySetDefinition registers a new resource with the given unique name, arguments, and options.
func (*PolicySetDefinition) Description ¶ added in v0.16.7
func (r *PolicySetDefinition) Description() *pulumi.StringOutput
The description of the policy set definition.
func (*PolicySetDefinition) DisplayName ¶ added in v0.16.7
func (r *PolicySetDefinition) DisplayName() *pulumi.StringOutput
The display name of the policy set definition.
func (*PolicySetDefinition) ID ¶ added in v0.16.7
func (r *PolicySetDefinition) ID() *pulumi.IDOutput
ID is this resource's unique identifier assigned by its provider.
func (*PolicySetDefinition) ManagementGroupId ¶ added in v0.16.7
func (r *PolicySetDefinition) ManagementGroupId() *pulumi.StringOutput
The ID of the Management Group where this policy should be defined. Changing this forces a new resource to be created.
func (*PolicySetDefinition) Metadata ¶ added in v0.16.7
func (r *PolicySetDefinition) Metadata() *pulumi.StringOutput
The metadata for the policy set definition. This is a json object representing additional metadata that should be stored with the policy definition.
func (*PolicySetDefinition) Name ¶ added in v0.16.7
func (r *PolicySetDefinition) Name() *pulumi.StringOutput
The name of the policy set definition. Changing this forces a new resource to be created.
func (*PolicySetDefinition) Parameters ¶ added in v0.16.7
func (r *PolicySetDefinition) Parameters() *pulumi.StringOutput
Parameters for the policy set definition. This field is a json object that allows you to parameterize your policy definition.
func (*PolicySetDefinition) PolicyDefinitions ¶ added in v0.16.7
func (r *PolicySetDefinition) PolicyDefinitions() *pulumi.StringOutput
The policy definitions for the policy set definition. This is a json object representing the bundled policy definitions .
func (*PolicySetDefinition) PolicyType ¶ added in v0.16.7
func (r *PolicySetDefinition) PolicyType() *pulumi.StringOutput
The policy set type. Possible values are `BuiltIn` or `Custom`. Changing this forces a new resource to be created.
func (*PolicySetDefinition) URN ¶ added in v0.16.7
func (r *PolicySetDefinition) URN() *pulumi.URNOutput
URN is this resource's unique name assigned by Pulumi.
type PolicySetDefinitionArgs ¶ added in v0.16.7
type PolicySetDefinitionArgs struct { // The description of the policy set definition. Description interface{} // The display name of the policy set definition. DisplayName interface{} // The ID of the Management Group where this policy should be defined. Changing this forces a new resource to be created. ManagementGroupId interface{} // The metadata for the policy set definition. This is a json object representing additional metadata that should be stored with the policy definition. Metadata interface{} // The name of the policy set definition. Changing this forces a new resource to be created. Name interface{} // Parameters for the policy set definition. This field is a json object that allows you to parameterize your policy definition. Parameters interface{} // The policy definitions for the policy set definition. This is a json object representing the bundled policy definitions . PolicyDefinitions interface{} // The policy set type. Possible values are `BuiltIn` or `Custom`. Changing this forces a new resource to be created. PolicyType interface{} }
The set of arguments for constructing a PolicySetDefinition resource.
type PolicySetDefinitionState ¶ added in v0.16.7
type PolicySetDefinitionState struct { // The description of the policy set definition. Description interface{} // The display name of the policy set definition. DisplayName interface{} // The ID of the Management Group where this policy should be defined. Changing this forces a new resource to be created. ManagementGroupId interface{} // The metadata for the policy set definition. This is a json object representing additional metadata that should be stored with the policy definition. Metadata interface{} // The name of the policy set definition. Changing this forces a new resource to be created. Name interface{} // Parameters for the policy set definition. This field is a json object that allows you to parameterize your policy definition. Parameters interface{} // The policy definitions for the policy set definition. This is a json object representing the bundled policy definitions . PolicyDefinitions interface{} // The policy set type. Possible values are `BuiltIn` or `Custom`. Changing this forces a new resource to be created. PolicyType interface{} }
Input properties used for looking up and filtering PolicySetDefinition resources.