FirewallRule

class FirewallRule : KotlinCustomResource

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:

Example Usage

App Engine Firewall Rule Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.Project;
import com.pulumi.gcp.organizations.ProjectArgs;
import com.pulumi.gcp.appengine.Application;
import com.pulumi.gcp.appengine.ApplicationArgs;
import com.pulumi.gcp.appengine.FirewallRule;
import com.pulumi.gcp.appengine.FirewallRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var myProject = new Project("myProject", ProjectArgs.builder()
.projectId("ae-project")
.orgId("123456789")
.billingAccount("000000-0000000-0000000-000000")
.build());
var app = new Application("app", ApplicationArgs.builder()
.project(myProject.projectId())
.locationId("us-central")
.build());
var rule = new FirewallRule("rule", FirewallRuleArgs.builder()
.project(app.project())
.priority(1000)
.action("ALLOW")
.sourceRange("*")
.build());
}
}

Import

FirewallRule can be imported using any of these accepted formats

$ pulumi import gcp:appengine/firewallRule:FirewallRule default apps/{{project}}/firewall/ingressRules/{{priority}}
$ pulumi import gcp:appengine/firewallRule:FirewallRule default {{project}}/{{priority}}
$ pulumi import gcp:appengine/firewallRule:FirewallRule default {{priority}}

Properties

Link copied to clipboard
val action: Output<String>

The action to take if this rule matches. Possible values are: UNSPECIFIED_ACTION, ALLOW, DENY.

Link copied to clipboard
val description: Output<String>?

An optional string description of this rule.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val priority: Output<Int>?

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.

Link copied to clipboard
val project: Output<String>

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val sourceRange: Output<String>

IP address or range, defined using CIDR notation, of requests that this rule applies to.

Link copied to clipboard
val urn: Output<String>