We recommend using Azure Native.
azure.redis.FirewallRule
Explore with Pulumi AI
Manages a Firewall Rule associated with a Redis Cache.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
server:
type: random:RandomId
properties:
keepers:
azi_id: 1
byteLength: 8
example:
type: azure:core:ResourceGroup
properties:
name: redis-resourcegroup
location: West Europe
exampleCache:
type: azure:redis:Cache
name: example
properties:
name: redis${server.hex}
location: ${example.location}
resourceGroupName: ${example.name}
capacity: 1
family: P
skuName: Premium
enableNonSslPort: false
redisConfiguration:
maxmemoryReserved: 2
maxmemoryDelta: 2
maxmemoryPolicy: allkeys-lru
exampleFirewallRule:
type: azure:redis:FirewallRule
name: example
properties:
name: someIPrange
redisCacheName: ${exampleCache.name}
resourceGroupName: ${example.name}
startIp: 1.2.3.4
endIp: 2.3.4.5
Create FirewallRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FirewallRule(name: string, args: FirewallRuleArgs, opts?: CustomResourceOptions);
@overload
def FirewallRule(resource_name: str,
args: FirewallRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FirewallRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
end_ip: Optional[str] = None,
redis_cache_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
start_ip: Optional[str] = None,
name: Optional[str] = None)
func NewFirewallRule(ctx *Context, name string, args FirewallRuleArgs, opts ...ResourceOption) (*FirewallRule, error)
public FirewallRule(string name, FirewallRuleArgs args, CustomResourceOptions? opts = null)
public FirewallRule(String name, FirewallRuleArgs args)
public FirewallRule(String name, FirewallRuleArgs args, CustomResourceOptions options)
type: azure:redis:FirewallRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args
This property is required. FirewallRuleArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. FirewallRuleArgs - The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. FirewallRuleArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. FirewallRuleArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. FirewallRuleArgs - 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 examplefirewallRuleResourceResourceFromRedisfirewallRule = new Azure.Redis.FirewallRule("examplefirewallRuleResourceResourceFromRedisfirewallRule", new()
{
EndIp = "string",
RedisCacheName = "string",
ResourceGroupName = "string",
StartIp = "string",
Name = "string",
});
example, err := redis.NewFirewallRule(ctx, "examplefirewallRuleResourceResourceFromRedisfirewallRule", &redis.FirewallRuleArgs{
EndIp: pulumi.String("string"),
RedisCacheName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
StartIp: pulumi.String("string"),
Name: pulumi.String("string"),
})
var examplefirewallRuleResourceResourceFromRedisfirewallRule = new FirewallRule("examplefirewallRuleResourceResourceFromRedisfirewallRule", FirewallRuleArgs.builder()
.endIp("string")
.redisCacheName("string")
.resourceGroupName("string")
.startIp("string")
.name("string")
.build());
examplefirewall_rule_resource_resource_from_redisfirewall_rule = azure.redis.FirewallRule("examplefirewallRuleResourceResourceFromRedisfirewallRule",
end_ip="string",
redis_cache_name="string",
resource_group_name="string",
start_ip="string",
name="string")
const examplefirewallRuleResourceResourceFromRedisfirewallRule = new azure.redis.FirewallRule("examplefirewallRuleResourceResourceFromRedisfirewallRule", {
endIp: "string",
redisCacheName: "string",
resourceGroupName: "string",
startIp: "string",
name: "string",
});
type: azure:redis:FirewallRule
properties:
endIp: string
name: string
redisCacheName: string
resourceGroupName: string
startIp: string
FirewallRule 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 FirewallRule resource accepts the following input properties:
- End
Ip This property is required. string - The highest IP address included in the range.
- Redis
Cache Name This property is required. Changes to this property will trigger replacement.
- The name of the Redis Cache. Changing this forces a new resource to be created.
- Resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created.
- Start
Ip This property is required. string - The lowest IP address included in the range
- Name
Changes to this property will trigger replacement.
- The name of the Firewall Rule. Changing this forces a new resource to be created.
- End
Ip This property is required. string - The highest IP address included in the range.
- Redis
Cache Name This property is required. Changes to this property will trigger replacement.
- The name of the Redis Cache. Changing this forces a new resource to be created.
- Resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created.
- Start
Ip This property is required. string - The lowest IP address included in the range
- Name
Changes to this property will trigger replacement.
- The name of the Firewall Rule. Changing this forces a new resource to be created.
- end
Ip This property is required. String - The highest IP address included in the range.
- redis
Cache Name This property is required. Changes to this property will trigger replacement.
- The name of the Redis Cache. Changing this forces a new resource to be created.
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created.
- start
Ip This property is required. String - The lowest IP address included in the range
- name
Changes to this property will trigger replacement.
- The name of the Firewall Rule. Changing this forces a new resource to be created.
- end
Ip This property is required. string - The highest IP address included in the range.
- redis
Cache Name This property is required. Changes to this property will trigger replacement.
- The name of the Redis Cache. Changing this forces a new resource to be created.
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created.
- start
Ip This property is required. string - The lowest IP address included in the range
- name
Changes to this property will trigger replacement.
- The name of the Firewall Rule. Changing this forces a new resource to be created.
- end_
ip This property is required. str - The highest IP address included in the range.
- redis_
cache_ name This property is required. Changes to this property will trigger replacement.
- The name of the Redis Cache. Changing this forces a new resource to be created.
- resource_
group_ name This property is required. Changes to this property will trigger replacement.
- The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created.
- start_
ip This property is required. str - The lowest IP address included in the range
- name
Changes to this property will trigger replacement.
- The name of the Firewall Rule. Changing this forces a new resource to be created.
- end
Ip This property is required. String - The highest IP address included in the range.
- redis
Cache Name This property is required. Changes to this property will trigger replacement.
- The name of the Redis Cache. Changing this forces a new resource to be created.
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created.
- start
Ip This property is required. String - The lowest IP address included in the range
- name
Changes to this property will trigger replacement.
- The name of the Firewall Rule. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the FirewallRule 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.
Look up Existing FirewallRule Resource
Get an existing FirewallRule 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?: FirewallRuleState, opts?: CustomResourceOptions): FirewallRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
end_ip: Optional[str] = None,
name: Optional[str] = None,
redis_cache_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
start_ip: Optional[str] = None) -> FirewallRule
func GetFirewallRule(ctx *Context, name string, id IDInput, state *FirewallRuleState, opts ...ResourceOption) (*FirewallRule, error)
public static FirewallRule Get(string name, Input<string> id, FirewallRuleState? state, CustomResourceOptions? opts = null)
public static FirewallRule get(String name, Output<String> id, FirewallRuleState state, CustomResourceOptions options)
resources: _: type: azure:redis:FirewallRule get: id: ${id}
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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.
- End
Ip string - The highest IP address included in the range.
- Name
Changes to this property will trigger replacement.
- The name of the Firewall Rule. Changing this forces a new resource to be created.
- Redis
Cache Name Changes to this property will trigger replacement.
- The name of the Redis Cache. Changing this forces a new resource to be created.
- Resource
Group Name Changes to this property will trigger replacement.
- The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created.
- Start
Ip string - The lowest IP address included in the range
- End
Ip string - The highest IP address included in the range.
- Name
Changes to this property will trigger replacement.
- The name of the Firewall Rule. Changing this forces a new resource to be created.
- Redis
Cache Name Changes to this property will trigger replacement.
- The name of the Redis Cache. Changing this forces a new resource to be created.
- Resource
Group Name Changes to this property will trigger replacement.
- The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created.
- Start
Ip string - The lowest IP address included in the range
- end
Ip String - The highest IP address included in the range.
- name
Changes to this property will trigger replacement.
- The name of the Firewall Rule. Changing this forces a new resource to be created.
- redis
Cache Name Changes to this property will trigger replacement.
- The name of the Redis Cache. Changing this forces a new resource to be created.
- resource
Group Name Changes to this property will trigger replacement.
- The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created.
- start
Ip String - The lowest IP address included in the range
- end
Ip string - The highest IP address included in the range.
- name
Changes to this property will trigger replacement.
- The name of the Firewall Rule. Changing this forces a new resource to be created.
- redis
Cache Name Changes to this property will trigger replacement.
- The name of the Redis Cache. Changing this forces a new resource to be created.
- resource
Group Name Changes to this property will trigger replacement.
- The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created.
- start
Ip string - The lowest IP address included in the range
- end_
ip str - The highest IP address included in the range.
- name
Changes to this property will trigger replacement.
- The name of the Firewall Rule. Changing this forces a new resource to be created.
- redis_
cache_ name Changes to this property will trigger replacement.
- The name of the Redis Cache. Changing this forces a new resource to be created.
- resource_
group_ name Changes to this property will trigger replacement.
- The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created.
- start_
ip str - The lowest IP address included in the range
- end
Ip String - The highest IP address included in the range.
- name
Changes to this property will trigger replacement.
- The name of the Firewall Rule. Changing this forces a new resource to be created.
- redis
Cache Name Changes to this property will trigger replacement.
- The name of the Redis Cache. Changing this forces a new resource to be created.
- resource
Group Name Changes to this property will trigger replacement.
- The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created.
- start
Ip String - The lowest IP address included in the range
Import
Redis Firewall Rules can be imported using the resource id
, e.g.
$ pulumi import azure:redis/firewallRule:FirewallRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/redis/cache1/firewallRules/rule1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.