1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. NetworkFirewallPolicyRule
Google Cloud v8.23.0 published on Monday, Mar 24, 2025 by Pulumi

gcp.compute.NetworkFirewallPolicyRule

Explore with Pulumi AI

Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).

To get more information about NetworkFirewallPolicyRule, see:

Example Usage

Network Firewall Policy Rule

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const basicGlobalNetworksecurityAddressGroup = new gcp.networksecurity.AddressGroup("basic_global_networksecurity_address_group", {
    name: "address-group",
    parent: "projects/my-project-name",
    description: "Sample global networksecurity_address_group",
    location: "global",
    items: ["208.80.154.224/32"],
    type: "IPV4",
    capacity: 100,
});
const basicNetworkFirewallPolicy = new gcp.compute.NetworkFirewallPolicy("basic_network_firewall_policy", {
    name: "fw-policy",
    description: "Sample global network firewall policy",
    project: "my-project-name",
});
const basicNetwork = new gcp.compute.Network("basic_network", {name: "network"});
const basicKey = new gcp.tags.TagKey("basic_key", {
    description: "For keyname resources.",
    parent: "organizations/123456789",
    purpose: "GCE_FIREWALL",
    shortName: "tag-key",
    purposeData: {
        network: pulumi.interpolate`my-project-name/${basicNetwork.name}`,
    },
});
const basicValue = new gcp.tags.TagValue("basic_value", {
    description: "For valuename resources.",
    parent: basicKey.id,
    shortName: "tag-value",
});
const primary = new gcp.compute.NetworkFirewallPolicyRule("primary", {
    action: "allow",
    description: "This is a simple rule description",
    direction: "INGRESS",
    disabled: false,
    enableLogging: true,
    firewallPolicy: basicNetworkFirewallPolicy.name,
    priority: 1000,
    ruleName: "test-rule",
    targetServiceAccounts: ["my@service-account.com"],
    match: {
        srcAddressGroups: [basicGlobalNetworksecurityAddressGroup.id],
        srcIpRanges: ["10.100.0.1/32"],
        srcFqdns: ["google.com"],
        srcRegionCodes: ["US"],
        srcThreatIntelligences: ["iplist-known-malicious-ips"],
        srcSecureTags: [{
            name: basicValue.id,
        }],
        layer4Configs: [{
            ipProtocol: "all",
        }],
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

basic_global_networksecurity_address_group = gcp.networksecurity.AddressGroup("basic_global_networksecurity_address_group",
    name="address-group",
    parent="projects/my-project-name",
    description="Sample global networksecurity_address_group",
    location="global",
    items=["208.80.154.224/32"],
    type="IPV4",
    capacity=100)
basic_network_firewall_policy = gcp.compute.NetworkFirewallPolicy("basic_network_firewall_policy",
    name="fw-policy",
    description="Sample global network firewall policy",
    project="my-project-name")
basic_network = gcp.compute.Network("basic_network", name="network")
basic_key = gcp.tags.TagKey("basic_key",
    description="For keyname resources.",
    parent="organizations/123456789",
    purpose="GCE_FIREWALL",
    short_name="tag-key",
    purpose_data={
        "network": basic_network.name.apply(lambda name: f"my-project-name/{name}"),
    })
basic_value = gcp.tags.TagValue("basic_value",
    description="For valuename resources.",
    parent=basic_key.id,
    short_name="tag-value")
primary = gcp.compute.NetworkFirewallPolicyRule("primary",
    action="allow",
    description="This is a simple rule description",
    direction="INGRESS",
    disabled=False,
    enable_logging=True,
    firewall_policy=basic_network_firewall_policy.name,
    priority=1000,
    rule_name="test-rule",
    target_service_accounts=["my@service-account.com"],
    match={
        "src_address_groups": [basic_global_networksecurity_address_group.id],
        "src_ip_ranges": ["10.100.0.1/32"],
        "src_fqdns": ["google.com"],
        "src_region_codes": ["US"],
        "src_threat_intelligences": ["iplist-known-malicious-ips"],
        "src_secure_tags": [{
            "name": basic_value.id,
        }],
        "layer4_configs": [{
            "ip_protocol": "all",
        }],
    })
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/networksecurity"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/tags"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		basicGlobalNetworksecurityAddressGroup, err := networksecurity.NewAddressGroup(ctx, "basic_global_networksecurity_address_group", &networksecurity.AddressGroupArgs{
			Name:        pulumi.String("address-group"),
			Parent:      pulumi.String("projects/my-project-name"),
			Description: pulumi.String("Sample global networksecurity_address_group"),
			Location:    pulumi.String("global"),
			Items: pulumi.StringArray{
				pulumi.String("208.80.154.224/32"),
			},
			Type:     pulumi.String("IPV4"),
			Capacity: pulumi.Int(100),
		})
		if err != nil {
			return err
		}
		basicNetworkFirewallPolicy, err := compute.NewNetworkFirewallPolicy(ctx, "basic_network_firewall_policy", &compute.NetworkFirewallPolicyArgs{
			Name:        pulumi.String("fw-policy"),
			Description: pulumi.String("Sample global network firewall policy"),
			Project:     pulumi.String("my-project-name"),
		})
		if err != nil {
			return err
		}
		basicNetwork, err := compute.NewNetwork(ctx, "basic_network", &compute.NetworkArgs{
			Name: pulumi.String("network"),
		})
		if err != nil {
			return err
		}
		basicKey, err := tags.NewTagKey(ctx, "basic_key", &tags.TagKeyArgs{
			Description: pulumi.String("For keyname resources."),
			Parent:      pulumi.String("organizations/123456789"),
			Purpose:     pulumi.String("GCE_FIREWALL"),
			ShortName:   pulumi.String("tag-key"),
			PurposeData: pulumi.StringMap{
				"network": basicNetwork.Name.ApplyT(func(name string) (string, error) {
					return fmt.Sprintf("my-project-name/%v", name), nil
				}).(pulumi.StringOutput),
			},
		})
		if err != nil {
			return err
		}
		basicValue, err := tags.NewTagValue(ctx, "basic_value", &tags.TagValueArgs{
			Description: pulumi.String("For valuename resources."),
			Parent:      basicKey.ID(),
			ShortName:   pulumi.String("tag-value"),
		})
		if err != nil {
			return err
		}
		_, err = compute.NewNetworkFirewallPolicyRule(ctx, "primary", &compute.NetworkFirewallPolicyRuleArgs{
			Action:         pulumi.String("allow"),
			Description:    pulumi.String("This is a simple rule description"),
			Direction:      pulumi.String("INGRESS"),
			Disabled:       pulumi.Bool(false),
			EnableLogging:  pulumi.Bool(true),
			FirewallPolicy: basicNetworkFirewallPolicy.Name,
			Priority:       pulumi.Int(1000),
			RuleName:       pulumi.String("test-rule"),
			TargetServiceAccounts: pulumi.StringArray{
				pulumi.String("my@service-account.com"),
			},
			Match: &compute.NetworkFirewallPolicyRuleMatchArgs{
				SrcAddressGroups: pulumi.StringArray{
					basicGlobalNetworksecurityAddressGroup.ID(),
				},
				SrcIpRanges: pulumi.StringArray{
					pulumi.String("10.100.0.1/32"),
				},
				SrcFqdns: pulumi.StringArray{
					pulumi.String("google.com"),
				},
				SrcRegionCodes: pulumi.StringArray{
					pulumi.String("US"),
				},
				SrcThreatIntelligences: pulumi.StringArray{
					pulumi.String("iplist-known-malicious-ips"),
				},
				SrcSecureTags: compute.NetworkFirewallPolicyRuleMatchSrcSecureTagArray{
					&compute.NetworkFirewallPolicyRuleMatchSrcSecureTagArgs{
						Name: basicValue.ID(),
					},
				},
				Layer4Configs: compute.NetworkFirewallPolicyRuleMatchLayer4ConfigArray{
					&compute.NetworkFirewallPolicyRuleMatchLayer4ConfigArgs{
						IpProtocol: pulumi.String("all"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var basicGlobalNetworksecurityAddressGroup = new Gcp.NetworkSecurity.AddressGroup("basic_global_networksecurity_address_group", new()
    {
        Name = "address-group",
        Parent = "projects/my-project-name",
        Description = "Sample global networksecurity_address_group",
        Location = "global",
        Items = new[]
        {
            "208.80.154.224/32",
        },
        Type = "IPV4",
        Capacity = 100,
    });

    var basicNetworkFirewallPolicy = new Gcp.Compute.NetworkFirewallPolicy("basic_network_firewall_policy", new()
    {
        Name = "fw-policy",
        Description = "Sample global network firewall policy",
        Project = "my-project-name",
    });

    var basicNetwork = new Gcp.Compute.Network("basic_network", new()
    {
        Name = "network",
    });

    var basicKey = new Gcp.Tags.TagKey("basic_key", new()
    {
        Description = "For keyname resources.",
        Parent = "organizations/123456789",
        Purpose = "GCE_FIREWALL",
        ShortName = "tag-key",
        PurposeData = 
        {
            { "network", basicNetwork.Name.Apply(name => $"my-project-name/{name}") },
        },
    });

    var basicValue = new Gcp.Tags.TagValue("basic_value", new()
    {
        Description = "For valuename resources.",
        Parent = basicKey.Id,
        ShortName = "tag-value",
    });

    var primary = new Gcp.Compute.NetworkFirewallPolicyRule("primary", new()
    {
        Action = "allow",
        Description = "This is a simple rule description",
        Direction = "INGRESS",
        Disabled = false,
        EnableLogging = true,
        FirewallPolicy = basicNetworkFirewallPolicy.Name,
        Priority = 1000,
        RuleName = "test-rule",
        TargetServiceAccounts = new[]
        {
            "my@service-account.com",
        },
        Match = new Gcp.Compute.Inputs.NetworkFirewallPolicyRuleMatchArgs
        {
            SrcAddressGroups = new[]
            {
                basicGlobalNetworksecurityAddressGroup.Id,
            },
            SrcIpRanges = new[]
            {
                "10.100.0.1/32",
            },
            SrcFqdns = new[]
            {
                "google.com",
            },
            SrcRegionCodes = new[]
            {
                "US",
            },
            SrcThreatIntelligences = new[]
            {
                "iplist-known-malicious-ips",
            },
            SrcSecureTags = new[]
            {
                new Gcp.Compute.Inputs.NetworkFirewallPolicyRuleMatchSrcSecureTagArgs
                {
                    Name = basicValue.Id,
                },
            },
            Layer4Configs = new[]
            {
                new Gcp.Compute.Inputs.NetworkFirewallPolicyRuleMatchLayer4ConfigArgs
                {
                    IpProtocol = "all",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networksecurity.AddressGroup;
import com.pulumi.gcp.networksecurity.AddressGroupArgs;
import com.pulumi.gcp.compute.NetworkFirewallPolicy;
import com.pulumi.gcp.compute.NetworkFirewallPolicyArgs;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.tags.TagKey;
import com.pulumi.gcp.tags.TagKeyArgs;
import com.pulumi.gcp.tags.TagValue;
import com.pulumi.gcp.tags.TagValueArgs;
import com.pulumi.gcp.compute.NetworkFirewallPolicyRule;
import com.pulumi.gcp.compute.NetworkFirewallPolicyRuleArgs;
import com.pulumi.gcp.compute.inputs.NetworkFirewallPolicyRuleMatchArgs;
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 basicGlobalNetworksecurityAddressGroup = new AddressGroup("basicGlobalNetworksecurityAddressGroup", AddressGroupArgs.builder()
            .name("address-group")
            .parent("projects/my-project-name")
            .description("Sample global networksecurity_address_group")
            .location("global")
            .items("208.80.154.224/32")
            .type("IPV4")
            .capacity(100)
            .build());

        var basicNetworkFirewallPolicy = new NetworkFirewallPolicy("basicNetworkFirewallPolicy", NetworkFirewallPolicyArgs.builder()
            .name("fw-policy")
            .description("Sample global network firewall policy")
            .project("my-project-name")
            .build());

        var basicNetwork = new Network("basicNetwork", NetworkArgs.builder()
            .name("network")
            .build());

        var basicKey = new TagKey("basicKey", TagKeyArgs.builder()
            .description("For keyname resources.")
            .parent("organizations/123456789")
            .purpose("GCE_FIREWALL")
            .shortName("tag-key")
            .purposeData(Map.of("network", basicNetwork.name().applyValue(name -> String.format("my-project-name/%s", name))))
            .build());

        var basicValue = new TagValue("basicValue", TagValueArgs.builder()
            .description("For valuename resources.")
            .parent(basicKey.id())
            .shortName("tag-value")
            .build());

        var primary = new NetworkFirewallPolicyRule("primary", NetworkFirewallPolicyRuleArgs.builder()
            .action("allow")
            .description("This is a simple rule description")
            .direction("INGRESS")
            .disabled(false)
            .enableLogging(true)
            .firewallPolicy(basicNetworkFirewallPolicy.name())
            .priority(1000)
            .ruleName("test-rule")
            .targetServiceAccounts("my@service-account.com")
            .match(NetworkFirewallPolicyRuleMatchArgs.builder()
                .srcAddressGroups(basicGlobalNetworksecurityAddressGroup.id())
                .srcIpRanges("10.100.0.1/32")
                .srcFqdns("google.com")
                .srcRegionCodes("US")
                .srcThreatIntelligences("iplist-known-malicious-ips")
                .srcSecureTags(NetworkFirewallPolicyRuleMatchSrcSecureTagArgs.builder()
                    .name(basicValue.id())
                    .build())
                .layer4Configs(NetworkFirewallPolicyRuleMatchLayer4ConfigArgs.builder()
                    .ipProtocol("all")
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  basicGlobalNetworksecurityAddressGroup:
    type: gcp:networksecurity:AddressGroup
    name: basic_global_networksecurity_address_group
    properties:
      name: address-group
      parent: projects/my-project-name
      description: Sample global networksecurity_address_group
      location: global
      items:
        - 208.80.154.224/32
      type: IPV4
      capacity: 100
  basicNetworkFirewallPolicy:
    type: gcp:compute:NetworkFirewallPolicy
    name: basic_network_firewall_policy
    properties:
      name: fw-policy
      description: Sample global network firewall policy
      project: my-project-name
  primary:
    type: gcp:compute:NetworkFirewallPolicyRule
    properties:
      action: allow
      description: This is a simple rule description
      direction: INGRESS
      disabled: false
      enableLogging: true
      firewallPolicy: ${basicNetworkFirewallPolicy.name}
      priority: 1000
      ruleName: test-rule
      targetServiceAccounts:
        - my@service-account.com
      match:
        srcAddressGroups:
          - ${basicGlobalNetworksecurityAddressGroup.id}
        srcIpRanges:
          - 10.100.0.1/32
        srcFqdns:
          - google.com
        srcRegionCodes:
          - US
        srcThreatIntelligences:
          - iplist-known-malicious-ips
        srcSecureTags:
          - name: ${basicValue.id}
        layer4Configs:
          - ipProtocol: all
  basicNetwork:
    type: gcp:compute:Network
    name: basic_network
    properties:
      name: network
  basicKey:
    type: gcp:tags:TagKey
    name: basic_key
    properties:
      description: For keyname resources.
      parent: organizations/123456789
      purpose: GCE_FIREWALL
      shortName: tag-key
      purposeData:
        network: my-project-name/${basicNetwork.name}
  basicValue:
    type: gcp:tags:TagValue
    name: basic_value
    properties:
      description: For valuename resources.
      parent: ${basicKey.id}
      shortName: tag-value
Copy

Network Firewall Policy Rule Network Scope Egress

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const basicNetworkFirewallPolicy = new gcp.compute.NetworkFirewallPolicy("basic_network_firewall_policy", {
    name: "fw-policy",
    description: "Sample global network firewall policy",
    project: "my-project-name",
});
const primary = new gcp.compute.NetworkFirewallPolicyRule("primary", {
    action: "allow",
    description: "This is a simple rule description",
    direction: "EGRESS",
    disabled: false,
    enableLogging: true,
    firewallPolicy: basicNetworkFirewallPolicy.name,
    priority: 1000,
    ruleName: "test-rule",
    match: {
        destIpRanges: ["10.100.0.1/32"],
        destNetworkScope: "INTERNET",
        layer4Configs: [{
            ipProtocol: "all",
        }],
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

basic_network_firewall_policy = gcp.compute.NetworkFirewallPolicy("basic_network_firewall_policy",
    name="fw-policy",
    description="Sample global network firewall policy",
    project="my-project-name")
primary = gcp.compute.NetworkFirewallPolicyRule("primary",
    action="allow",
    description="This is a simple rule description",
    direction="EGRESS",
    disabled=False,
    enable_logging=True,
    firewall_policy=basic_network_firewall_policy.name,
    priority=1000,
    rule_name="test-rule",
    match={
        "dest_ip_ranges": ["10.100.0.1/32"],
        "dest_network_scope": "INTERNET",
        "layer4_configs": [{
            "ip_protocol": "all",
        }],
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		basicNetworkFirewallPolicy, err := compute.NewNetworkFirewallPolicy(ctx, "basic_network_firewall_policy", &compute.NetworkFirewallPolicyArgs{
			Name:        pulumi.String("fw-policy"),
			Description: pulumi.String("Sample global network firewall policy"),
			Project:     pulumi.String("my-project-name"),
		})
		if err != nil {
			return err
		}
		_, err = compute.NewNetworkFirewallPolicyRule(ctx, "primary", &compute.NetworkFirewallPolicyRuleArgs{
			Action:         pulumi.String("allow"),
			Description:    pulumi.String("This is a simple rule description"),
			Direction:      pulumi.String("EGRESS"),
			Disabled:       pulumi.Bool(false),
			EnableLogging:  pulumi.Bool(true),
			FirewallPolicy: basicNetworkFirewallPolicy.Name,
			Priority:       pulumi.Int(1000),
			RuleName:       pulumi.String("test-rule"),
			Match: &compute.NetworkFirewallPolicyRuleMatchArgs{
				DestIpRanges: pulumi.StringArray{
					pulumi.String("10.100.0.1/32"),
				},
				DestNetworkScope: pulumi.String("INTERNET"),
				Layer4Configs: compute.NetworkFirewallPolicyRuleMatchLayer4ConfigArray{
					&compute.NetworkFirewallPolicyRuleMatchLayer4ConfigArgs{
						IpProtocol: pulumi.String("all"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var basicNetworkFirewallPolicy = new Gcp.Compute.NetworkFirewallPolicy("basic_network_firewall_policy", new()
    {
        Name = "fw-policy",
        Description = "Sample global network firewall policy",
        Project = "my-project-name",
    });

    var primary = new Gcp.Compute.NetworkFirewallPolicyRule("primary", new()
    {
        Action = "allow",
        Description = "This is a simple rule description",
        Direction = "EGRESS",
        Disabled = false,
        EnableLogging = true,
        FirewallPolicy = basicNetworkFirewallPolicy.Name,
        Priority = 1000,
        RuleName = "test-rule",
        Match = new Gcp.Compute.Inputs.NetworkFirewallPolicyRuleMatchArgs
        {
            DestIpRanges = new[]
            {
                "10.100.0.1/32",
            },
            DestNetworkScope = "INTERNET",
            Layer4Configs = new[]
            {
                new Gcp.Compute.Inputs.NetworkFirewallPolicyRuleMatchLayer4ConfigArgs
                {
                    IpProtocol = "all",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.NetworkFirewallPolicy;
import com.pulumi.gcp.compute.NetworkFirewallPolicyArgs;
import com.pulumi.gcp.compute.NetworkFirewallPolicyRule;
import com.pulumi.gcp.compute.NetworkFirewallPolicyRuleArgs;
import com.pulumi.gcp.compute.inputs.NetworkFirewallPolicyRuleMatchArgs;
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 basicNetworkFirewallPolicy = new NetworkFirewallPolicy("basicNetworkFirewallPolicy", NetworkFirewallPolicyArgs.builder()
            .name("fw-policy")
            .description("Sample global network firewall policy")
            .project("my-project-name")
            .build());

        var primary = new NetworkFirewallPolicyRule("primary", NetworkFirewallPolicyRuleArgs.builder()
            .action("allow")
            .description("This is a simple rule description")
            .direction("EGRESS")
            .disabled(false)
            .enableLogging(true)
            .firewallPolicy(basicNetworkFirewallPolicy.name())
            .priority(1000)
            .ruleName("test-rule")
            .match(NetworkFirewallPolicyRuleMatchArgs.builder()
                .destIpRanges("10.100.0.1/32")
                .destNetworkScope("INTERNET")
                .layer4Configs(NetworkFirewallPolicyRuleMatchLayer4ConfigArgs.builder()
                    .ipProtocol("all")
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  basicNetworkFirewallPolicy:
    type: gcp:compute:NetworkFirewallPolicy
    name: basic_network_firewall_policy
    properties:
      name: fw-policy
      description: Sample global network firewall policy
      project: my-project-name
  primary:
    type: gcp:compute:NetworkFirewallPolicyRule
    properties:
      action: allow
      description: This is a simple rule description
      direction: EGRESS
      disabled: false
      enableLogging: true
      firewallPolicy: ${basicNetworkFirewallPolicy.name}
      priority: 1000
      ruleName: test-rule
      match:
        destIpRanges:
          - 10.100.0.1/32
        destNetworkScope: INTERNET
        layer4Configs:
          - ipProtocol: all
Copy

Network Firewall Policy Rule Network Scope Ingress

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const basicNetworkFirewallPolicy = new gcp.compute.NetworkFirewallPolicy("basic_network_firewall_policy", {
    name: "fw-policy",
    description: "Sample global network firewall policy",
    project: "my-project-name",
});
const network = new gcp.compute.Network("network", {name: "network"});
const primary = new gcp.compute.NetworkFirewallPolicyRule("primary", {
    action: "allow",
    description: "This is a simple rule description",
    direction: "INGRESS",
    disabled: false,
    enableLogging: true,
    firewallPolicy: basicNetworkFirewallPolicy.name,
    priority: 1000,
    ruleName: "test-rule",
    match: {
        srcIpRanges: ["11.100.0.1/32"],
        srcNetworkScope: "VPC_NETWORKS",
        srcNetworks: [network.id],
        layer4Configs: [{
            ipProtocol: "all",
        }],
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

basic_network_firewall_policy = gcp.compute.NetworkFirewallPolicy("basic_network_firewall_policy",
    name="fw-policy",
    description="Sample global network firewall policy",
    project="my-project-name")
network = gcp.compute.Network("network", name="network")
primary = gcp.compute.NetworkFirewallPolicyRule("primary",
    action="allow",
    description="This is a simple rule description",
    direction="INGRESS",
    disabled=False,
    enable_logging=True,
    firewall_policy=basic_network_firewall_policy.name,
    priority=1000,
    rule_name="test-rule",
    match={
        "src_ip_ranges": ["11.100.0.1/32"],
        "src_network_scope": "VPC_NETWORKS",
        "src_networks": [network.id],
        "layer4_configs": [{
            "ip_protocol": "all",
        }],
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		basicNetworkFirewallPolicy, err := compute.NewNetworkFirewallPolicy(ctx, "basic_network_firewall_policy", &compute.NetworkFirewallPolicyArgs{
			Name:        pulumi.String("fw-policy"),
			Description: pulumi.String("Sample global network firewall policy"),
			Project:     pulumi.String("my-project-name"),
		})
		if err != nil {
			return err
		}
		network, err := compute.NewNetwork(ctx, "network", &compute.NetworkArgs{
			Name: pulumi.String("network"),
		})
		if err != nil {
			return err
		}
		_, err = compute.NewNetworkFirewallPolicyRule(ctx, "primary", &compute.NetworkFirewallPolicyRuleArgs{
			Action:         pulumi.String("allow"),
			Description:    pulumi.String("This is a simple rule description"),
			Direction:      pulumi.String("INGRESS"),
			Disabled:       pulumi.Bool(false),
			EnableLogging:  pulumi.Bool(true),
			FirewallPolicy: basicNetworkFirewallPolicy.Name,
			Priority:       pulumi.Int(1000),
			RuleName:       pulumi.String("test-rule"),
			Match: &compute.NetworkFirewallPolicyRuleMatchArgs{
				SrcIpRanges: pulumi.StringArray{
					pulumi.String("11.100.0.1/32"),
				},
				SrcNetworkScope: pulumi.String("VPC_NETWORKS"),
				SrcNetworks: pulumi.StringArray{
					network.ID(),
				},
				Layer4Configs: compute.NetworkFirewallPolicyRuleMatchLayer4ConfigArray{
					&compute.NetworkFirewallPolicyRuleMatchLayer4ConfigArgs{
						IpProtocol: pulumi.String("all"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var basicNetworkFirewallPolicy = new Gcp.Compute.NetworkFirewallPolicy("basic_network_firewall_policy", new()
    {
        Name = "fw-policy",
        Description = "Sample global network firewall policy",
        Project = "my-project-name",
    });

    var network = new Gcp.Compute.Network("network", new()
    {
        Name = "network",
    });

    var primary = new Gcp.Compute.NetworkFirewallPolicyRule("primary", new()
    {
        Action = "allow",
        Description = "This is a simple rule description",
        Direction = "INGRESS",
        Disabled = false,
        EnableLogging = true,
        FirewallPolicy = basicNetworkFirewallPolicy.Name,
        Priority = 1000,
        RuleName = "test-rule",
        Match = new Gcp.Compute.Inputs.NetworkFirewallPolicyRuleMatchArgs
        {
            SrcIpRanges = new[]
            {
                "11.100.0.1/32",
            },
            SrcNetworkScope = "VPC_NETWORKS",
            SrcNetworks = new[]
            {
                network.Id,
            },
            Layer4Configs = new[]
            {
                new Gcp.Compute.Inputs.NetworkFirewallPolicyRuleMatchLayer4ConfigArgs
                {
                    IpProtocol = "all",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.NetworkFirewallPolicy;
import com.pulumi.gcp.compute.NetworkFirewallPolicyArgs;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.NetworkFirewallPolicyRule;
import com.pulumi.gcp.compute.NetworkFirewallPolicyRuleArgs;
import com.pulumi.gcp.compute.inputs.NetworkFirewallPolicyRuleMatchArgs;
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 basicNetworkFirewallPolicy = new NetworkFirewallPolicy("basicNetworkFirewallPolicy", NetworkFirewallPolicyArgs.builder()
            .name("fw-policy")
            .description("Sample global network firewall policy")
            .project("my-project-name")
            .build());

        var network = new Network("network", NetworkArgs.builder()
            .name("network")
            .build());

        var primary = new NetworkFirewallPolicyRule("primary", NetworkFirewallPolicyRuleArgs.builder()
            .action("allow")
            .description("This is a simple rule description")
            .direction("INGRESS")
            .disabled(false)
            .enableLogging(true)
            .firewallPolicy(basicNetworkFirewallPolicy.name())
            .priority(1000)
            .ruleName("test-rule")
            .match(NetworkFirewallPolicyRuleMatchArgs.builder()
                .srcIpRanges("11.100.0.1/32")
                .srcNetworkScope("VPC_NETWORKS")
                .srcNetworks(network.id())
                .layer4Configs(NetworkFirewallPolicyRuleMatchLayer4ConfigArgs.builder()
                    .ipProtocol("all")
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  basicNetworkFirewallPolicy:
    type: gcp:compute:NetworkFirewallPolicy
    name: basic_network_firewall_policy
    properties:
      name: fw-policy
      description: Sample global network firewall policy
      project: my-project-name
  primary:
    type: gcp:compute:NetworkFirewallPolicyRule
    properties:
      action: allow
      description: This is a simple rule description
      direction: INGRESS
      disabled: false
      enableLogging: true
      firewallPolicy: ${basicNetworkFirewallPolicy.name}
      priority: 1000
      ruleName: test-rule
      match:
        srcIpRanges:
          - 11.100.0.1/32
        srcNetworkScope: VPC_NETWORKS
        srcNetworks:
          - ${network.id}
        layer4Configs:
          - ipProtocol: all
  network:
    type: gcp:compute:Network
    properties:
      name: network
Copy

Create NetworkFirewallPolicyRule Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new NetworkFirewallPolicyRule(name: string, args: NetworkFirewallPolicyRuleArgs, opts?: CustomResourceOptions);
@overload
def NetworkFirewallPolicyRule(resource_name: str,
                              args: NetworkFirewallPolicyRuleArgs,
                              opts: Optional[ResourceOptions] = None)

@overload
def NetworkFirewallPolicyRule(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              firewall_policy: Optional[str] = None,
                              priority: Optional[int] = None,
                              direction: Optional[str] = None,
                              action: Optional[str] = None,
                              match: Optional[NetworkFirewallPolicyRuleMatchArgs] = None,
                              disabled: Optional[bool] = None,
                              enable_logging: Optional[bool] = None,
                              description: Optional[str] = None,
                              project: Optional[str] = None,
                              rule_name: Optional[str] = None,
                              security_profile_group: Optional[str] = None,
                              target_secure_tags: Optional[Sequence[NetworkFirewallPolicyRuleTargetSecureTagArgs]] = None,
                              target_service_accounts: Optional[Sequence[str]] = None,
                              tls_inspect: Optional[bool] = None)
func NewNetworkFirewallPolicyRule(ctx *Context, name string, args NetworkFirewallPolicyRuleArgs, opts ...ResourceOption) (*NetworkFirewallPolicyRule, error)
public NetworkFirewallPolicyRule(string name, NetworkFirewallPolicyRuleArgs args, CustomResourceOptions? opts = null)
public NetworkFirewallPolicyRule(String name, NetworkFirewallPolicyRuleArgs args)
public NetworkFirewallPolicyRule(String name, NetworkFirewallPolicyRuleArgs args, CustomResourceOptions options)
type: gcp:compute:NetworkFirewallPolicyRule
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. NetworkFirewallPolicyRuleArgs
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. NetworkFirewallPolicyRuleArgs
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. NetworkFirewallPolicyRuleArgs
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. NetworkFirewallPolicyRuleArgs
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. NetworkFirewallPolicyRuleArgs
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 networkFirewallPolicyRuleResource = new Gcp.Compute.NetworkFirewallPolicyRule("networkFirewallPolicyRuleResource", new()
{
    FirewallPolicy = "string",
    Priority = 0,
    Direction = "string",
    Action = "string",
    Match = new Gcp.Compute.Inputs.NetworkFirewallPolicyRuleMatchArgs
    {
        Layer4Configs = new[]
        {
            new Gcp.Compute.Inputs.NetworkFirewallPolicyRuleMatchLayer4ConfigArgs
            {
                IpProtocol = "string",
                Ports = new[]
                {
                    "string",
                },
            },
        },
        DestNetworkScope = "string",
        SrcFqdns = new[]
        {
            "string",
        },
        DestAddressGroups = new[]
        {
            "string",
        },
        DestRegionCodes = new[]
        {
            "string",
        },
        DestThreatIntelligences = new[]
        {
            "string",
        },
        DestFqdns = new[]
        {
            "string",
        },
        SrcAddressGroups = new[]
        {
            "string",
        },
        DestIpRanges = new[]
        {
            "string",
        },
        SrcIpRanges = new[]
        {
            "string",
        },
        SrcNetworkScope = "string",
        SrcNetworks = new[]
        {
            "string",
        },
        SrcRegionCodes = new[]
        {
            "string",
        },
        SrcSecureTags = new[]
        {
            new Gcp.Compute.Inputs.NetworkFirewallPolicyRuleMatchSrcSecureTagArgs
            {
                Name = "string",
                State = "string",
            },
        },
        SrcThreatIntelligences = new[]
        {
            "string",
        },
    },
    Disabled = false,
    EnableLogging = false,
    Description = "string",
    Project = "string",
    RuleName = "string",
    SecurityProfileGroup = "string",
    TargetSecureTags = new[]
    {
        new Gcp.Compute.Inputs.NetworkFirewallPolicyRuleTargetSecureTagArgs
        {
            Name = "string",
            State = "string",
        },
    },
    TargetServiceAccounts = new[]
    {
        "string",
    },
    TlsInspect = false,
});
Copy
example, err := compute.NewNetworkFirewallPolicyRule(ctx, "networkFirewallPolicyRuleResource", &compute.NetworkFirewallPolicyRuleArgs{
	FirewallPolicy: pulumi.String("string"),
	Priority:       pulumi.Int(0),
	Direction:      pulumi.String("string"),
	Action:         pulumi.String("string"),
	Match: &compute.NetworkFirewallPolicyRuleMatchArgs{
		Layer4Configs: compute.NetworkFirewallPolicyRuleMatchLayer4ConfigArray{
			&compute.NetworkFirewallPolicyRuleMatchLayer4ConfigArgs{
				IpProtocol: pulumi.String("string"),
				Ports: pulumi.StringArray{
					pulumi.String("string"),
				},
			},
		},
		DestNetworkScope: pulumi.String("string"),
		SrcFqdns: pulumi.StringArray{
			pulumi.String("string"),
		},
		DestAddressGroups: pulumi.StringArray{
			pulumi.String("string"),
		},
		DestRegionCodes: pulumi.StringArray{
			pulumi.String("string"),
		},
		DestThreatIntelligences: pulumi.StringArray{
			pulumi.String("string"),
		},
		DestFqdns: pulumi.StringArray{
			pulumi.String("string"),
		},
		SrcAddressGroups: pulumi.StringArray{
			pulumi.String("string"),
		},
		DestIpRanges: pulumi.StringArray{
			pulumi.String("string"),
		},
		SrcIpRanges: pulumi.StringArray{
			pulumi.String("string"),
		},
		SrcNetworkScope: pulumi.String("string"),
		SrcNetworks: pulumi.StringArray{
			pulumi.String("string"),
		},
		SrcRegionCodes: pulumi.StringArray{
			pulumi.String("string"),
		},
		SrcSecureTags: compute.NetworkFirewallPolicyRuleMatchSrcSecureTagArray{
			&compute.NetworkFirewallPolicyRuleMatchSrcSecureTagArgs{
				Name:  pulumi.String("string"),
				State: pulumi.String("string"),
			},
		},
		SrcThreatIntelligences: pulumi.StringArray{
			pulumi.String("string"),
		},
	},
	Disabled:             pulumi.Bool(false),
	EnableLogging:        pulumi.Bool(false),
	Description:          pulumi.String("string"),
	Project:              pulumi.String("string"),
	RuleName:             pulumi.String("string"),
	SecurityProfileGroup: pulumi.String("string"),
	TargetSecureTags: compute.NetworkFirewallPolicyRuleTargetSecureTagArray{
		&compute.NetworkFirewallPolicyRuleTargetSecureTagArgs{
			Name:  pulumi.String("string"),
			State: pulumi.String("string"),
		},
	},
	TargetServiceAccounts: pulumi.StringArray{
		pulumi.String("string"),
	},
	TlsInspect: pulumi.Bool(false),
})
Copy
var networkFirewallPolicyRuleResource = new NetworkFirewallPolicyRule("networkFirewallPolicyRuleResource", NetworkFirewallPolicyRuleArgs.builder()
    .firewallPolicy("string")
    .priority(0)
    .direction("string")
    .action("string")
    .match(NetworkFirewallPolicyRuleMatchArgs.builder()
        .layer4Configs(NetworkFirewallPolicyRuleMatchLayer4ConfigArgs.builder()
            .ipProtocol("string")
            .ports("string")
            .build())
        .destNetworkScope("string")
        .srcFqdns("string")
        .destAddressGroups("string")
        .destRegionCodes("string")
        .destThreatIntelligences("string")
        .destFqdns("string")
        .srcAddressGroups("string")
        .destIpRanges("string")
        .srcIpRanges("string")
        .srcNetworkScope("string")
        .srcNetworks("string")
        .srcRegionCodes("string")
        .srcSecureTags(NetworkFirewallPolicyRuleMatchSrcSecureTagArgs.builder()
            .name("string")
            .state("string")
            .build())
        .srcThreatIntelligences("string")
        .build())
    .disabled(false)
    .enableLogging(false)
    .description("string")
    .project("string")
    .ruleName("string")
    .securityProfileGroup("string")
    .targetSecureTags(NetworkFirewallPolicyRuleTargetSecureTagArgs.builder()
        .name("string")
        .state("string")
        .build())
    .targetServiceAccounts("string")
    .tlsInspect(false)
    .build());
Copy
network_firewall_policy_rule_resource = gcp.compute.NetworkFirewallPolicyRule("networkFirewallPolicyRuleResource",
    firewall_policy="string",
    priority=0,
    direction="string",
    action="string",
    match={
        "layer4_configs": [{
            "ip_protocol": "string",
            "ports": ["string"],
        }],
        "dest_network_scope": "string",
        "src_fqdns": ["string"],
        "dest_address_groups": ["string"],
        "dest_region_codes": ["string"],
        "dest_threat_intelligences": ["string"],
        "dest_fqdns": ["string"],
        "src_address_groups": ["string"],
        "dest_ip_ranges": ["string"],
        "src_ip_ranges": ["string"],
        "src_network_scope": "string",
        "src_networks": ["string"],
        "src_region_codes": ["string"],
        "src_secure_tags": [{
            "name": "string",
            "state": "string",
        }],
        "src_threat_intelligences": ["string"],
    },
    disabled=False,
    enable_logging=False,
    description="string",
    project="string",
    rule_name="string",
    security_profile_group="string",
    target_secure_tags=[{
        "name": "string",
        "state": "string",
    }],
    target_service_accounts=["string"],
    tls_inspect=False)
Copy
const networkFirewallPolicyRuleResource = new gcp.compute.NetworkFirewallPolicyRule("networkFirewallPolicyRuleResource", {
    firewallPolicy: "string",
    priority: 0,
    direction: "string",
    action: "string",
    match: {
        layer4Configs: [{
            ipProtocol: "string",
            ports: ["string"],
        }],
        destNetworkScope: "string",
        srcFqdns: ["string"],
        destAddressGroups: ["string"],
        destRegionCodes: ["string"],
        destThreatIntelligences: ["string"],
        destFqdns: ["string"],
        srcAddressGroups: ["string"],
        destIpRanges: ["string"],
        srcIpRanges: ["string"],
        srcNetworkScope: "string",
        srcNetworks: ["string"],
        srcRegionCodes: ["string"],
        srcSecureTags: [{
            name: "string",
            state: "string",
        }],
        srcThreatIntelligences: ["string"],
    },
    disabled: false,
    enableLogging: false,
    description: "string",
    project: "string",
    ruleName: "string",
    securityProfileGroup: "string",
    targetSecureTags: [{
        name: "string",
        state: "string",
    }],
    targetServiceAccounts: ["string"],
    tlsInspect: false,
});
Copy
type: gcp:compute:NetworkFirewallPolicyRule
properties:
    action: string
    description: string
    direction: string
    disabled: false
    enableLogging: false
    firewallPolicy: string
    match:
        destAddressGroups:
            - string
        destFqdns:
            - string
        destIpRanges:
            - string
        destNetworkScope: string
        destRegionCodes:
            - string
        destThreatIntelligences:
            - string
        layer4Configs:
            - ipProtocol: string
              ports:
                - string
        srcAddressGroups:
            - string
        srcFqdns:
            - string
        srcIpRanges:
            - string
        srcNetworkScope: string
        srcNetworks:
            - string
        srcRegionCodes:
            - string
        srcSecureTags:
            - name: string
              state: string
        srcThreatIntelligences:
            - string
    priority: 0
    project: string
    ruleName: string
    securityProfileGroup: string
    targetSecureTags:
        - name: string
          state: string
    targetServiceAccounts:
        - string
    tlsInspect: false
Copy

NetworkFirewallPolicyRule 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 NetworkFirewallPolicyRule resource accepts the following input properties:

Action This property is required. string
The Action to perform when the client connection triggers the rule. Valid actions are "allow", "deny", "goto_next" and "apply_security_profile_group".
Direction This property is required. string
The direction in which this rule applies. Possible values are: INGRESS, EGRESS.
FirewallPolicy
This property is required.
Changes to this property will trigger replacement.
string
The firewall policy of the resource.
Match This property is required. NetworkFirewallPolicyRuleMatch
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. Structure is documented below.
Priority
This property is required.
Changes to this property will trigger replacement.
int
An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
Description string
An optional description for this resource.
Disabled bool
Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.
EnableLogging bool
Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules.
Project Changes to this property will trigger replacement. string
RuleName string
An optional name for the rule. This field is not a unique identifier and can be updated.
SecurityProfileGroup string
A fully-qualified URL of a SecurityProfile resource instance. Example: https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group Must be specified if action = 'apply_security_profile_group' and cannot be specified for other actions.
TargetSecureTags List<NetworkFirewallPolicyRuleTargetSecureTag>
A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the targetSecureTag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256.
TargetServiceAccounts List<string>
A list of service accounts indicating the sets of instances that are applied with this rule.
TlsInspect bool
Boolean flag indicating if the traffic should be TLS decrypted. Can be set only if action = 'apply_security_profile_group' and cannot be set for other actions.
Action This property is required. string
The Action to perform when the client connection triggers the rule. Valid actions are "allow", "deny", "goto_next" and "apply_security_profile_group".
Direction This property is required. string
The direction in which this rule applies. Possible values are: INGRESS, EGRESS.
FirewallPolicy
This property is required.
Changes to this property will trigger replacement.
string
The firewall policy of the resource.
Match This property is required. NetworkFirewallPolicyRuleMatchArgs
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. Structure is documented below.
Priority
This property is required.
Changes to this property will trigger replacement.
int
An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
Description string
An optional description for this resource.
Disabled bool
Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.
EnableLogging bool
Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules.
Project Changes to this property will trigger replacement. string
RuleName string
An optional name for the rule. This field is not a unique identifier and can be updated.
SecurityProfileGroup string
A fully-qualified URL of a SecurityProfile resource instance. Example: https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group Must be specified if action = 'apply_security_profile_group' and cannot be specified for other actions.
TargetSecureTags []NetworkFirewallPolicyRuleTargetSecureTagArgs
A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the targetSecureTag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256.
TargetServiceAccounts []string
A list of service accounts indicating the sets of instances that are applied with this rule.
TlsInspect bool
Boolean flag indicating if the traffic should be TLS decrypted. Can be set only if action = 'apply_security_profile_group' and cannot be set for other actions.
action This property is required. String
The Action to perform when the client connection triggers the rule. Valid actions are "allow", "deny", "goto_next" and "apply_security_profile_group".
direction This property is required. String
The direction in which this rule applies. Possible values are: INGRESS, EGRESS.
firewallPolicy
This property is required.
Changes to this property will trigger replacement.
String
The firewall policy of the resource.
match This property is required. NetworkFirewallPolicyRuleMatch
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. Structure is documented below.
priority
This property is required.
Changes to this property will trigger replacement.
Integer
An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
description String
An optional description for this resource.
disabled Boolean
Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.
enableLogging Boolean
Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules.
project Changes to this property will trigger replacement. String
ruleName String
An optional name for the rule. This field is not a unique identifier and can be updated.
securityProfileGroup String
A fully-qualified URL of a SecurityProfile resource instance. Example: https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group Must be specified if action = 'apply_security_profile_group' and cannot be specified for other actions.
targetSecureTags List<NetworkFirewallPolicyRuleTargetSecureTag>
A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the targetSecureTag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256.
targetServiceAccounts List<String>
A list of service accounts indicating the sets of instances that are applied with this rule.
tlsInspect Boolean
Boolean flag indicating if the traffic should be TLS decrypted. Can be set only if action = 'apply_security_profile_group' and cannot be set for other actions.
action This property is required. string
The Action to perform when the client connection triggers the rule. Valid actions are "allow", "deny", "goto_next" and "apply_security_profile_group".
direction This property is required. string
The direction in which this rule applies. Possible values are: INGRESS, EGRESS.
firewallPolicy
This property is required.
Changes to this property will trigger replacement.
string
The firewall policy of the resource.
match This property is required. NetworkFirewallPolicyRuleMatch
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. Structure is documented below.
priority
This property is required.
Changes to this property will trigger replacement.
number
An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
description string
An optional description for this resource.
disabled boolean
Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.
enableLogging boolean
Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules.
project Changes to this property will trigger replacement. string
ruleName string
An optional name for the rule. This field is not a unique identifier and can be updated.
securityProfileGroup string
A fully-qualified URL of a SecurityProfile resource instance. Example: https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group Must be specified if action = 'apply_security_profile_group' and cannot be specified for other actions.
targetSecureTags NetworkFirewallPolicyRuleTargetSecureTag[]
A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the targetSecureTag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256.
targetServiceAccounts string[]
A list of service accounts indicating the sets of instances that are applied with this rule.
tlsInspect boolean
Boolean flag indicating if the traffic should be TLS decrypted. Can be set only if action = 'apply_security_profile_group' and cannot be set for other actions.
action This property is required. str
The Action to perform when the client connection triggers the rule. Valid actions are "allow", "deny", "goto_next" and "apply_security_profile_group".
direction This property is required. str
The direction in which this rule applies. Possible values are: INGRESS, EGRESS.
firewall_policy
This property is required.
Changes to this property will trigger replacement.
str
The firewall policy of the resource.
match This property is required. NetworkFirewallPolicyRuleMatchArgs
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. Structure is documented below.
priority
This property is required.
Changes to this property will trigger replacement.
int
An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
description str
An optional description for this resource.
disabled bool
Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.
enable_logging bool
Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules.
project Changes to this property will trigger replacement. str
rule_name str
An optional name for the rule. This field is not a unique identifier and can be updated.
security_profile_group str
A fully-qualified URL of a SecurityProfile resource instance. Example: https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group Must be specified if action = 'apply_security_profile_group' and cannot be specified for other actions.
target_secure_tags Sequence[NetworkFirewallPolicyRuleTargetSecureTagArgs]
A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the targetSecureTag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256.
target_service_accounts Sequence[str]
A list of service accounts indicating the sets of instances that are applied with this rule.
tls_inspect bool
Boolean flag indicating if the traffic should be TLS decrypted. Can be set only if action = 'apply_security_profile_group' and cannot be set for other actions.
action This property is required. String
The Action to perform when the client connection triggers the rule. Valid actions are "allow", "deny", "goto_next" and "apply_security_profile_group".
direction This property is required. String
The direction in which this rule applies. Possible values are: INGRESS, EGRESS.
firewallPolicy
This property is required.
Changes to this property will trigger replacement.
String
The firewall policy of the resource.
match This property is required. Property Map
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. Structure is documented below.
priority
This property is required.
Changes to this property will trigger replacement.
Number
An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
description String
An optional description for this resource.
disabled Boolean
Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.
enableLogging Boolean
Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules.
project Changes to this property will trigger replacement. String
ruleName String
An optional name for the rule. This field is not a unique identifier and can be updated.
securityProfileGroup String
A fully-qualified URL of a SecurityProfile resource instance. Example: https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group Must be specified if action = 'apply_security_profile_group' and cannot be specified for other actions.
targetSecureTags List<Property Map>
A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the targetSecureTag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256.
targetServiceAccounts List<String>
A list of service accounts indicating the sets of instances that are applied with this rule.
tlsInspect Boolean
Boolean flag indicating if the traffic should be TLS decrypted. Can be set only if action = 'apply_security_profile_group' and cannot be set for other actions.

Outputs

All input properties are implicitly available as output properties. Additionally, the NetworkFirewallPolicyRule resource produces the following output properties:

CreationTimestamp string
Creation timestamp in RFC3339 text format.
Id string
The provider-assigned unique ID for this managed resource.
Kind string
Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
RuleTupleCount int
Calculation of the complexity of a single firewall policy rule.
CreationTimestamp string
Creation timestamp in RFC3339 text format.
Id string
The provider-assigned unique ID for this managed resource.
Kind string
Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
RuleTupleCount int
Calculation of the complexity of a single firewall policy rule.
creationTimestamp String
Creation timestamp in RFC3339 text format.
id String
The provider-assigned unique ID for this managed resource.
kind String
Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
ruleTupleCount Integer
Calculation of the complexity of a single firewall policy rule.
creationTimestamp string
Creation timestamp in RFC3339 text format.
id string
The provider-assigned unique ID for this managed resource.
kind string
Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
ruleTupleCount number
Calculation of the complexity of a single firewall policy rule.
creation_timestamp str
Creation timestamp in RFC3339 text format.
id str
The provider-assigned unique ID for this managed resource.
kind str
Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
rule_tuple_count int
Calculation of the complexity of a single firewall policy rule.
creationTimestamp String
Creation timestamp in RFC3339 text format.
id String
The provider-assigned unique ID for this managed resource.
kind String
Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
ruleTupleCount Number
Calculation of the complexity of a single firewall policy rule.

Look up Existing NetworkFirewallPolicyRule Resource

Get an existing NetworkFirewallPolicyRule 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?: NetworkFirewallPolicyRuleState, opts?: CustomResourceOptions): NetworkFirewallPolicyRule
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        action: Optional[str] = None,
        creation_timestamp: Optional[str] = None,
        description: Optional[str] = None,
        direction: Optional[str] = None,
        disabled: Optional[bool] = None,
        enable_logging: Optional[bool] = None,
        firewall_policy: Optional[str] = None,
        kind: Optional[str] = None,
        match: Optional[NetworkFirewallPolicyRuleMatchArgs] = None,
        priority: Optional[int] = None,
        project: Optional[str] = None,
        rule_name: Optional[str] = None,
        rule_tuple_count: Optional[int] = None,
        security_profile_group: Optional[str] = None,
        target_secure_tags: Optional[Sequence[NetworkFirewallPolicyRuleTargetSecureTagArgs]] = None,
        target_service_accounts: Optional[Sequence[str]] = None,
        tls_inspect: Optional[bool] = None) -> NetworkFirewallPolicyRule
func GetNetworkFirewallPolicyRule(ctx *Context, name string, id IDInput, state *NetworkFirewallPolicyRuleState, opts ...ResourceOption) (*NetworkFirewallPolicyRule, error)
public static NetworkFirewallPolicyRule Get(string name, Input<string> id, NetworkFirewallPolicyRuleState? state, CustomResourceOptions? opts = null)
public static NetworkFirewallPolicyRule get(String name, Output<String> id, NetworkFirewallPolicyRuleState state, CustomResourceOptions options)
resources:  _:    type: gcp:compute:NetworkFirewallPolicyRule    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.
The following state arguments are supported:
Action string
The Action to perform when the client connection triggers the rule. Valid actions are "allow", "deny", "goto_next" and "apply_security_profile_group".
CreationTimestamp string
Creation timestamp in RFC3339 text format.
Description string
An optional description for this resource.
Direction string
The direction in which this rule applies. Possible values are: INGRESS, EGRESS.
Disabled bool
Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.
EnableLogging bool
Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules.
FirewallPolicy Changes to this property will trigger replacement. string
The firewall policy of the resource.
Kind string
Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
Match NetworkFirewallPolicyRuleMatch
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. Structure is documented below.
Priority Changes to this property will trigger replacement. int
An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
Project Changes to this property will trigger replacement. string
RuleName string
An optional name for the rule. This field is not a unique identifier and can be updated.
RuleTupleCount int
Calculation of the complexity of a single firewall policy rule.
SecurityProfileGroup string
A fully-qualified URL of a SecurityProfile resource instance. Example: https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group Must be specified if action = 'apply_security_profile_group' and cannot be specified for other actions.
TargetSecureTags List<NetworkFirewallPolicyRuleTargetSecureTag>
A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the targetSecureTag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256.
TargetServiceAccounts List<string>
A list of service accounts indicating the sets of instances that are applied with this rule.
TlsInspect bool
Boolean flag indicating if the traffic should be TLS decrypted. Can be set only if action = 'apply_security_profile_group' and cannot be set for other actions.
Action string
The Action to perform when the client connection triggers the rule. Valid actions are "allow", "deny", "goto_next" and "apply_security_profile_group".
CreationTimestamp string
Creation timestamp in RFC3339 text format.
Description string
An optional description for this resource.
Direction string
The direction in which this rule applies. Possible values are: INGRESS, EGRESS.
Disabled bool
Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.
EnableLogging bool
Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules.
FirewallPolicy Changes to this property will trigger replacement. string
The firewall policy of the resource.
Kind string
Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
Match NetworkFirewallPolicyRuleMatchArgs
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. Structure is documented below.
Priority Changes to this property will trigger replacement. int
An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
Project Changes to this property will trigger replacement. string
RuleName string
An optional name for the rule. This field is not a unique identifier and can be updated.
RuleTupleCount int
Calculation of the complexity of a single firewall policy rule.
SecurityProfileGroup string
A fully-qualified URL of a SecurityProfile resource instance. Example: https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group Must be specified if action = 'apply_security_profile_group' and cannot be specified for other actions.
TargetSecureTags []NetworkFirewallPolicyRuleTargetSecureTagArgs
A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the targetSecureTag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256.
TargetServiceAccounts []string
A list of service accounts indicating the sets of instances that are applied with this rule.
TlsInspect bool
Boolean flag indicating if the traffic should be TLS decrypted. Can be set only if action = 'apply_security_profile_group' and cannot be set for other actions.
action String
The Action to perform when the client connection triggers the rule. Valid actions are "allow", "deny", "goto_next" and "apply_security_profile_group".
creationTimestamp String
Creation timestamp in RFC3339 text format.
description String
An optional description for this resource.
direction String
The direction in which this rule applies. Possible values are: INGRESS, EGRESS.
disabled Boolean
Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.
enableLogging Boolean
Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules.
firewallPolicy Changes to this property will trigger replacement. String
The firewall policy of the resource.
kind String
Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
match NetworkFirewallPolicyRuleMatch
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. Structure is documented below.
priority Changes to this property will trigger replacement. Integer
An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
project Changes to this property will trigger replacement. String
ruleName String
An optional name for the rule. This field is not a unique identifier and can be updated.
ruleTupleCount Integer
Calculation of the complexity of a single firewall policy rule.
securityProfileGroup String
A fully-qualified URL of a SecurityProfile resource instance. Example: https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group Must be specified if action = 'apply_security_profile_group' and cannot be specified for other actions.
targetSecureTags List<NetworkFirewallPolicyRuleTargetSecureTag>
A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the targetSecureTag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256.
targetServiceAccounts List<String>
A list of service accounts indicating the sets of instances that are applied with this rule.
tlsInspect Boolean
Boolean flag indicating if the traffic should be TLS decrypted. Can be set only if action = 'apply_security_profile_group' and cannot be set for other actions.
action string
The Action to perform when the client connection triggers the rule. Valid actions are "allow", "deny", "goto_next" and "apply_security_profile_group".
creationTimestamp string
Creation timestamp in RFC3339 text format.
description string
An optional description for this resource.
direction string
The direction in which this rule applies. Possible values are: INGRESS, EGRESS.
disabled boolean
Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.
enableLogging boolean
Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules.
firewallPolicy Changes to this property will trigger replacement. string
The firewall policy of the resource.
kind string
Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
match NetworkFirewallPolicyRuleMatch
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. Structure is documented below.
priority Changes to this property will trigger replacement. number
An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
project Changes to this property will trigger replacement. string
ruleName string
An optional name for the rule. This field is not a unique identifier and can be updated.
ruleTupleCount number
Calculation of the complexity of a single firewall policy rule.
securityProfileGroup string
A fully-qualified URL of a SecurityProfile resource instance. Example: https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group Must be specified if action = 'apply_security_profile_group' and cannot be specified for other actions.
targetSecureTags NetworkFirewallPolicyRuleTargetSecureTag[]
A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the targetSecureTag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256.
targetServiceAccounts string[]
A list of service accounts indicating the sets of instances that are applied with this rule.
tlsInspect boolean
Boolean flag indicating if the traffic should be TLS decrypted. Can be set only if action = 'apply_security_profile_group' and cannot be set for other actions.
action str
The Action to perform when the client connection triggers the rule. Valid actions are "allow", "deny", "goto_next" and "apply_security_profile_group".
creation_timestamp str
Creation timestamp in RFC3339 text format.
description str
An optional description for this resource.
direction str
The direction in which this rule applies. Possible values are: INGRESS, EGRESS.
disabled bool
Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.
enable_logging bool
Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules.
firewall_policy Changes to this property will trigger replacement. str
The firewall policy of the resource.
kind str
Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
match NetworkFirewallPolicyRuleMatchArgs
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. Structure is documented below.
priority Changes to this property will trigger replacement. int
An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
project Changes to this property will trigger replacement. str
rule_name str
An optional name for the rule. This field is not a unique identifier and can be updated.
rule_tuple_count int
Calculation of the complexity of a single firewall policy rule.
security_profile_group str
A fully-qualified URL of a SecurityProfile resource instance. Example: https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group Must be specified if action = 'apply_security_profile_group' and cannot be specified for other actions.
target_secure_tags Sequence[NetworkFirewallPolicyRuleTargetSecureTagArgs]
A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the targetSecureTag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256.
target_service_accounts Sequence[str]
A list of service accounts indicating the sets of instances that are applied with this rule.
tls_inspect bool
Boolean flag indicating if the traffic should be TLS decrypted. Can be set only if action = 'apply_security_profile_group' and cannot be set for other actions.
action String
The Action to perform when the client connection triggers the rule. Valid actions are "allow", "deny", "goto_next" and "apply_security_profile_group".
creationTimestamp String
Creation timestamp in RFC3339 text format.
description String
An optional description for this resource.
direction String
The direction in which this rule applies. Possible values are: INGRESS, EGRESS.
disabled Boolean
Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled.
enableLogging Boolean
Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules.
firewallPolicy Changes to this property will trigger replacement. String
The firewall policy of the resource.
kind String
Type of the resource. Always compute#firewallPolicyRule for firewall policy rules
match Property Map
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. Structure is documented below.
priority Changes to this property will trigger replacement. Number
An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
project Changes to this property will trigger replacement. String
ruleName String
An optional name for the rule. This field is not a unique identifier and can be updated.
ruleTupleCount Number
Calculation of the complexity of a single firewall policy rule.
securityProfileGroup String
A fully-qualified URL of a SecurityProfile resource instance. Example: https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group Must be specified if action = 'apply_security_profile_group' and cannot be specified for other actions.
targetSecureTags List<Property Map>
A list of secure tags that controls which instances the firewall rule applies to. If targetSecureTag are specified, then the firewall rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the targetSecureTag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neither targetServiceAccounts nor targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256.
targetServiceAccounts List<String>
A list of service accounts indicating the sets of instances that are applied with this rule.
tlsInspect Boolean
Boolean flag indicating if the traffic should be TLS decrypted. Can be set only if action = 'apply_security_profile_group' and cannot be set for other actions.

Supporting Types

NetworkFirewallPolicyRuleMatch
, NetworkFirewallPolicyRuleMatchArgs

Layer4Configs This property is required. List<NetworkFirewallPolicyRuleMatchLayer4Config>
Pairs of IP protocols and ports that the rule should match. Structure is documented below.
DestAddressGroups List<string>
Address groups which should be matched against the traffic destination. Maximum number of destination address groups is 10.
DestFqdns List<string>
Fully Qualified Domain Name (FQDN) which should be matched against traffic destination. Maximum number of destination fqdn allowed is 100.
DestIpRanges List<string>
CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000.
DestNetworkScope string
Network scope of the traffic destination. Possible values are: INTERNET, INTRA_VPC, NON_INTERNET, VPC_NETWORKS.
DestRegionCodes List<string>
Region codes whose IP addresses will be used to match for destination of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of dest region codes allowed is 5000.
DestThreatIntelligences List<string>
Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic destination.
SrcAddressGroups List<string>
Address groups which should be matched against the traffic source. Maximum number of source address groups is 10.
SrcFqdns List<string>
Fully Qualified Domain Name (FQDN) which should be matched against traffic source. Maximum number of source fqdn allowed is 100.
SrcIpRanges List<string>
CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000.
SrcNetworkScope string
Network scope of the traffic source. Possible values are: INTERNET, INTRA_VPC, NON_INTERNET, VPC_NETWORKS.
SrcNetworks List<string>
Networks of the traffic source. It can be either a full or partial url.
SrcRegionCodes List<string>
Region codes whose IP addresses will be used to match for source of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of source region codes allowed is 5000.
SrcSecureTags List<NetworkFirewallPolicyRuleMatchSrcSecureTag>
List of secure tag values, which should be matched at the source of the traffic. For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256. Structure is documented below.
SrcThreatIntelligences List<string>

Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic source.

The layer4_configs block supports:

Layer4Configs This property is required. []NetworkFirewallPolicyRuleMatchLayer4Config
Pairs of IP protocols and ports that the rule should match. Structure is documented below.
DestAddressGroups []string
Address groups which should be matched against the traffic destination. Maximum number of destination address groups is 10.
DestFqdns []string
Fully Qualified Domain Name (FQDN) which should be matched against traffic destination. Maximum number of destination fqdn allowed is 100.
DestIpRanges []string
CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000.
DestNetworkScope string
Network scope of the traffic destination. Possible values are: INTERNET, INTRA_VPC, NON_INTERNET, VPC_NETWORKS.
DestRegionCodes []string
Region codes whose IP addresses will be used to match for destination of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of dest region codes allowed is 5000.
DestThreatIntelligences []string
Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic destination.
SrcAddressGroups []string
Address groups which should be matched against the traffic source. Maximum number of source address groups is 10.
SrcFqdns []string
Fully Qualified Domain Name (FQDN) which should be matched against traffic source. Maximum number of source fqdn allowed is 100.
SrcIpRanges []string
CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000.
SrcNetworkScope string
Network scope of the traffic source. Possible values are: INTERNET, INTRA_VPC, NON_INTERNET, VPC_NETWORKS.
SrcNetworks []string
Networks of the traffic source. It can be either a full or partial url.
SrcRegionCodes []string
Region codes whose IP addresses will be used to match for source of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of source region codes allowed is 5000.
SrcSecureTags []NetworkFirewallPolicyRuleMatchSrcSecureTag
List of secure tag values, which should be matched at the source of the traffic. For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256. Structure is documented below.
SrcThreatIntelligences []string

Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic source.

The layer4_configs block supports:

layer4Configs This property is required. List<NetworkFirewallPolicyRuleMatchLayer4Config>
Pairs of IP protocols and ports that the rule should match. Structure is documented below.
destAddressGroups List<String>
Address groups which should be matched against the traffic destination. Maximum number of destination address groups is 10.
destFqdns List<String>
Fully Qualified Domain Name (FQDN) which should be matched against traffic destination. Maximum number of destination fqdn allowed is 100.
destIpRanges List<String>
CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000.
destNetworkScope String
Network scope of the traffic destination. Possible values are: INTERNET, INTRA_VPC, NON_INTERNET, VPC_NETWORKS.
destRegionCodes List<String>
Region codes whose IP addresses will be used to match for destination of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of dest region codes allowed is 5000.
destThreatIntelligences List<String>
Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic destination.
srcAddressGroups List<String>
Address groups which should be matched against the traffic source. Maximum number of source address groups is 10.
srcFqdns List<String>
Fully Qualified Domain Name (FQDN) which should be matched against traffic source. Maximum number of source fqdn allowed is 100.
srcIpRanges List<String>
CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000.
srcNetworkScope String
Network scope of the traffic source. Possible values are: INTERNET, INTRA_VPC, NON_INTERNET, VPC_NETWORKS.
srcNetworks List<String>
Networks of the traffic source. It can be either a full or partial url.
srcRegionCodes List<String>
Region codes whose IP addresses will be used to match for source of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of source region codes allowed is 5000.
srcSecureTags List<NetworkFirewallPolicyRuleMatchSrcSecureTag>
List of secure tag values, which should be matched at the source of the traffic. For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256. Structure is documented below.
srcThreatIntelligences List<String>

Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic source.

The layer4_configs block supports:

layer4Configs This property is required. NetworkFirewallPolicyRuleMatchLayer4Config[]
Pairs of IP protocols and ports that the rule should match. Structure is documented below.
destAddressGroups string[]
Address groups which should be matched against the traffic destination. Maximum number of destination address groups is 10.
destFqdns string[]
Fully Qualified Domain Name (FQDN) which should be matched against traffic destination. Maximum number of destination fqdn allowed is 100.
destIpRanges string[]
CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000.
destNetworkScope string
Network scope of the traffic destination. Possible values are: INTERNET, INTRA_VPC, NON_INTERNET, VPC_NETWORKS.
destRegionCodes string[]
Region codes whose IP addresses will be used to match for destination of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of dest region codes allowed is 5000.
destThreatIntelligences string[]
Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic destination.
srcAddressGroups string[]
Address groups which should be matched against the traffic source. Maximum number of source address groups is 10.
srcFqdns string[]
Fully Qualified Domain Name (FQDN) which should be matched against traffic source. Maximum number of source fqdn allowed is 100.
srcIpRanges string[]
CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000.
srcNetworkScope string
Network scope of the traffic source. Possible values are: INTERNET, INTRA_VPC, NON_INTERNET, VPC_NETWORKS.
srcNetworks string[]
Networks of the traffic source. It can be either a full or partial url.
srcRegionCodes string[]
Region codes whose IP addresses will be used to match for source of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of source region codes allowed is 5000.
srcSecureTags NetworkFirewallPolicyRuleMatchSrcSecureTag[]
List of secure tag values, which should be matched at the source of the traffic. For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256. Structure is documented below.
srcThreatIntelligences string[]

Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic source.

The layer4_configs block supports:

layer4_configs This property is required. Sequence[NetworkFirewallPolicyRuleMatchLayer4Config]
Pairs of IP protocols and ports that the rule should match. Structure is documented below.
dest_address_groups Sequence[str]
Address groups which should be matched against the traffic destination. Maximum number of destination address groups is 10.
dest_fqdns Sequence[str]
Fully Qualified Domain Name (FQDN) which should be matched against traffic destination. Maximum number of destination fqdn allowed is 100.
dest_ip_ranges Sequence[str]
CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000.
dest_network_scope str
Network scope of the traffic destination. Possible values are: INTERNET, INTRA_VPC, NON_INTERNET, VPC_NETWORKS.
dest_region_codes Sequence[str]
Region codes whose IP addresses will be used to match for destination of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of dest region codes allowed is 5000.
dest_threat_intelligences Sequence[str]
Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic destination.
src_address_groups Sequence[str]
Address groups which should be matched against the traffic source. Maximum number of source address groups is 10.
src_fqdns Sequence[str]
Fully Qualified Domain Name (FQDN) which should be matched against traffic source. Maximum number of source fqdn allowed is 100.
src_ip_ranges Sequence[str]
CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000.
src_network_scope str
Network scope of the traffic source. Possible values are: INTERNET, INTRA_VPC, NON_INTERNET, VPC_NETWORKS.
src_networks Sequence[str]
Networks of the traffic source. It can be either a full or partial url.
src_region_codes Sequence[str]
Region codes whose IP addresses will be used to match for source of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of source region codes allowed is 5000.
src_secure_tags Sequence[NetworkFirewallPolicyRuleMatchSrcSecureTag]
List of secure tag values, which should be matched at the source of the traffic. For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256. Structure is documented below.
src_threat_intelligences Sequence[str]

Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic source.

The layer4_configs block supports:

layer4Configs This property is required. List<Property Map>
Pairs of IP protocols and ports that the rule should match. Structure is documented below.
destAddressGroups List<String>
Address groups which should be matched against the traffic destination. Maximum number of destination address groups is 10.
destFqdns List<String>
Fully Qualified Domain Name (FQDN) which should be matched against traffic destination. Maximum number of destination fqdn allowed is 100.
destIpRanges List<String>
CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000.
destNetworkScope String
Network scope of the traffic destination. Possible values are: INTERNET, INTRA_VPC, NON_INTERNET, VPC_NETWORKS.
destRegionCodes List<String>
Region codes whose IP addresses will be used to match for destination of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of dest region codes allowed is 5000.
destThreatIntelligences List<String>
Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic destination.
srcAddressGroups List<String>
Address groups which should be matched against the traffic source. Maximum number of source address groups is 10.
srcFqdns List<String>
Fully Qualified Domain Name (FQDN) which should be matched against traffic source. Maximum number of source fqdn allowed is 100.
srcIpRanges List<String>
CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000.
srcNetworkScope String
Network scope of the traffic source. Possible values are: INTERNET, INTRA_VPC, NON_INTERNET, VPC_NETWORKS.
srcNetworks List<String>
Networks of the traffic source. It can be either a full or partial url.
srcRegionCodes List<String>
Region codes whose IP addresses will be used to match for source of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of source region codes allowed is 5000.
srcSecureTags List<Property Map>
List of secure tag values, which should be matched at the source of the traffic. For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256. Structure is documented below.
srcThreatIntelligences List<String>

Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic source.

The layer4_configs block supports:

NetworkFirewallPolicyRuleMatchLayer4Config
, NetworkFirewallPolicyRuleMatchLayer4ConfigArgs

IpProtocol This property is required. string
The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
Ports List<string>
An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
IpProtocol This property is required. string
The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
Ports []string
An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
ipProtocol This property is required. String
The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
ports List<String>
An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
ipProtocol This property is required. string
The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
ports string[]
An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
ip_protocol This property is required. str
The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
ports Sequence[str]
An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
ipProtocol This property is required. String
The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
ports List<String>
An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"].

NetworkFirewallPolicyRuleMatchSrcSecureTag
, NetworkFirewallPolicyRuleMatchSrcSecureTagArgs

Name string
Name of the secure tag, created with TagManager's TagValue API.
State string
(Output) State of the secure tag, either EFFECTIVE or INEFFECTIVE. A secure tag is INEFFECTIVE when it is deleted or its network is deleted.


Name string
Name of the secure tag, created with TagManager's TagValue API.
State string
(Output) State of the secure tag, either EFFECTIVE or INEFFECTIVE. A secure tag is INEFFECTIVE when it is deleted or its network is deleted.


name String
Name of the secure tag, created with TagManager's TagValue API.
state String
(Output) State of the secure tag, either EFFECTIVE or INEFFECTIVE. A secure tag is INEFFECTIVE when it is deleted or its network is deleted.


name string
Name of the secure tag, created with TagManager's TagValue API.
state string
(Output) State of the secure tag, either EFFECTIVE or INEFFECTIVE. A secure tag is INEFFECTIVE when it is deleted or its network is deleted.


name str
Name of the secure tag, created with TagManager's TagValue API.
state str
(Output) State of the secure tag, either EFFECTIVE or INEFFECTIVE. A secure tag is INEFFECTIVE when it is deleted or its network is deleted.


name String
Name of the secure tag, created with TagManager's TagValue API.
state String
(Output) State of the secure tag, either EFFECTIVE or INEFFECTIVE. A secure tag is INEFFECTIVE when it is deleted or its network is deleted.


NetworkFirewallPolicyRuleTargetSecureTag
, NetworkFirewallPolicyRuleTargetSecureTagArgs

Name string
Name of the secure tag, created with TagManager's TagValue API.
State string
(Output) State of the secure tag, either EFFECTIVE or INEFFECTIVE. A secure tag is INEFFECTIVE when it is deleted or its network is deleted.
Name string
Name of the secure tag, created with TagManager's TagValue API.
State string
(Output) State of the secure tag, either EFFECTIVE or INEFFECTIVE. A secure tag is INEFFECTIVE when it is deleted or its network is deleted.
name String
Name of the secure tag, created with TagManager's TagValue API.
state String
(Output) State of the secure tag, either EFFECTIVE or INEFFECTIVE. A secure tag is INEFFECTIVE when it is deleted or its network is deleted.
name string
Name of the secure tag, created with TagManager's TagValue API.
state string
(Output) State of the secure tag, either EFFECTIVE or INEFFECTIVE. A secure tag is INEFFECTIVE when it is deleted or its network is deleted.
name str
Name of the secure tag, created with TagManager's TagValue API.
state str
(Output) State of the secure tag, either EFFECTIVE or INEFFECTIVE. A secure tag is INEFFECTIVE when it is deleted or its network is deleted.
name String
Name of the secure tag, created with TagManager's TagValue API.
state String
(Output) State of the secure tag, either EFFECTIVE or INEFFECTIVE. A secure tag is INEFFECTIVE when it is deleted or its network is deleted.

Import

NetworkFirewallPolicyRule can be imported using any of these accepted formats:

  • projects/{{project}}/global/firewallPolicies/{{firewall_policy}}/rules/{{priority}}

  • {{project}}/{{firewall_policy}}/{{priority}}

  • {{firewall_policy}}/{{priority}}

When using the pulumi import command, NetworkFirewallPolicyRule can be imported using one of the formats above. For example:

$ pulumi import gcp:compute/networkFirewallPolicyRule:NetworkFirewallPolicyRule default projects/{{project}}/global/firewallPolicies/{{firewall_policy}}/rules/{{priority}}
Copy
$ pulumi import gcp:compute/networkFirewallPolicyRule:NetworkFirewallPolicyRule default {{project}}/{{firewall_policy}}/{{priority}}
Copy
$ pulumi import gcp:compute/networkFirewallPolicyRule:NetworkFirewallPolicyRule default {{firewall_policy}}/{{priority}}
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.