gcp.compute.NetworkFirewallPolicy
Explore with Pulumi AI
The Compute NetworkFirewallPolicy resource
Example Usage
Global
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var primary = new Gcp.Compute.NetworkFirewallPolicy("primary", new()
{
Description = "Sample global network firewall policy",
Project = "my-project-name",
});
});
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.NewNetworkFirewallPolicy(ctx, "primary", &compute.NetworkFirewallPolicyArgs{
Description: pulumi.String("Sample global network firewall policy"),
Project: pulumi.String("my-project-name"),
})
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.NetworkFirewallPolicy;
import com.pulumi.gcp.compute.NetworkFirewallPolicyArgs;
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 NetworkFirewallPolicy("primary", NetworkFirewallPolicyArgs.builder()
.description("Sample global network firewall policy")
.project("my-project-name")
.build());
}
}
import pulumi
import pulumi_gcp as gcp
primary = gcp.compute.NetworkFirewallPolicy("primary",
description="Sample global network firewall policy",
project="my-project-name")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const primary = new gcp.compute.NetworkFirewallPolicy("primary", {
description: "Sample global network firewall policy",
project: "my-project-name",
});
resources:
primary:
type: gcp:compute:NetworkFirewallPolicy
properties:
description: Sample global network firewall policy
project: my-project-name
Create NetworkFirewallPolicy Resource
new NetworkFirewallPolicy(name: string, args?: NetworkFirewallPolicyArgs, opts?: CustomResourceOptions);
@overload
def NetworkFirewallPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None)
@overload
def NetworkFirewallPolicy(resource_name: str,
args: Optional[NetworkFirewallPolicyArgs] = None,
opts: Optional[ResourceOptions] = None)
func NewNetworkFirewallPolicy(ctx *Context, name string, args *NetworkFirewallPolicyArgs, opts ...ResourceOption) (*NetworkFirewallPolicy, error)
public NetworkFirewallPolicy(string name, NetworkFirewallPolicyArgs? args = null, CustomResourceOptions? opts = null)
public NetworkFirewallPolicy(String name, NetworkFirewallPolicyArgs args)
public NetworkFirewallPolicy(String name, NetworkFirewallPolicyArgs args, CustomResourceOptions options)
type: gcp:compute:NetworkFirewallPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkFirewallPolicyArgs
- 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 NetworkFirewallPolicyArgs
- 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 NetworkFirewallPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkFirewallPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkFirewallPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
NetworkFirewallPolicy 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 NetworkFirewallPolicy 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
- 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
- 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
- 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
- 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
- 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
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkFirewallPolicy 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.
- Network
Firewall 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.
- 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.
- Network
Firewall 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.
- 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.
- network
Firewall 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.
- 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.
- network
Firewall 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.
- 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.
- network_
firewall_ 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.
- 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.
- network
Firewall 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 NetworkFirewallPolicy Resource
Get an existing NetworkFirewallPolicy 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?: NetworkFirewallPolicyState, opts?: CustomResourceOptions): NetworkFirewallPolicy
@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,
network_firewall_policy_id: Optional[str] = None,
project: Optional[str] = None,
rule_tuple_count: Optional[int] = None,
self_link: Optional[str] = None,
self_link_with_id: Optional[str] = None) -> NetworkFirewallPolicy
func GetNetworkFirewallPolicy(ctx *Context, name string, id IDInput, state *NetworkFirewallPolicyState, opts ...ResourceOption) (*NetworkFirewallPolicy, error)
public static NetworkFirewallPolicy Get(string name, Input<string> id, NetworkFirewallPolicyState? state, CustomResourceOptions? opts = null)
public static NetworkFirewallPolicy get(String name, Output<String> id, NetworkFirewallPolicyState 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.
- Network
Firewall stringPolicy Id The unique identifier for the resource. This identifier is defined by the server.
- Project string
The project for the resource
- 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.
- Network
Firewall stringPolicy Id The unique identifier for the resource. This identifier is defined by the server.
- Project string
The project for the resource
- 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.
- network
Firewall StringPolicy Id The unique identifier for the resource. This identifier is defined by the server.
- project String
The project for the resource
- 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.
- network
Firewall stringPolicy Id The unique identifier for the resource. This identifier is defined by the server.
- project string
The project for the resource
- 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.
- network_
firewall_ strpolicy_ id The unique identifier for the resource. This identifier is defined by the server.
- project str
The project for the resource
- 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.
- network
Firewall StringPolicy Id The unique identifier for the resource. This identifier is defined by the server.
- project String
The project for the resource
- 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}}/global/firewallPolicies/{{name}}
* {{project}}/{{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}}/global/firewallPolicies/{{name}}”
to = google_compute_network_firewall_policy.default }
$ pulumi import gcp:compute/networkFirewallPolicy:NetworkFirewallPolicy 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/networkFirewallPolicy:NetworkFirewallPolicy default projects/{{project}}/global/firewallPolicies/{{name}}
$ pulumi import gcp:compute/networkFirewallPolicy:NetworkFirewallPolicy default {{project}}/{{name}}
$ pulumi import gcp:compute/networkFirewallPolicy:NetworkFirewallPolicy 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.