gcp.compute.RegionNetworkFirewallPolicy
Explore with Pulumi AI
The Compute NetworkFirewallPolicy resource
Example Usage
Regional
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var primary = new Gcp.Compute.RegionNetworkFirewallPolicy("primary", new()
{
Description = "Sample regional network firewall policy",
Project = "my-project-name",
Region = "us-west1",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewRegionNetworkFirewallPolicy(ctx, "primary", &compute.RegionNetworkFirewallPolicyArgs{
Description: pulumi.String("Sample regional network firewall policy"),
Project: pulumi.String("my-project-name"),
Region: pulumi.String("us-west1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.RegionNetworkFirewallPolicy;
import com.pulumi.gcp.compute.RegionNetworkFirewallPolicyArgs;
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 primary = new RegionNetworkFirewallPolicy("primary", RegionNetworkFirewallPolicyArgs.builder()
.description("Sample regional network firewall policy")
.project("my-project-name")
.region("us-west1")
.build());
}
}
import pulumi
import pulumi_gcp as gcp
primary = gcp.compute.RegionNetworkFirewallPolicy("primary",
description="Sample regional network firewall policy",
project="my-project-name",
region="us-west1")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const primary = new gcp.compute.RegionNetworkFirewallPolicy("primary", {
description: "Sample regional network firewall policy",
project: "my-project-name",
region: "us-west1",
});
resources:
primary:
type: gcp:compute:RegionNetworkFirewallPolicy
properties:
description: Sample regional network firewall policy
project: my-project-name
region: us-west1
Create RegionNetworkFirewallPolicy Resource
new RegionNetworkFirewallPolicy(name: string, args?: RegionNetworkFirewallPolicyArgs, opts?: CustomResourceOptions);
@overload
def RegionNetworkFirewallPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
region: Optional[str] = None)
@overload
def RegionNetworkFirewallPolicy(resource_name: str,
args: Optional[RegionNetworkFirewallPolicyArgs] = None,
opts: Optional[ResourceOptions] = None)
func NewRegionNetworkFirewallPolicy(ctx *Context, name string, args *RegionNetworkFirewallPolicyArgs, opts ...ResourceOption) (*RegionNetworkFirewallPolicy, error)
public RegionNetworkFirewallPolicy(string name, RegionNetworkFirewallPolicyArgs? args = null, CustomResourceOptions? opts = null)
public RegionNetworkFirewallPolicy(String name, RegionNetworkFirewallPolicyArgs args)
public RegionNetworkFirewallPolicy(String name, RegionNetworkFirewallPolicyArgs args, CustomResourceOptions options)
type: gcp:compute:RegionNetworkFirewallPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RegionNetworkFirewallPolicyArgs
- 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 RegionNetworkFirewallPolicyArgs
- 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 RegionNetworkFirewallPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RegionNetworkFirewallPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RegionNetworkFirewallPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
RegionNetworkFirewallPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The RegionNetworkFirewallPolicy resource accepts the following input properties:
- Description string
An optional description of this resource. Provide this property when you create the resource.
- Name string
User-provided name of the Network firewall policy. The name should be unique in the project in which the firewall 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 project for the resource
- Region string
The location of this resource.
- Description string
An optional description of this resource. Provide this property when you create the resource.
- Name string
User-provided name of the Network firewall policy. The name should be unique in the project in which the firewall 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 project for the resource
- Region string
The location of this resource.
- description String
An optional description of this resource. Provide this property when you create the resource.
- name String
User-provided name of the Network firewall policy. The name should be unique in the project in which the firewall 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 project for the resource
- region String
The location of this resource.
- description string
An optional description of this resource. Provide this property when you create the resource.
- name string
User-provided name of the Network firewall policy. The name should be unique in the project in which the firewall 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 project for the resource
- region string
The location of this resource.
- description str
An optional description of this resource. Provide this property when you create the resource.
- name str
User-provided name of the Network firewall policy. The name should be unique in the project in which the firewall 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 project for the resource
- region str
The location of this resource.
- description String
An optional description of this resource. Provide this property when you create the resource.
- name String
User-provided name of the Network firewall policy. The name should be unique in the project in which the firewall 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 project for the resource
- region String
The location of this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the RegionNetworkFirewallPolicy resource produces the following output properties:
- Creation
Timestamp string Creation timestamp in RFC3339 text format.
- Fingerprint string
Fingerprint of the resource. This field is used internally during updates of this resource.
- Id string
The provider-assigned unique ID for this managed resource.
- Region
Network stringFirewall Policy 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.
- Creation
Timestamp string Creation timestamp in RFC3339 text format.
- Fingerprint string
Fingerprint of the resource. This field is used internally during updates of this resource.
- Id string
The provider-assigned unique ID for this managed resource.
- Region
Network stringFirewall Policy 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.
- creation
Timestamp String Creation timestamp in RFC3339 text format.
- fingerprint String
Fingerprint of the resource. This field is used internally during updates of this resource.
- id String
The provider-assigned unique ID for this managed resource.
- region
Network StringFirewall Policy 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.
- creation
Timestamp string Creation timestamp in RFC3339 text format.
- fingerprint string
Fingerprint of the resource. This field is used internally during updates of this resource.
- id string
The provider-assigned unique ID for this managed resource.
- region
Network stringFirewall Policy 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.
- creation_
timestamp str Creation timestamp in RFC3339 text format.
- fingerprint str
Fingerprint of the resource. This field is used internally during updates of this resource.
- id str
The provider-assigned unique ID for this managed resource.
- region_
network_ strfirewall_ policy_ 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.
- creation
Timestamp String Creation timestamp in RFC3339 text format.
- fingerprint String
Fingerprint of the resource. This field is used internally during updates of this resource.
- id String
The provider-assigned unique ID for this managed resource.
- region
Network StringFirewall Policy 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 RegionNetworkFirewallPolicy Resource
Get an existing RegionNetworkFirewallPolicy 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?: RegionNetworkFirewallPolicyState, opts?: CustomResourceOptions): RegionNetworkFirewallPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
creation_timestamp: Optional[str] = None,
description: Optional[str] = None,
fingerprint: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
region: Optional[str] = None,
region_network_firewall_policy_id: Optional[str] = None,
rule_tuple_count: Optional[int] = None,
self_link: Optional[str] = None,
self_link_with_id: Optional[str] = None) -> RegionNetworkFirewallPolicy
func GetRegionNetworkFirewallPolicy(ctx *Context, name string, id IDInput, state *RegionNetworkFirewallPolicyState, opts ...ResourceOption) (*RegionNetworkFirewallPolicy, error)
public static RegionNetworkFirewallPolicy Get(string name, Input<string> id, RegionNetworkFirewallPolicyState? state, CustomResourceOptions? opts = null)
public static RegionNetworkFirewallPolicy get(String name, Output<String> id, RegionNetworkFirewallPolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Creation
Timestamp string Creation timestamp in RFC3339 text format.
- Description string
An optional description of this resource. Provide this property when you create the resource.
- Fingerprint string
Fingerprint of the resource. This field is used internally during updates of this resource.
- Name string
User-provided name of the Network firewall policy. The name should be unique in the project in which the firewall 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 project for the resource
- Region string
The location of this resource.
- Region
Network stringFirewall Policy 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.
- Creation
Timestamp string Creation timestamp in RFC3339 text format.
- Description string
An optional description of this resource. Provide this property when you create the resource.
- Fingerprint string
Fingerprint of the resource. This field is used internally during updates of this resource.
- Name string
User-provided name of the Network firewall policy. The name should be unique in the project in which the firewall 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 project for the resource
- Region string
The location of this resource.
- Region
Network stringFirewall Policy 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.
- creation
Timestamp String Creation timestamp in RFC3339 text format.
- description String
An optional description of this resource. Provide this property when you create the resource.
- fingerprint String
Fingerprint of the resource. This field is used internally during updates of this resource.
- name String
User-provided name of the Network firewall policy. The name should be unique in the project in which the firewall 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 project for the resource
- region String
The location of this resource.
- region
Network StringFirewall Policy 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.
- creation
Timestamp string Creation timestamp in RFC3339 text format.
- description string
An optional description of this resource. Provide this property when you create the resource.
- fingerprint string
Fingerprint of the resource. This field is used internally during updates of this resource.
- name string
User-provided name of the Network firewall policy. The name should be unique in the project in which the firewall 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 project for the resource
- region string
The location of this resource.
- region
Network stringFirewall Policy 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.
- creation_
timestamp str Creation timestamp in RFC3339 text format.
- description str
An optional description of this resource. Provide this property when you create the resource.
- fingerprint str
Fingerprint of the resource. This field is used internally during updates of this resource.
- name str
User-provided name of the Network firewall policy. The name should be unique in the project in which the firewall 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 project for the resource
- region str
The location of this resource.
- region_
network_ strfirewall_ policy_ 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.
- creation
Timestamp String Creation timestamp in RFC3339 text format.
- description String
An optional description of this resource. Provide this property when you create the resource.
- fingerprint String
Fingerprint of the resource. This field is used internally during updates of this resource.
- name String
User-provided name of the Network firewall policy. The name should be unique in the project in which the firewall 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 project for the resource
- region String
The location of this resource.
- region
Network StringFirewall Policy 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.
Import
NetworkFirewallPolicy can be imported using any of these accepted formats* projects/{{project}}/regions/{{region}}/firewallPolicies/{{name}}
* {{project}}/{{region}}/{{name}}
* {{region}}/{{name}}
* {{name}}
In Terraform v1.5.0 and later, use an import
block to import NetworkFirewallPolicy using one of the formats above. For exampletf import {
id = “projects/{{project}}/regions/{{region}}/firewallPolicies/{{name}}”
to = google_compute_region_network_firewall_policy.default }
$ pulumi import gcp:compute/regionNetworkFirewallPolicy:RegionNetworkFirewallPolicy When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), NetworkFirewallPolicy can be imported using one of the formats above. For example
$ pulumi import gcp:compute/regionNetworkFirewallPolicy:RegionNetworkFirewallPolicy default projects/{{project}}/regions/{{region}}/firewallPolicies/{{name}}
$ pulumi import gcp:compute/regionNetworkFirewallPolicy:RegionNetworkFirewallPolicy default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:compute/regionNetworkFirewallPolicy:RegionNetworkFirewallPolicy default {{region}}/{{name}}
$ pulumi import gcp:compute/regionNetworkFirewallPolicy:RegionNetworkFirewallPolicy default {{name}}
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.