This provider is currently in preview.
pulumiservice.ApprovalRule
Explore with Pulumi AI
This provider is currently in preview.
An approval rule for environment deployments.
Create ApprovalRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApprovalRule(name: string, args: ApprovalRuleArgs, opts?: CustomResourceOptions);
@overload
def ApprovalRule(resource_name: str,
args: ApprovalRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ApprovalRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
approval_rule_config: Optional[ApprovalRuleConfigArgs] = None,
enabled: Optional[bool] = None,
environment_identifier: Optional[EnvironmentIdentifierArgs] = None,
name: Optional[str] = None,
target_action_types: Optional[Sequence[TargetActionType]] = None)
func NewApprovalRule(ctx *Context, name string, args ApprovalRuleArgs, opts ...ResourceOption) (*ApprovalRule, error)
public ApprovalRule(string name, ApprovalRuleArgs args, CustomResourceOptions? opts = null)
public ApprovalRule(String name, ApprovalRuleArgs args)
public ApprovalRule(String name, ApprovalRuleArgs args, CustomResourceOptions options)
type: pulumiservice:ApprovalRule
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 ApprovalRuleArgs
- 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 ApprovalRuleArgs
- 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 ApprovalRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApprovalRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApprovalRuleArgs
- 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 approvalRuleResource = new PulumiService.ApprovalRule("approvalRuleResource", new()
{
ApprovalRuleConfig = new PulumiService.Inputs.ApprovalRuleConfigArgs
{
AllowSelfApproval = false,
EligibleApprovers = new[]
{
new PulumiService.Inputs.EligibleApproverArgs
{
RbacPermission = PulumiService.RbacPermission.Read,
TeamName = "string",
User = "string",
},
},
NumApprovalsRequired = 0,
RequireReapprovalOnChange = false,
},
Enabled = false,
EnvironmentIdentifier = new PulumiService.Inputs.EnvironmentIdentifierArgs
{
Name = "string",
Organization = "string",
Project = "string",
},
Name = "string",
TargetActionTypes = new[]
{
PulumiService.TargetActionType.Update,
},
});
example, err := pulumiservice.NewApprovalRule(ctx, "approvalRuleResource", &pulumiservice.ApprovalRuleArgs{
ApprovalRuleConfig: &pulumiservice.ApprovalRuleConfigArgs{
AllowSelfApproval: pulumi.Bool(false),
EligibleApprovers: pulumiservice.EligibleApproverArray{
&pulumiservice.EligibleApproverArgs{
RbacPermission: pulumiservice.RbacPermissionRead,
TeamName: pulumi.String("string"),
User: pulumi.String("string"),
},
},
NumApprovalsRequired: pulumi.Int(0),
RequireReapprovalOnChange: pulumi.Bool(false),
},
Enabled: pulumi.Bool(false),
EnvironmentIdentifier: &pulumiservice.EnvironmentIdentifierArgs{
Name: pulumi.String("string"),
Organization: pulumi.String("string"),
Project: pulumi.String("string"),
},
Name: pulumi.String("string"),
TargetActionTypes: pulumiservice.TargetActionTypeArray{
pulumiservice.TargetActionTypeUpdate,
},
})
var approvalRuleResource = new ApprovalRule("approvalRuleResource", ApprovalRuleArgs.builder()
.approvalRuleConfig(ApprovalRuleConfigArgs.builder()
.allowSelfApproval(false)
.eligibleApprovers(EligibleApproverArgs.builder()
.rbacPermission("environment:read")
.teamName("string")
.user("string")
.build())
.numApprovalsRequired(0)
.requireReapprovalOnChange(false)
.build())
.enabled(false)
.environmentIdentifier(EnvironmentIdentifierArgs.builder()
.name("string")
.organization("string")
.project("string")
.build())
.name("string")
.targetActionTypes("update")
.build());
approval_rule_resource = pulumiservice.ApprovalRule("approvalRuleResource",
approval_rule_config={
"allow_self_approval": False,
"eligible_approvers": [{
"rbac_permission": pulumiservice.RbacPermission.READ,
"team_name": "string",
"user": "string",
}],
"num_approvals_required": 0,
"require_reapproval_on_change": False,
},
enabled=False,
environment_identifier={
"name": "string",
"organization": "string",
"project": "string",
},
name="string",
target_action_types=[pulumiservice.TargetActionType.UPDATE])
const approvalRuleResource = new pulumiservice.ApprovalRule("approvalRuleResource", {
approvalRuleConfig: {
allowSelfApproval: false,
eligibleApprovers: [{
rbacPermission: pulumiservice.RbacPermission.Read,
teamName: "string",
user: "string",
}],
numApprovalsRequired: 0,
requireReapprovalOnChange: false,
},
enabled: false,
environmentIdentifier: {
name: "string",
organization: "string",
project: "string",
},
name: "string",
targetActionTypes: [pulumiservice.TargetActionType.Update],
});
type: pulumiservice:ApprovalRule
properties:
approvalRuleConfig:
allowSelfApproval: false
eligibleApprovers:
- rbacPermission: environment:read
teamName: string
user: string
numApprovalsRequired: 0
requireReapprovalOnChange: false
enabled: false
environmentIdentifier:
name: string
organization: string
project: string
name: string
targetActionTypes:
- update
ApprovalRule 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 ApprovalRule resource accepts the following input properties:
- Approval
Rule Pulumi.Config Pulumi Service. Inputs. Approval Rule Config - The approval rule configuration.
- Enabled bool
- Whether the approval rule is enabled.
- Environment
Identifier Pulumi.Pulumi Service. Inputs. Environment Identifier - The environment this rule applies to.
- Name string
- The name of the approval rule.
- Target
Action List<Pulumi.Types Pulumi Service. Target Action Type> - The type of action this rule applies to.
- Approval
Rule ApprovalConfig Rule Config Args - The approval rule configuration.
- Enabled bool
- Whether the approval rule is enabled.
- Environment
Identifier EnvironmentIdentifier Args - The environment this rule applies to.
- Name string
- The name of the approval rule.
- Target
Action []TargetTypes Action Type - The type of action this rule applies to.
- approval
Rule ApprovalConfig Rule Config - The approval rule configuration.
- enabled Boolean
- Whether the approval rule is enabled.
- environment
Identifier EnvironmentIdentifier - The environment this rule applies to.
- name String
- The name of the approval rule.
- target
Action List<TargetTypes Action Type> - The type of action this rule applies to.
- approval
Rule ApprovalConfig Rule Config - The approval rule configuration.
- enabled boolean
- Whether the approval rule is enabled.
- environment
Identifier EnvironmentIdentifier - The environment this rule applies to.
- name string
- The name of the approval rule.
- target
Action TargetTypes Action Type[] - The type of action this rule applies to.
- approval_
rule_ Approvalconfig Rule Config Args - The approval rule configuration.
- enabled bool
- Whether the approval rule is enabled.
- environment_
identifier EnvironmentIdentifier Args - The environment this rule applies to.
- name str
- The name of the approval rule.
- target_
action_ Sequence[Targettypes Action Type] - The type of action this rule applies to.
- approval
Rule Property MapConfig - The approval rule configuration.
- enabled Boolean
- Whether the approval rule is enabled.
- environment
Identifier Property Map - The environment this rule applies to.
- name String
- The name of the approval rule.
- target
Action List<"update">Types - The type of action this rule applies to.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApprovalRule 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
ApprovalRuleConfig, ApprovalRuleConfigArgs
- Allow
Self boolApproval - Whether self-approval is allowed.
- Eligible
Approvers List<Pulumi.Pulumi Service. Inputs. Eligible Approver> - List of eligible approvers.
- Num
Approvals intRequired - Number of approvals required.
- Require
Reapproval boolOn Change - Whether reapproval is required on changes.
- Allow
Self boolApproval - Whether self-approval is allowed.
- Eligible
Approvers []EligibleApprover - List of eligible approvers.
- Num
Approvals intRequired - Number of approvals required.
- Require
Reapproval boolOn Change - Whether reapproval is required on changes.
- allow
Self BooleanApproval - Whether self-approval is allowed.
- eligible
Approvers List<EligibleApprover> - List of eligible approvers.
- num
Approvals IntegerRequired - Number of approvals required.
- require
Reapproval BooleanOn Change - Whether reapproval is required on changes.
- allow
Self booleanApproval - Whether self-approval is allowed.
- eligible
Approvers EligibleApprover[] - List of eligible approvers.
- num
Approvals numberRequired - Number of approvals required.
- require
Reapproval booleanOn Change - Whether reapproval is required on changes.
- allow_
self_ boolapproval - Whether self-approval is allowed.
- eligible_
approvers Sequence[EligibleApprover] - List of eligible approvers.
- num_
approvals_ intrequired - Number of approvals required.
- require_
reapproval_ boolon_ change - Whether reapproval is required on changes.
- allow
Self BooleanApproval - Whether self-approval is allowed.
- eligible
Approvers List<Property Map> - List of eligible approvers.
- num
Approvals NumberRequired - Number of approvals required.
- require
Reapproval BooleanOn Change - Whether reapproval is required on changes.
EligibleApprover, EligibleApproverArgs
- Rbac
Permission Pulumi.Pulumi Service. Rbac Permission - RBAC permission that gives right to approve.
- Team
Name string - Name of the team that can approve.
- User string
- Login of the user that can approve.
- Rbac
Permission RbacPermission - RBAC permission that gives right to approve.
- Team
Name string - Name of the team that can approve.
- User string
- Login of the user that can approve.
- rbac
Permission RbacPermission - RBAC permission that gives right to approve.
- team
Name String - Name of the team that can approve.
- user String
- Login of the user that can approve.
- rbac
Permission RbacPermission - RBAC permission that gives right to approve.
- team
Name string - Name of the team that can approve.
- user string
- Login of the user that can approve.
- rbac_
permission RbacPermission - RBAC permission that gives right to approve.
- team_
name str - Name of the team that can approve.
- user str
- Login of the user that can approve.
- rbac
Permission "environment:read" | "environment:read_decrypt" | "environment:open" | "environment:write" | "environment:delete" | "environment:clone" | "environment:rotate" - RBAC permission that gives right to approve.
- team
Name String - Name of the team that can approve.
- user String
- Login of the user that can approve.
EnvironmentIdentifier, EnvironmentIdentifierArgs
- Name string
- The environment name.
- Organization string
- The organization name.
- Project string
- The project name.
- Name string
- The environment name.
- Organization string
- The organization name.
- Project string
- The project name.
- name String
- The environment name.
- organization String
- The organization name.
- project String
- The project name.
- name string
- The environment name.
- organization string
- The organization name.
- project string
- The project name.
- name str
- The environment name.
- organization str
- The organization name.
- project str
- The project name.
- name String
- The environment name.
- organization String
- The organization name.
- project String
- The project name.
RbacPermission, RbacPermissionArgs
- Read
- environment:readRead permission.
- Read
Decrypt - environment:read_decryptRead and decrypt permission.
- Open
- environment:openOpen permission.
- Write
- environment:writeWrite permission.
- Delete
- environment:deleteDelete permission.
- Clone
- environment:cloneClone permission.
- Rotate
- environment:rotateRotate permission.
- Rbac
Permission Read - environment:readRead permission.
- Rbac
Permission Read Decrypt - environment:read_decryptRead and decrypt permission.
- Rbac
Permission Open - environment:openOpen permission.
- Rbac
Permission Write - environment:writeWrite permission.
- Rbac
Permission Delete - environment:deleteDelete permission.
- Rbac
Permission Clone - environment:cloneClone permission.
- Rbac
Permission Rotate - environment:rotateRotate permission.
- Read
- environment:readRead permission.
- Read
Decrypt - environment:read_decryptRead and decrypt permission.
- Open
- environment:openOpen permission.
- Write
- environment:writeWrite permission.
- Delete
- environment:deleteDelete permission.
- Clone
- environment:cloneClone permission.
- Rotate
- environment:rotateRotate permission.
- Read
- environment:readRead permission.
- Read
Decrypt - environment:read_decryptRead and decrypt permission.
- Open
- environment:openOpen permission.
- Write
- environment:writeWrite permission.
- Delete
- environment:deleteDelete permission.
- Clone
- environment:cloneClone permission.
- Rotate
- environment:rotateRotate permission.
- READ
- environment:readRead permission.
- READ_DECRYPT
- environment:read_decryptRead and decrypt permission.
- OPEN
- environment:openOpen permission.
- WRITE
- environment:writeWrite permission.
- DELETE
- environment:deleteDelete permission.
- CLONE
- environment:cloneClone permission.
- ROTATE
- environment:rotateRotate permission.
- "environment:read"
- environment:readRead permission.
- "environment:read_
decrypt" - environment:read_decryptRead and decrypt permission.
- "environment:open"
- environment:openOpen permission.
- "environment:write"
- environment:writeWrite permission.
- "environment:delete"
- environment:deleteDelete permission.
- "environment:clone"
- environment:cloneClone permission.
- "environment:rotate"
- environment:rotateRotate permission.
TargetActionType, TargetActionTypeArgs
- Update
- updateUpdate action type for approval rules.
- Target
Action Type Update - updateUpdate action type for approval rules.
- Update
- updateUpdate action type for approval rules.
- Update
- updateUpdate action type for approval rules.
- UPDATE
- updateUpdate action type for approval rules.
- "update"
- updateUpdate action type for approval rules.
Package Details
- Repository
- pulumiservice pulumi/pulumi-pulumiservice
- License
- Apache-2.0
This provider is currently in preview.