Firewall Rule Args
data class FirewallRuleArgs(val action: Output<String>? = null, val description: Output<String>? = null, val priority: Output<Int>? = null, val project: Output<String>? = null, val sourceRange: Output<String>? = null) : ConvertibleToJava<FirewallRuleArgs>
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:
How-to Guides
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());
}
}
Content copied to clipboard
Import
FirewallRule can be imported using any of these accepted formats
$ pulumi import gcp:appengine/firewallRule:FirewallRule default apps/{{project}}/firewall/ingressRules/{{priority}}
Content copied to clipboard
$ pulumi import gcp:appengine/firewallRule:FirewallRule default {{project}}/{{priority}}
Content copied to clipboard
$ pulumi import gcp:appengine/firewallRule:FirewallRule default {{priority}}
Content copied to clipboard
Constructors
Properties
Link copied to clipboard
An optional string description of this rule.
Link copied to clipboard
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
IP address or range, defined using CIDR notation, of requests that this rule applies to.