AccessRule
Provides a Cloudflare IP Firewall Access Rule resource. Access control can be applied on basis of IP addresses, IP ranges, AS numbers or countries.
Create a AccessRule Resource
new AccessRule(name: string, args: AccessRuleArgs, opts?: CustomResourceOptions);def AccessRule(resource_name, opts=None, configuration=None, mode=None, notes=None, zone_id=None, __props__=None);func NewAccessRule(ctx *Context, name string, args AccessRuleArgs, opts ...ResourceOption) (*AccessRule, error)public AccessRule(string name, AccessRuleArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args AccessRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AccessRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccessRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
AccessRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The AccessRule resource accepts the following input properties:
- Configuration
Access
Rule Configuration Args Rule configuration to apply to a matched request. It’s a complex value. See description below.
- Mode string
The action to apply to a matched request. Allowed values: “block”, “challenge”, “whitelist”, “js_challenge”
- Notes string
A personal note about the rule. Typically used as a reminder or explanation for the rule.
- Zone
Id string The DNS zone to which the access rule should be added.
- Configuration
Access
Rule Configuration Rule configuration to apply to a matched request. It’s a complex value. See description below.
- Mode string
The action to apply to a matched request. Allowed values: “block”, “challenge”, “whitelist”, “js_challenge”
- Notes string
A personal note about the rule. Typically used as a reminder or explanation for the rule.
- Zone
Id string The DNS zone to which the access rule should be added.
- configuration
Access
Rule Configuration Rule configuration to apply to a matched request. It’s a complex value. See description below.
- mode string
The action to apply to a matched request. Allowed values: “block”, “challenge”, “whitelist”, “js_challenge”
- notes string
A personal note about the rule. Typically used as a reminder or explanation for the rule.
- zone
Id string The DNS zone to which the access rule should be added.
- configuration
Dict[Access
Rule Configuration] Rule configuration to apply to a matched request. It’s a complex value. See description below.
- mode str
The action to apply to a matched request. Allowed values: “block”, “challenge”, “whitelist”, “js_challenge”
- notes str
A personal note about the rule. Typically used as a reminder or explanation for the rule.
- zone_
id str The DNS zone to which the access rule should be added.
Outputs
All input properties are implicitly available as output properties. Additionally, the AccessRule resource produces the following output properties:
Look up an Existing AccessRule Resource
Get an existing AccessRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AccessRuleState, opts?: CustomResourceOptions): AccessRulestatic get(resource_name, id, opts=None, configuration=None, mode=None, notes=None, zone_id=None, __props__=None);func GetAccessRule(ctx *Context, name string, id IDInput, state *AccessRuleState, opts ...ResourceOption) (*AccessRule, error)public static AccessRule Get(string name, Input<string> id, AccessRuleState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Configuration
Access
Rule Configuration Args Rule configuration to apply to a matched request. It’s a complex value. See description below.
- Mode string
The action to apply to a matched request. Allowed values: “block”, “challenge”, “whitelist”, “js_challenge”
- Notes string
A personal note about the rule. Typically used as a reminder or explanation for the rule.
- Zone
Id string The DNS zone to which the access rule should be added.
- Configuration
Access
Rule Configuration Rule configuration to apply to a matched request. It’s a complex value. See description below.
- Mode string
The action to apply to a matched request. Allowed values: “block”, “challenge”, “whitelist”, “js_challenge”
- Notes string
A personal note about the rule. Typically used as a reminder or explanation for the rule.
- Zone
Id string The DNS zone to which the access rule should be added.
- configuration
Access
Rule Configuration Rule configuration to apply to a matched request. It’s a complex value. See description below.
- mode string
The action to apply to a matched request. Allowed values: “block”, “challenge”, “whitelist”, “js_challenge”
- notes string
A personal note about the rule. Typically used as a reminder or explanation for the rule.
- zone
Id string The DNS zone to which the access rule should be added.
- configuration
Dict[Access
Rule Configuration] Rule configuration to apply to a matched request. It’s a complex value. See description below.
- mode str
The action to apply to a matched request. Allowed values: “block”, “challenge”, “whitelist”, “js_challenge”
- notes str
A personal note about the rule. Typically used as a reminder or explanation for the rule.
- zone_
id str The DNS zone to which the access rule should be added.
Supporting Types
AccessRuleConfiguration
Package Details
- Repository
- https://github.com/pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflareTerraform Provider.