1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. RegionNetworkFirewallPolicy
Google Cloud Classic v7.27.0 published on Thursday, Jun 13, 2024 by Pulumi

gcp.compute.RegionNetworkFirewallPolicy

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.27.0 published on Thursday, Jun 13, 2024 by Pulumi

    The Compute NetworkFirewallPolicy resource

    Example Usage

    Region Network Firewall Policy Full

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const policy = new gcp.compute.RegionNetworkFirewallPolicy("policy", {
        name: "tf-test-policy",
        description: "Terraform test",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    policy = gcp.compute.RegionNetworkFirewallPolicy("policy",
        name="tf-test-policy",
        description="Terraform test")
    
    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, "policy", &compute.RegionNetworkFirewallPolicyArgs{
    			Name:        pulumi.String("tf-test-policy"),
    			Description: pulumi.String("Terraform 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.RegionNetworkFirewallPolicy("policy", new()
        {
            Name = "tf-test-policy",
            Description = "Terraform test",
        });
    
    });
    
    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 policy = new RegionNetworkFirewallPolicy("policy", RegionNetworkFirewallPolicyArgs.builder()
                .name("tf-test-policy")
                .description("Terraform test")
                .build());
    
        }
    }
    
    resources:
      policy:
        type: gcp:compute:RegionNetworkFirewallPolicy
        properties:
          name: tf-test-policy
          description: Terraform test
    

    Create RegionNetworkFirewallPolicy Resource

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

    Constructor syntax

    new RegionNetworkFirewallPolicy(name: string, args?: RegionNetworkFirewallPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def RegionNetworkFirewallPolicy(resource_name: str,
                                    args: Optional[RegionNetworkFirewallPolicyArgs] = None,
                                    opts: Optional[ResourceOptions] = None)
    
    @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)
    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.
    
    

    Parameters

    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.

    Example

    The following reference example uses placeholder values for all input properties.

    var regionNetworkFirewallPolicyResource = new Gcp.Compute.RegionNetworkFirewallPolicy("regionNetworkFirewallPolicyResource", new()
    {
        Description = "string",
        Name = "string",
        Project = "string",
        Region = "string",
    });
    
    example, err := compute.NewRegionNetworkFirewallPolicy(ctx, "regionNetworkFirewallPolicyResource", &compute.RegionNetworkFirewallPolicyArgs{
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Project:     pulumi.String("string"),
    	Region:      pulumi.String("string"),
    })
    
    var regionNetworkFirewallPolicyResource = new RegionNetworkFirewallPolicy("regionNetworkFirewallPolicyResource", RegionNetworkFirewallPolicyArgs.builder()
        .description("string")
        .name("string")
        .project("string")
        .region("string")
        .build());
    
    region_network_firewall_policy_resource = gcp.compute.RegionNetworkFirewallPolicy("regionNetworkFirewallPolicyResource",
        description="string",
        name="string",
        project="string",
        region="string")
    
    const regionNetworkFirewallPolicyResource = new gcp.compute.RegionNetworkFirewallPolicy("regionNetworkFirewallPolicyResource", {
        description: "string",
        name: "string",
        project: "string",
        region: "string",
    });
    
    type: gcp:compute:RegionNetworkFirewallPolicy
    properties:
        description: string
        name: string
        project: string
        region: string
    

    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 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.
    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 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.
    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 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.
    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 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.
    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 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.
    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 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 RegionNetworkFirewallPolicy resource produces the following output properties:

    CreationTimestamp 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.
    RegionNetworkFirewallPolicyId string
    The unique identifier for the resource. This identifier is defined by the server.
    RuleTupleCount int
    Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
    SelfLink string
    Server-defined URL for the resource.
    SelfLinkWithId string
    Server-defined URL for this resource with the resource id.
    CreationTimestamp 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.
    RegionNetworkFirewallPolicyId string
    The unique identifier for the resource. This identifier is defined by the server.
    RuleTupleCount int
    Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
    SelfLink string
    Server-defined URL for the resource.
    SelfLinkWithId string
    Server-defined URL for this resource with the resource id.
    creationTimestamp 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.
    regionNetworkFirewallPolicyId String
    The unique identifier for the resource. This identifier is defined by the server.
    ruleTupleCount Integer
    Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
    selfLink String
    Server-defined URL for the resource.
    selfLinkWithId String
    Server-defined URL for this resource with the resource id.
    creationTimestamp 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.
    regionNetworkFirewallPolicyId string
    The unique identifier for the resource. This identifier is defined by the server.
    ruleTupleCount number
    Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
    selfLink string
    Server-defined URL for the resource.
    selfLinkWithId string
    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_firewall_policy_id str
    The unique identifier for the resource. This identifier is defined by the server.
    rule_tuple_count int
    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_with_id str
    Server-defined URL for this resource with the resource id.
    creationTimestamp 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.
    regionNetworkFirewallPolicyId String
    The unique identifier for the resource. This identifier is defined by the server.
    ruleTupleCount Number
    Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
    selfLink String
    Server-defined URL for the resource.
    selfLinkWithId String
    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.
    The following state arguments are supported:
    CreationTimestamp 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 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.
    RegionNetworkFirewallPolicyId string
    The unique identifier for the resource. This identifier is defined by the server.
    RuleTupleCount int
    Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
    SelfLink string
    Server-defined URL for the resource.
    SelfLinkWithId string
    Server-defined URL for this resource with the resource id.
    CreationTimestamp 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 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.
    RegionNetworkFirewallPolicyId string
    The unique identifier for the resource. This identifier is defined by the server.
    RuleTupleCount int
    Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
    SelfLink string
    Server-defined URL for the resource.
    SelfLinkWithId string
    Server-defined URL for this resource with the resource id.
    creationTimestamp 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 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.
    regionNetworkFirewallPolicyId String
    The unique identifier for the resource. This identifier is defined by the server.
    ruleTupleCount Integer
    Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
    selfLink String
    Server-defined URL for the resource.
    selfLinkWithId String
    Server-defined URL for this resource with the resource id.
    creationTimestamp 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 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.
    regionNetworkFirewallPolicyId string
    The unique identifier for the resource. This identifier is defined by the server.
    ruleTupleCount number
    Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
    selfLink string
    Server-defined URL for the resource.
    selfLinkWithId string
    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 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_firewall_policy_id str
    The unique identifier for the resource. This identifier is defined by the server.
    rule_tuple_count int
    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_with_id str
    Server-defined URL for this resource with the resource id.
    creationTimestamp 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 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.
    regionNetworkFirewallPolicyId String
    The unique identifier for the resource. This identifier is defined by the server.
    ruleTupleCount Number
    Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
    selfLink String
    Server-defined URL for the resource.
    selfLinkWithId String
    Server-defined URL for this resource with the resource id.

    Import

    RegionNetworkFirewallPolicy can be imported using any of these accepted formats:

    • projects/{{project}}/regions/{{region}}/firewallPolicies/{{name}}

    • {{project}}/{{region}}/{{name}}

    • {{region}}/{{name}}

    • {{name}}

    When using the pulumi import command, RegionNetworkFirewallPolicy 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}}
    

    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.
    gcp logo
    Google Cloud Classic v7.27.0 published on Thursday, Jun 13, 2024 by Pulumi