1. Packages
  2. Snowflake Provider
  3. API Docs
  4. NetworkRule
Viewing docs for Snowflake v2.13.0
published on Thursday, Feb 26, 2026 by Pulumi
snowflake logo
Viewing docs for Snowflake v2.13.0
published on Thursday, Feb 26, 2026 by Pulumi

    !> Note A network rule cannot be dropped successfully if it is currently assigned to a network policy. Currently, the provider does not unassign such objects automatically. Before dropping the resource, first unassign the network rule from the relevant objects. See guide for more details.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as snowflake from "@pulumi/snowflake";
    
    const rule = new snowflake.NetworkRule("rule", {
        name: "rule",
        database: "EXAMPLE_DB",
        schema: "EXAMPLE_SCHEMA",
        comment: "A rule.",
        type: "IPV4",
        mode: "INGRESS",
        valueLists: [
            "192.168.0.100/24",
            "29.254.123.20",
        ],
    });
    
    import pulumi
    import pulumi_snowflake as snowflake
    
    rule = snowflake.NetworkRule("rule",
        name="rule",
        database="EXAMPLE_DB",
        schema="EXAMPLE_SCHEMA",
        comment="A rule.",
        type="IPV4",
        mode="INGRESS",
        value_lists=[
            "192.168.0.100/24",
            "29.254.123.20",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-snowflake/sdk/v2/go/snowflake"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := snowflake.NewNetworkRule(ctx, "rule", &snowflake.NetworkRuleArgs{
    			Name:     pulumi.String("rule"),
    			Database: pulumi.String("EXAMPLE_DB"),
    			Schema:   pulumi.String("EXAMPLE_SCHEMA"),
    			Comment:  pulumi.String("A rule."),
    			Type:     pulumi.String("IPV4"),
    			Mode:     pulumi.String("INGRESS"),
    			ValueLists: pulumi.StringArray{
    				pulumi.String("192.168.0.100/24"),
    				pulumi.String("29.254.123.20"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Snowflake = Pulumi.Snowflake;
    
    return await Deployment.RunAsync(() => 
    {
        var rule = new Snowflake.NetworkRule("rule", new()
        {
            Name = "rule",
            Database = "EXAMPLE_DB",
            Schema = "EXAMPLE_SCHEMA",
            Comment = "A rule.",
            Type = "IPV4",
            Mode = "INGRESS",
            ValueLists = new[]
            {
                "192.168.0.100/24",
                "29.254.123.20",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.snowflake.NetworkRule;
    import com.pulumi.snowflake.NetworkRuleArgs;
    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 rule = new NetworkRule("rule", NetworkRuleArgs.builder()
                .name("rule")
                .database("EXAMPLE_DB")
                .schema("EXAMPLE_SCHEMA")
                .comment("A rule.")
                .type("IPV4")
                .mode("INGRESS")
                .valueLists(            
                    "192.168.0.100/24",
                    "29.254.123.20")
                .build());
    
        }
    }
    
    resources:
      rule:
        type: snowflake:NetworkRule
        properties:
          name: rule
          database: EXAMPLE_DB
          schema: EXAMPLE_SCHEMA
          comment: A rule.
          type: IPV4
          mode: INGRESS
          valueLists:
            - 192.168.0.100/24
            - 29.254.123.20
    

    Note Instead of using fully_qualified_name, you can reference objects managed outside Terraform by constructing a correct ID, consult identifiers guide.

    Note If a field has a default value, it is shown next to the type in the schema.

    Create NetworkRule Resource

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

    Constructor syntax

    new NetworkRule(name: string, args: NetworkRuleArgs, opts?: CustomResourceOptions);
    @overload
    def NetworkRule(resource_name: str,
                    args: NetworkRuleArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def NetworkRule(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    database: Optional[str] = None,
                    mode: Optional[str] = None,
                    schema: Optional[str] = None,
                    type: Optional[str] = None,
                    value_lists: Optional[Sequence[str]] = None,
                    comment: Optional[str] = None,
                    name: Optional[str] = None)
    func NewNetworkRule(ctx *Context, name string, args NetworkRuleArgs, opts ...ResourceOption) (*NetworkRule, error)
    public NetworkRule(string name, NetworkRuleArgs args, CustomResourceOptions? opts = null)
    public NetworkRule(String name, NetworkRuleArgs args)
    public NetworkRule(String name, NetworkRuleArgs args, CustomResourceOptions options)
    
    type: snowflake:NetworkRule
    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 NetworkRuleArgs
    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 NetworkRuleArgs
    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 NetworkRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkRuleArgs
    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 networkRuleResource = new Snowflake.NetworkRule("networkRuleResource", new()
    {
        Database = "string",
        Mode = "string",
        Schema = "string",
        Type = "string",
        ValueLists = new[]
        {
            "string",
        },
        Comment = "string",
        Name = "string",
    });
    
    example, err := snowflake.NewNetworkRule(ctx, "networkRuleResource", &snowflake.NetworkRuleArgs{
    	Database: pulumi.String("string"),
    	Mode:     pulumi.String("string"),
    	Schema:   pulumi.String("string"),
    	Type:     pulumi.String("string"),
    	ValueLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Comment: pulumi.String("string"),
    	Name:    pulumi.String("string"),
    })
    
    var networkRuleResource = new NetworkRule("networkRuleResource", NetworkRuleArgs.builder()
        .database("string")
        .mode("string")
        .schema("string")
        .type("string")
        .valueLists("string")
        .comment("string")
        .name("string")
        .build());
    
    network_rule_resource = snowflake.NetworkRule("networkRuleResource",
        database="string",
        mode="string",
        schema="string",
        type="string",
        value_lists=["string"],
        comment="string",
        name="string")
    
    const networkRuleResource = new snowflake.NetworkRule("networkRuleResource", {
        database: "string",
        mode: "string",
        schema: "string",
        type: "string",
        valueLists: ["string"],
        comment: "string",
        name: "string",
    });
    
    type: snowflake:NetworkRule
    properties:
        comment: string
        database: string
        mode: string
        name: string
        schema: string
        type: string
        valueLists:
            - string
    

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

    Database string
    The database in which to create the network rule.
    Mode string
    Specifies what is restricted by the network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): INGRESS | INTERNAL_STAGE | EGRESS | POSTGRES_INGRESS | POSTGRES_EGRESS.
    Schema string
    The schema in which to create the network rule.
    Type string
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): IPV4 | AWSVPCEID | AZURELINKID | GCPPSCID | HOST_PORT | PRIVATE_HOST_PORT.
    ValueLists List<string>
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    Comment string
    Specifies a comment for the network rule.
    Name string
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    Database string
    The database in which to create the network rule.
    Mode string
    Specifies what is restricted by the network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): INGRESS | INTERNAL_STAGE | EGRESS | POSTGRES_INGRESS | POSTGRES_EGRESS.
    Schema string
    The schema in which to create the network rule.
    Type string
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): IPV4 | AWSVPCEID | AZURELINKID | GCPPSCID | HOST_PORT | PRIVATE_HOST_PORT.
    ValueLists []string
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    Comment string
    Specifies a comment for the network rule.
    Name string
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    database String
    The database in which to create the network rule.
    mode String
    Specifies what is restricted by the network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): INGRESS | INTERNAL_STAGE | EGRESS | POSTGRES_INGRESS | POSTGRES_EGRESS.
    schema String
    The schema in which to create the network rule.
    type String
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): IPV4 | AWSVPCEID | AZURELINKID | GCPPSCID | HOST_PORT | PRIVATE_HOST_PORT.
    valueLists List<String>
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    comment String
    Specifies a comment for the network rule.
    name String
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    database string
    The database in which to create the network rule.
    mode string
    Specifies what is restricted by the network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): INGRESS | INTERNAL_STAGE | EGRESS | POSTGRES_INGRESS | POSTGRES_EGRESS.
    schema string
    The schema in which to create the network rule.
    type string
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): IPV4 | AWSVPCEID | AZURELINKID | GCPPSCID | HOST_PORT | PRIVATE_HOST_PORT.
    valueLists string[]
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    comment string
    Specifies a comment for the network rule.
    name string
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    database str
    The database in which to create the network rule.
    mode str
    Specifies what is restricted by the network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): INGRESS | INTERNAL_STAGE | EGRESS | POSTGRES_INGRESS | POSTGRES_EGRESS.
    schema str
    The schema in which to create the network rule.
    type str
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): IPV4 | AWSVPCEID | AZURELINKID | GCPPSCID | HOST_PORT | PRIVATE_HOST_PORT.
    value_lists Sequence[str]
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    comment str
    Specifies a comment for the network rule.
    name str
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    database String
    The database in which to create the network rule.
    mode String
    Specifies what is restricted by the network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): INGRESS | INTERNAL_STAGE | EGRESS | POSTGRES_INGRESS | POSTGRES_EGRESS.
    schema String
    The schema in which to create the network rule.
    type String
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): IPV4 | AWSVPCEID | AZURELINKID | GCPPSCID | HOST_PORT | PRIVATE_HOST_PORT.
    valueLists List<String>
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    comment String
    Specifies a comment for the network rule.
    name String
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.

    Outputs

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

    DescribeOutputs List<NetworkRuleDescribeOutput>
    Outputs the result of DESCRIBE NETWORK RULE for the given network rule.
    FullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    Id string
    The provider-assigned unique ID for this managed resource.
    ShowOutputs List<NetworkRuleShowOutput>
    Outputs the result of SHOW NETWORK RULES for the given network rule.
    DescribeOutputs []NetworkRuleDescribeOutput
    Outputs the result of DESCRIBE NETWORK RULE for the given network rule.
    FullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    Id string
    The provider-assigned unique ID for this managed resource.
    ShowOutputs []NetworkRuleShowOutput
    Outputs the result of SHOW NETWORK RULES for the given network rule.
    describeOutputs List<NetworkRuleDescribeOutput>
    Outputs the result of DESCRIBE NETWORK RULE for the given network rule.
    fullyQualifiedName String
    Fully qualified name of the resource. For more information, see object name resolution.
    id String
    The provider-assigned unique ID for this managed resource.
    showOutputs List<NetworkRuleShowOutput>
    Outputs the result of SHOW NETWORK RULES for the given network rule.
    describeOutputs NetworkRuleDescribeOutput[]
    Outputs the result of DESCRIBE NETWORK RULE for the given network rule.
    fullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    id string
    The provider-assigned unique ID for this managed resource.
    showOutputs NetworkRuleShowOutput[]
    Outputs the result of SHOW NETWORK RULES for the given network rule.
    describe_outputs Sequence[NetworkRuleDescribeOutput]
    Outputs the result of DESCRIBE NETWORK RULE for the given network rule.
    fully_qualified_name str
    Fully qualified name of the resource. For more information, see object name resolution.
    id str
    The provider-assigned unique ID for this managed resource.
    show_outputs Sequence[NetworkRuleShowOutput]
    Outputs the result of SHOW NETWORK RULES for the given network rule.
    describeOutputs List<Property Map>
    Outputs the result of DESCRIBE NETWORK RULE for the given network rule.
    fullyQualifiedName String
    Fully qualified name of the resource. For more information, see object name resolution.
    id String
    The provider-assigned unique ID for this managed resource.
    showOutputs List<Property Map>
    Outputs the result of SHOW NETWORK RULES for the given network rule.

    Look up Existing NetworkRule Resource

    Get an existing NetworkRule 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?: NetworkRuleState, opts?: CustomResourceOptions): NetworkRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            comment: Optional[str] = None,
            database: Optional[str] = None,
            describe_outputs: Optional[Sequence[NetworkRuleDescribeOutputArgs]] = None,
            fully_qualified_name: Optional[str] = None,
            mode: Optional[str] = None,
            name: Optional[str] = None,
            schema: Optional[str] = None,
            show_outputs: Optional[Sequence[NetworkRuleShowOutputArgs]] = None,
            type: Optional[str] = None,
            value_lists: Optional[Sequence[str]] = None) -> NetworkRule
    func GetNetworkRule(ctx *Context, name string, id IDInput, state *NetworkRuleState, opts ...ResourceOption) (*NetworkRule, error)
    public static NetworkRule Get(string name, Input<string> id, NetworkRuleState? state, CustomResourceOptions? opts = null)
    public static NetworkRule get(String name, Output<String> id, NetworkRuleState state, CustomResourceOptions options)
    resources:  _:    type: snowflake:NetworkRule    get:      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.
    The following state arguments are supported:
    Comment string
    Specifies a comment for the network rule.
    Database string
    The database in which to create the network rule.
    DescribeOutputs List<NetworkRuleDescribeOutput>
    Outputs the result of DESCRIBE NETWORK RULE for the given network rule.
    FullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    Mode string
    Specifies what is restricted by the network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): INGRESS | INTERNAL_STAGE | EGRESS | POSTGRES_INGRESS | POSTGRES_EGRESS.
    Name string
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    Schema string
    The schema in which to create the network rule.
    ShowOutputs List<NetworkRuleShowOutput>
    Outputs the result of SHOW NETWORK RULES for the given network rule.
    Type string
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): IPV4 | AWSVPCEID | AZURELINKID | GCPPSCID | HOST_PORT | PRIVATE_HOST_PORT.
    ValueLists List<string>
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    Comment string
    Specifies a comment for the network rule.
    Database string
    The database in which to create the network rule.
    DescribeOutputs []NetworkRuleDescribeOutputArgs
    Outputs the result of DESCRIBE NETWORK RULE for the given network rule.
    FullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    Mode string
    Specifies what is restricted by the network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): INGRESS | INTERNAL_STAGE | EGRESS | POSTGRES_INGRESS | POSTGRES_EGRESS.
    Name string
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    Schema string
    The schema in which to create the network rule.
    ShowOutputs []NetworkRuleShowOutputArgs
    Outputs the result of SHOW NETWORK RULES for the given network rule.
    Type string
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): IPV4 | AWSVPCEID | AZURELINKID | GCPPSCID | HOST_PORT | PRIVATE_HOST_PORT.
    ValueLists []string
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    comment String
    Specifies a comment for the network rule.
    database String
    The database in which to create the network rule.
    describeOutputs List<NetworkRuleDescribeOutput>
    Outputs the result of DESCRIBE NETWORK RULE for the given network rule.
    fullyQualifiedName String
    Fully qualified name of the resource. For more information, see object name resolution.
    mode String
    Specifies what is restricted by the network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): INGRESS | INTERNAL_STAGE | EGRESS | POSTGRES_INGRESS | POSTGRES_EGRESS.
    name String
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    schema String
    The schema in which to create the network rule.
    showOutputs List<NetworkRuleShowOutput>
    Outputs the result of SHOW NETWORK RULES for the given network rule.
    type String
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): IPV4 | AWSVPCEID | AZURELINKID | GCPPSCID | HOST_PORT | PRIVATE_HOST_PORT.
    valueLists List<String>
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    comment string
    Specifies a comment for the network rule.
    database string
    The database in which to create the network rule.
    describeOutputs NetworkRuleDescribeOutput[]
    Outputs the result of DESCRIBE NETWORK RULE for the given network rule.
    fullyQualifiedName string
    Fully qualified name of the resource. For more information, see object name resolution.
    mode string
    Specifies what is restricted by the network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): INGRESS | INTERNAL_STAGE | EGRESS | POSTGRES_INGRESS | POSTGRES_EGRESS.
    name string
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    schema string
    The schema in which to create the network rule.
    showOutputs NetworkRuleShowOutput[]
    Outputs the result of SHOW NETWORK RULES for the given network rule.
    type string
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): IPV4 | AWSVPCEID | AZURELINKID | GCPPSCID | HOST_PORT | PRIVATE_HOST_PORT.
    valueLists string[]
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    comment str
    Specifies a comment for the network rule.
    database str
    The database in which to create the network rule.
    describe_outputs Sequence[NetworkRuleDescribeOutputArgs]
    Outputs the result of DESCRIBE NETWORK RULE for the given network rule.
    fully_qualified_name str
    Fully qualified name of the resource. For more information, see object name resolution.
    mode str
    Specifies what is restricted by the network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): INGRESS | INTERNAL_STAGE | EGRESS | POSTGRES_INGRESS | POSTGRES_EGRESS.
    name str
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    schema str
    The schema in which to create the network rule.
    show_outputs Sequence[NetworkRuleShowOutputArgs]
    Outputs the result of SHOW NETWORK RULES for the given network rule.
    type str
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): IPV4 | AWSVPCEID | AZURELINKID | GCPPSCID | HOST_PORT | PRIVATE_HOST_PORT.
    value_lists Sequence[str]
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.
    comment String
    Specifies a comment for the network rule.
    database String
    The database in which to create the network rule.
    describeOutputs List<Property Map>
    Outputs the result of DESCRIBE NETWORK RULE for the given network rule.
    fullyQualifiedName String
    Fully qualified name of the resource. For more information, see object name resolution.
    mode String
    Specifies what is restricted by the network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): INGRESS | INTERNAL_STAGE | EGRESS | POSTGRES_INGRESS | POSTGRES_EGRESS.
    name String
    Specifies the identifier for the network rule; must be unique for the database and schema in which the network rule is created.
    schema String
    The schema in which to create the network rule.
    showOutputs List<Property Map>
    Outputs the result of SHOW NETWORK RULES for the given network rule.
    type String
    Specifies the type of network identifiers being allowed or blocked. A network rule can have only one type. Allowed values are determined by the mode of the network rule; see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details. Valid values are (case-insensitive): IPV4 | AWSVPCEID | AZURELINKID | GCPPSCID | HOST_PORT | PRIVATE_HOST_PORT.
    valueLists List<String>
    Specifies the network identifiers that will be allowed or blocked. Valid values in the list are determined by the type of network rule, see https://docs.snowflake.com/en/sql-reference/sql/create-network-rule#required-parameters for details.

    Supporting Types

    NetworkRuleDescribeOutput, NetworkRuleDescribeOutputArgs

    Comment string
    CreatedOn string
    DatabaseName string
    Mode string
    Name string
    Owner string
    SchemaName string
    Type string
    ValueLists List<string>
    Comment string
    CreatedOn string
    DatabaseName string
    Mode string
    Name string
    Owner string
    SchemaName string
    Type string
    ValueLists []string
    comment String
    createdOn String
    databaseName String
    mode String
    name String
    owner String
    schemaName String
    type String
    valueLists List<String>
    comment string
    createdOn string
    databaseName string
    mode string
    name string
    owner string
    schemaName string
    type string
    valueLists string[]
    comment str
    created_on str
    database_name str
    mode str
    name str
    owner str
    schema_name str
    type str
    value_lists Sequence[str]
    comment String
    createdOn String
    databaseName String
    mode String
    name String
    owner String
    schemaName String
    type String
    valueLists List<String>

    NetworkRuleShowOutput, NetworkRuleShowOutputArgs

    Comment string
    CreatedOn string
    DatabaseName string
    EntriesInValueList int
    Mode string
    Name string
    Owner string
    OwnerRoleType string
    SchemaName string
    Type string
    Comment string
    CreatedOn string
    DatabaseName string
    EntriesInValueList int
    Mode string
    Name string
    Owner string
    OwnerRoleType string
    SchemaName string
    Type string
    comment String
    createdOn String
    databaseName String
    entriesInValueList Integer
    mode String
    name String
    owner String
    ownerRoleType String
    schemaName String
    type String
    comment string
    createdOn string
    databaseName string
    entriesInValueList number
    mode string
    name string
    owner string
    ownerRoleType string
    schemaName string
    type string
    comment String
    createdOn String
    databaseName String
    entriesInValueList Number
    mode String
    name String
    owner String
    ownerRoleType String
    schemaName String
    type String

    Import

    $ pulumi import snowflake:index/networkRule:NetworkRule example '"<database_name>"."<schema_name>"."<network_rule_name>"'
    

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

    Package Details

    Repository
    Snowflake pulumi/pulumi-snowflake
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the snowflake Terraform Provider.
    snowflake logo
    Viewing docs for Snowflake v2.13.0
    published on Thursday, Feb 26, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.