AccessPolicyArgs

data class AccessPolicyArgs(val accountId: Output<String>? = null, val applicationId: Output<String>? = null, val approvalGroups: Output<List<AccessPolicyApprovalGroupArgs>>? = null, val approvalRequired: Output<Boolean>? = null, val connectionRules: Output<AccessPolicyConnectionRulesArgs>? = null, val decision: Output<String>? = null, val excludes: Output<List<AccessPolicyExcludeArgs>>? = null, val includes: Output<List<AccessPolicyIncludeArgs>>? = null, val isolationRequired: Output<Boolean>? = null, val name: Output<String>? = null, val precedence: Output<Int>? = null, val purposeJustificationPrompt: Output<String>? = null, val purposeJustificationRequired: Output<Boolean>? = null, val requires: Output<List<AccessPolicyRequireArgs>>? = null, val sessionDuration: Output<String>? = null, val zoneId: Output<String>? = null) : ConvertibleToJava<AccessPolicyArgs>

Provides a Cloudflare Access Policy resource. Access Policies are used in conjunction with Access Applications to restrict access to a particular resource.

It's required that an account_id or zone_id is provided and in most cases using either is fine. However, if you're using a scoped access token, you must provide the argument that matches the token's scope. For example, an access token that is scoped to the "example.com" zone needs to use the zone_id argument. If 'application_id' is omitted, the policy created can be reused by multiple access applications. Any cloudflare.AccessApplication resource can reference reusable policies through its policies argument. To destroy a reusable policy and remove it from all applications' policies lists on the same apply, preemptively set the lifecycle option create_before_destroy to true on the 'cloudflare_access_policy' resource.

Import

$ pulumi import cloudflare:index/accessPolicy:AccessPolicy example account/<account_id>/<application_id>/<policy_id>

Constructors

Link copied to clipboard
constructor(accountId: Output<String>? = null, applicationId: Output<String>? = null, approvalGroups: Output<List<AccessPolicyApprovalGroupArgs>>? = null, approvalRequired: Output<Boolean>? = null, connectionRules: Output<AccessPolicyConnectionRulesArgs>? = null, decision: Output<String>? = null, excludes: Output<List<AccessPolicyExcludeArgs>>? = null, includes: Output<List<AccessPolicyIncludeArgs>>? = null, isolationRequired: Output<Boolean>? = null, name: Output<String>? = null, precedence: Output<Int>? = null, purposeJustificationPrompt: Output<String>? = null, purposeJustificationRequired: Output<Boolean>? = null, requires: Output<List<AccessPolicyRequireArgs>>? = null, sessionDuration: Output<String>? = null, zoneId: Output<String>? = null)

Properties

Link copied to clipboard
val accountId: Output<String>? = null

The account identifier to target for the resource. Conflicts with zone_id.

Link copied to clipboard
val applicationId: Output<String>? = null

The ID of the application the policy is associated with. Required when using precedence. Modifying this attribute will force creation of a new resource.

Link copied to clipboard
Link copied to clipboard
val approvalRequired: Output<Boolean>? = null
Link copied to clipboard

The rules that define how users may connect to the targets secured by your application. Only applicable to Infrastructure Applications, in which case this field is required.

Link copied to clipboard
val decision: Output<String>? = null

Defines the action Access will take if the policy matches the user. Available values: allow, deny, non_identity, bypass.

Link copied to clipboard
val excludes: Output<List<AccessPolicyExcludeArgs>>? = null

A series of access conditions, see Access Groups.

Link copied to clipboard
val includes: Output<List<AccessPolicyIncludeArgs>>? = null

A series of access conditions, see Access Groups.

Link copied to clipboard
val isolationRequired: Output<Boolean>? = null

Require this application to be served in an isolated browser for users matching this policy.

Link copied to clipboard
val name: Output<String>? = null

Friendly name of the Access Policy.

Link copied to clipboard
val precedence: Output<Int>? = null

The unique precedence for policies on a single application. Required when using application_id.

Link copied to clipboard
val purposeJustificationPrompt: Output<String>? = null

The prompt to display to the user for a justification for accessing the resource. Required when using purpose_justification_required.

Link copied to clipboard

Whether to prompt the user for a justification for accessing the resource.

Link copied to clipboard
val requires: Output<List<AccessPolicyRequireArgs>>? = null

A series of access conditions, see Access Groups.

Link copied to clipboard
val sessionDuration: Output<String>? = null

How often a user will be forced to re-authorise. Must be in the format 48h or 2h45m.

Link copied to clipboard
val zoneId: Output<String>? = null

The zone identifier to target for the resource. Conflicts with account_id.

Functions

Link copied to clipboard
open override fun toJava(): AccessPolicyArgs