Class FirewallRule
A single firewall rule that is evaluated against incoming traffic and provides an action to take on matched requests.
To get more information about FirewallRule, see:
- API documentation
- How-to Guides
- Official Documentation
Example Usage - App Engine Firewall Rule Basic
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var myProject = new Gcp.Organizations.Project("myProject", new Gcp.Organizations.ProjectArgs
{
ProjectId = "ae-project",
OrgId = "123456789",
});
var app = new Gcp.AppEngine.Application("app", new Gcp.AppEngine.ApplicationArgs
{
Project = myProject.ProjectId,
LocationId = "us-central",
});
var rule = new Gcp.AppEngine.FirewallRule("rule", new Gcp.AppEngine.FirewallRuleArgs
{
Project = app.Project,
Priority = 1000,
Action = "ALLOW",
SourceRange = "*",
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.AppEngine
Assembly: Pulumi.Gcp.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 SourceAction
The action to take if this rule matches.
Declaration
public Output<string> Action { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
An optional string description of this rule.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Priority
A positive integer that defines the order of rule evaluation. Rules with the lowest priority are evaluated first. A default rule at priority Int32.MaxValue matches all IPv4 and IPv6 traffic when no previous rule matches. Only the action of this rule can be modified by the user.
Declaration
public Output<int?> Priority { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Project
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Declaration
public Output<string> Project { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SourceRange
IP address or range, defined using CIDR notation, of requests that this rule applies to.
Declaration
public Output<string> SourceRange { 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 |