Class FirewallRule
Manages a Firewall Rule for a PostgreSQL Server
Example Usage (Single IP Address)
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleServer = new Azure.PostgreSql.Server("exampleServer", new Azure.PostgreSql.ServerArgs
{
});
// ...
var exampleFirewallRule = new Azure.PostgreSql.FirewallRule("exampleFirewallRule", new Azure.PostgreSql.FirewallRuleArgs
{
ResourceGroupName = exampleResourceGroup.Name,
ServerName = exampleServer.Name,
StartIpAddress = "40.112.8.12",
EndIpAddress = "40.112.8.12",
});
}
}
Example Usage (IP Range)
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleServer = new Azure.PostgreSql.Server("exampleServer", new Azure.PostgreSql.ServerArgs
{
});
// ...
var exampleFirewallRule = new Azure.PostgreSql.FirewallRule("exampleFirewallRule", new Azure.PostgreSql.FirewallRuleArgs
{
ResourceGroupName = exampleResourceGroup.Name,
ServerName = exampleServer.Name,
StartIpAddress = "40.112.0.0",
EndIpAddress = "40.112.255.255",
});
}
}
Inherited Members
Namespace: Pulumi.Azure.PostgreSql
Assembly: Pulumi.Azure.dll
Syntax
public class FirewallRule : CustomResource
Constructors
View SourceFirewallRule(String, FirewallRuleArgs, CustomResourceOptions)
Create a FirewallRule resource with the given unique name, arguments, and options.
Declaration
public FirewallRule(string name, FirewallRuleArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| FirewallRuleArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceEndIpAddress
Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.
Declaration
public Output<string> EndIpAddress { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
Specifies the name of the PostgreSQL Firewall Rule. Changing this forces a new resource to be created.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ResourceGroupName
The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created.
Declaration
public Output<string> ResourceGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ServerName
Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
Declaration
public Output<string> ServerName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
StartIpAddress
Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.
Declaration
public Output<string> StartIpAddress { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, FirewallRuleState, CustomResourceOptions)
Get an existing FirewallRule resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static FirewallRule Get(string name, Input<string> id, FirewallRuleState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| FirewallRuleState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| FirewallRule |