published on Wednesday, Jul 29, 2026 by Pulumi
published on Wednesday, Jul 29, 2026 by Pulumi
The Compute NetworkFirewallPolicy resource
Warning: This resource is in beta, and should be used with the terraform-provider-google-beta provider. See Provider Versions for more details on beta resources.
Example Usage
Region Network Policy Full
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const policy = new gcp.compute.RegionNetworkPolicy("policy", {
name: "region-np-full",
description: "Terraform network policy create test",
});
import pulumi
import pulumi_gcp as gcp
policy = gcp.compute.RegionNetworkPolicy("policy",
name="region-np-full",
description="Terraform network policy create test")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewRegionNetworkPolicy(ctx, "policy", &compute.RegionNetworkPolicyArgs{
Name: pulumi.String("region-np-full"),
Description: pulumi.String("Terraform network policy create test"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var policy = new Gcp.Compute.RegionNetworkPolicy("policy", new()
{
Name = "region-np-full",
Description = "Terraform network policy create test",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.RegionNetworkPolicy;
import com.pulumi.gcp.compute.RegionNetworkPolicyArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 policy = new RegionNetworkPolicy("policy", RegionNetworkPolicyArgs.builder()
.name("region-np-full")
.description("Terraform network policy create test")
.build());
}
}
resources:
policy:
type: gcp:compute:RegionNetworkPolicy
properties:
name: region-np-full
description: Terraform network policy create test
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_compute_regionnetworkpolicy" "policy" {
name = "region-np-full"
description = "Terraform network policy create test"
}
Create RegionNetworkPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RegionNetworkPolicy(name: string, args?: RegionNetworkPolicyArgs, opts?: CustomResourceOptions);@overload
def RegionNetworkPolicy(resource_name: str,
args: Optional[RegionNetworkPolicyArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def RegionNetworkPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
deletion_policy: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
region: Optional[str] = None)func NewRegionNetworkPolicy(ctx *Context, name string, args *RegionNetworkPolicyArgs, opts ...ResourceOption) (*RegionNetworkPolicy, error)public RegionNetworkPolicy(string name, RegionNetworkPolicyArgs? args = null, CustomResourceOptions? opts = null)
public RegionNetworkPolicy(String name, RegionNetworkPolicyArgs args)
public RegionNetworkPolicy(String name, RegionNetworkPolicyArgs args, CustomResourceOptions options)
type: gcp:compute:RegionNetworkPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "gcp_compute_region_network_policy" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args RegionNetworkPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RegionNetworkPolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RegionNetworkPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RegionNetworkPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RegionNetworkPolicyArgs
- 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 regionNetworkPolicyResource = new Gcp.Compute.RegionNetworkPolicy("regionNetworkPolicyResource", new()
{
DeletionPolicy = "string",
Description = "string",
Name = "string",
Project = "string",
Region = "string",
});
example, err := compute.NewRegionNetworkPolicy(ctx, "regionNetworkPolicyResource", &compute.RegionNetworkPolicyArgs{
DeletionPolicy: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
Project: pulumi.String("string"),
Region: pulumi.String("string"),
})
resource "gcp_compute_region_network_policy" "regionNetworkPolicyResource" {
lifecycle {
create_before_destroy = true
}
deletion_policy = "string"
description = "string"
name = "string"
project = "string"
region = "string"
}
var regionNetworkPolicyResource = new RegionNetworkPolicy("regionNetworkPolicyResource", RegionNetworkPolicyArgs.builder()
.deletionPolicy("string")
.description("string")
.name("string")
.project("string")
.region("string")
.build());
region_network_policy_resource = gcp.compute.RegionNetworkPolicy("regionNetworkPolicyResource",
deletion_policy="string",
description="string",
name="string",
project="string",
region="string")
const regionNetworkPolicyResource = new gcp.compute.RegionNetworkPolicy("regionNetworkPolicyResource", {
deletionPolicy: "string",
description: "string",
name: "string",
project: "string",
region: "string",
});
type: gcp:compute:RegionNetworkPolicy
properties:
deletionPolicy: string
description: string
name: string
project: string
region: string
RegionNetworkPolicy 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 RegionNetworkPolicy resource accepts the following input properties:
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Name string
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
- The region of this resource.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Name string
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
- The region of this resource.
- deletion_
policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- description string
- An optional description of this resource. Provide this property when you create the resource.
- name string
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region string
- The region of this resource.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- name String
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region String
- The region of this resource.
- deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- description string
- An optional description of this resource. Provide this property when you create the resource.
- name string
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region string
- The region of this resource.
- deletion_
policy str - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- description str
- An optional description of this resource. Provide this property when you create the resource.
- name str
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region str
- The region of this resource.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- name String
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region String
- The region of this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the RegionNetworkPolicy resource produces the following output properties:
- Associations
List<Region
Network Policy Association> - [Output Only] A list of associations that belong to this network policy. Structure is documented below.
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Id string
- The provider-assigned unique ID for this managed resource.
- Region
Network stringPolicy Id - The unique identifier for the resource. This identifier is defined by the server.
- Rule
Tuple intCount - Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
- Self
Link string - Server-defined URL for the resource.
- Self
Link stringWith Id - Server-defined URL for this resource with the resource id.
- Associations
[]Region
Network Policy Association - [Output Only] A list of associations that belong to this network policy. Structure is documented below.
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Id string
- The provider-assigned unique ID for this managed resource.
- Region
Network stringPolicy Id - The unique identifier for the resource. This identifier is defined by the server.
- Rule
Tuple intCount - Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
- Self
Link string - Server-defined URL for the resource.
- Self
Link stringWith Id - Server-defined URL for this resource with the resource id.
- associations list(object)
- [Output Only] A list of associations that belong to this network policy. Structure is documented below.
- creation_
timestamp string - Creation timestamp in RFC3339 text format.
- id string
- The provider-assigned unique ID for this managed resource.
- region_
network_ stringpolicy_ id - The unique identifier for the resource. This identifier is defined by the server.
- rule_
tuple_ numbercount - Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
- self_
link string - Server-defined URL for the resource.
- self_
link_ stringwith_ id - Server-defined URL for this resource with the resource id.
- associations
List<Region
Network Policy Association> - [Output Only] A list of associations that belong to this network policy. Structure is documented below.
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- id String
- The provider-assigned unique ID for this managed resource.
- region
Network StringPolicy Id - The unique identifier for the resource. This identifier is defined by the server.
- rule
Tuple IntegerCount - Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
- self
Link String - Server-defined URL for the resource.
- self
Link StringWith Id - Server-defined URL for this resource with the resource id.
- associations
Region
Network Policy Association[] - [Output Only] A list of associations that belong to this network policy. Structure is documented below.
- creation
Timestamp string - Creation timestamp in RFC3339 text format.
- id string
- The provider-assigned unique ID for this managed resource.
- region
Network stringPolicy Id - The unique identifier for the resource. This identifier is defined by the server.
- rule
Tuple numberCount - Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
- self
Link string - Server-defined URL for the resource.
- self
Link stringWith Id - Server-defined URL for this resource with the resource id.
- associations
Sequence[Region
Network Policy Association] - [Output Only] A list of associations that belong to this network policy. Structure is documented below.
- creation_
timestamp str - Creation timestamp in RFC3339 text format.
- id str
- The provider-assigned unique ID for this managed resource.
- region_
network_ strpolicy_ id - The unique identifier for the resource. This identifier is defined by the server.
- rule_
tuple_ intcount - Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
- self_
link str - Server-defined URL for the resource.
- self_
link_ strwith_ id - Server-defined URL for this resource with the resource id.
- associations List<Property Map>
- [Output Only] A list of associations that belong to this network policy. Structure is documented below.
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- id String
- The provider-assigned unique ID for this managed resource.
- region
Network StringPolicy Id - The unique identifier for the resource. This identifier is defined by the server.
- rule
Tuple NumberCount - Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
- self
Link String - Server-defined URL for the resource.
- self
Link StringWith Id - Server-defined URL for this resource with the resource id.
Look up Existing RegionNetworkPolicy Resource
Get an existing RegionNetworkPolicy 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?: RegionNetworkPolicyState, opts?: CustomResourceOptions): RegionNetworkPolicy@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
associations: Optional[Sequence[RegionNetworkPolicyAssociationArgs]] = None,
creation_timestamp: Optional[str] = None,
deletion_policy: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
region: Optional[str] = None,
region_network_policy_id: Optional[str] = None,
rule_tuple_count: Optional[int] = None,
self_link: Optional[str] = None,
self_link_with_id: Optional[str] = None) -> RegionNetworkPolicyfunc GetRegionNetworkPolicy(ctx *Context, name string, id IDInput, state *RegionNetworkPolicyState, opts ...ResourceOption) (*RegionNetworkPolicy, error)public static RegionNetworkPolicy Get(string name, Input<string> id, RegionNetworkPolicyState? state, CustomResourceOptions? opts = null)public static RegionNetworkPolicy get(String name, Output<String> id, RegionNetworkPolicyState state, CustomResourceOptions options)resources: _: type: gcp:compute:RegionNetworkPolicy get: id: ${id}import {
to = gcp_compute_region_network_policy.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Associations
List<Region
Network Policy Association> - [Output Only] A list of associations that belong to this network policy. Structure is documented below.
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Name string
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
- The region of this resource.
- Region
Network stringPolicy Id - The unique identifier for the resource. This identifier is defined by the server.
- Rule
Tuple intCount - Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
- Self
Link string - Server-defined URL for the resource.
- Self
Link stringWith Id - Server-defined URL for this resource with the resource id.
- Associations
[]Region
Network Policy Association Args - [Output Only] A list of associations that belong to this network policy. Structure is documented below.
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Name string
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
- The region of this resource.
- Region
Network stringPolicy Id - The unique identifier for the resource. This identifier is defined by the server.
- Rule
Tuple intCount - Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
- Self
Link string - Server-defined URL for the resource.
- Self
Link stringWith Id - Server-defined URL for this resource with the resource id.
- associations list(object)
- [Output Only] A list of associations that belong to this network policy. Structure is documented below.
- creation_
timestamp string - Creation timestamp in RFC3339 text format.
- deletion_
policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- description string
- An optional description of this resource. Provide this property when you create the resource.
- name string
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region string
- The region of this resource.
- region_
network_ stringpolicy_ id - The unique identifier for the resource. This identifier is defined by the server.
- rule_
tuple_ numbercount - Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
- self_
link string - Server-defined URL for the resource.
- self_
link_ stringwith_ id - Server-defined URL for this resource with the resource id.
- associations
List<Region
Network Policy Association> - [Output Only] A list of associations that belong to this network policy. Structure is documented below.
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- name String
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region String
- The region of this resource.
- region
Network StringPolicy Id - The unique identifier for the resource. This identifier is defined by the server.
- rule
Tuple IntegerCount - Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
- self
Link String - Server-defined URL for the resource.
- self
Link StringWith Id - Server-defined URL for this resource with the resource id.
- associations
Region
Network Policy Association[] - [Output Only] A list of associations that belong to this network policy. Structure is documented below.
- creation
Timestamp string - Creation timestamp in RFC3339 text format.
- deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- description string
- An optional description of this resource. Provide this property when you create the resource.
- name string
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region string
- The region of this resource.
- region
Network stringPolicy Id - The unique identifier for the resource. This identifier is defined by the server.
- rule
Tuple numberCount - Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
- self
Link string - Server-defined URL for the resource.
- self
Link stringWith Id - Server-defined URL for this resource with the resource id.
- associations
Sequence[Region
Network Policy Association Args] - [Output Only] A list of associations that belong to this network policy. Structure is documented below.
- creation_
timestamp str - Creation timestamp in RFC3339 text format.
- deletion_
policy str - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- description str
- An optional description of this resource. Provide this property when you create the resource.
- name str
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region str
- The region of this resource.
- region_
network_ strpolicy_ id - The unique identifier for the resource. This identifier is defined by the server.
- rule_
tuple_ intcount - Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
- self_
link str - Server-defined URL for the resource.
- self_
link_ strwith_ id - Server-defined URL for this resource with the resource id.
- associations List<Property Map>
- [Output Only] A list of associations that belong to this network policy. Structure is documented below.
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- name String
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region String
- The region of this resource.
- region
Network StringPolicy Id - The unique identifier for the resource. This identifier is defined by the server.
- rule
Tuple NumberCount - Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
- self
Link String - Server-defined URL for the resource.
- self
Link StringWith Id - Server-defined URL for this resource with the resource id.
Supporting Types
RegionNetworkPolicyAssociation, RegionNetworkPolicyAssociationArgs
- Attachment
Target string - The target that the network policy is attached to.
- Name string
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- Attachment
Target string - The target that the network policy is attached to.
- Name string
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- attachment_
target string - The target that the network policy is attached to.
- name string
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- attachment
Target String - The target that the network policy is attached to.
- name String
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- attachment
Target string - The target that the network policy is attached to.
- name string
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- attachment_
target str - The target that the network policy is attached to.
- name str
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- attachment
Target String - The target that the network policy is attached to.
- name String
- User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Import
RegionNetworkPolicy can be imported using any of these accepted formats:
projects/{{project}}/regions/{{region}}/networkPolicies/{{name}}{{project}}/{{region}}/{{name}}{{region}}/{{name}}{{name}}
When using the pulumi import command, RegionNetworkPolicy can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/regionNetworkPolicy:RegionNetworkPolicy default projects/{{project}}/regions/{{region}}/networkPolicies/{{name}}
$ pulumi import gcp:compute/regionNetworkPolicy:RegionNetworkPolicy default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:compute/regionNetworkPolicy:RegionNetworkPolicy default {{region}}/{{name}}
$ pulumi import gcp:compute/regionNetworkPolicy:RegionNetworkPolicy default {{name}}
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-betaTerraform Provider.
published on Wednesday, Jul 29, 2026 by Pulumi