Snowflake v0.50.2 published on Friday, Mar 8, 2024 by Pulumi
snowflake.NetworkPolicy
Explore with Pulumi AI
Import
$ pulumi import snowflake:index/networkPolicy:NetworkPolicy example policyname
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Snowflake = Pulumi.Snowflake;
return await Deployment.RunAsync(() =>
{
var policy = new Snowflake.NetworkPolicy("policy", new()
{
AllowedIpLists = new[]
{
"192.168.0.100/24",
},
BlockedIpLists = new[]
{
"192.168.0.101",
},
Comment = "A policy.",
});
});
package main
import (
"github.com/pulumi/pulumi-snowflake/sdk/go/snowflake"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := snowflake.NewNetworkPolicy(ctx, "policy", &snowflake.NetworkPolicyArgs{
AllowedIpLists: pulumi.StringArray{
pulumi.String("192.168.0.100/24"),
},
BlockedIpLists: pulumi.StringArray{
pulumi.String("192.168.0.101"),
},
Comment: pulumi.String("A policy."),
})
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.snowflake.NetworkPolicy;
import com.pulumi.snowflake.NetworkPolicyArgs;
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 NetworkPolicy("policy", NetworkPolicyArgs.builder()
.allowedIpLists("192.168.0.100/24")
.blockedIpLists("192.168.0.101")
.comment("A policy.")
.build());
}
}
import pulumi
import pulumi_snowflake as snowflake
policy = snowflake.NetworkPolicy("policy",
allowed_ip_lists=["192.168.0.100/24"],
blocked_ip_lists=["192.168.0.101"],
comment="A policy.")
import * as pulumi from "@pulumi/pulumi";
import * as snowflake from "@pulumi/snowflake";
const policy = new snowflake.NetworkPolicy("policy", {
allowedIpLists: ["192.168.0.100/24"],
blockedIpLists: ["192.168.0.101"],
comment: "A policy.",
});
resources:
policy:
type: snowflake:NetworkPolicy
properties:
allowedIpLists:
- 192.168.0.100/24
blockedIpLists:
- 192.168.0.101
comment: A policy.
Create NetworkPolicy Resource
new NetworkPolicy(name: string, args: NetworkPolicyArgs, opts?: CustomResourceOptions);
@overload
def NetworkPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
allowed_ip_lists: Optional[Sequence[str]] = None,
blocked_ip_lists: Optional[Sequence[str]] = None,
comment: Optional[str] = None,
name: Optional[str] = None)
@overload
def NetworkPolicy(resource_name: str,
args: NetworkPolicyArgs,
opts: Optional[ResourceOptions] = None)
func NewNetworkPolicy(ctx *Context, name string, args NetworkPolicyArgs, opts ...ResourceOption) (*NetworkPolicy, error)
public NetworkPolicy(string name, NetworkPolicyArgs args, CustomResourceOptions? opts = null)
public NetworkPolicy(String name, NetworkPolicyArgs args)
public NetworkPolicy(String name, NetworkPolicyArgs args, CustomResourceOptions options)
type: snowflake:NetworkPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkPolicyArgs
- 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 NetworkPolicyArgs
- 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 NetworkPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
NetworkPolicy 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 NetworkPolicy resource accepts the following input properties:
- Allowed
Ip List<string>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account
- Blocked
Ip List<string>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account\n\n\n\nDo not add
0.0.0.0/0
toblocked_ip_list
- Comment string
- Specifies a comment for the network policy.
- Name string
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created.
- Allowed
Ip []stringLists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account
- Blocked
Ip []stringLists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account\n\n\n\nDo not add
0.0.0.0/0
toblocked_ip_list
- Comment string
- Specifies a comment for the network policy.
- Name string
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created.
- allowed
Ip List<String>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account
- blocked
Ip List<String>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account\n\n\n\nDo not add
0.0.0.0/0
toblocked_ip_list
- comment String
- Specifies a comment for the network policy.
- name String
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created.
- allowed
Ip string[]Lists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account
- blocked
Ip string[]Lists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account\n\n\n\nDo not add
0.0.0.0/0
toblocked_ip_list
- comment string
- Specifies a comment for the network policy.
- name string
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created.
- allowed_
ip_ Sequence[str]lists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account
- blocked_
ip_ Sequence[str]lists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account\n\n\n\nDo not add
0.0.0.0/0
toblocked_ip_list
- comment str
- Specifies a comment for the network policy.
- name str
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created.
- allowed
Ip List<String>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account
- blocked
Ip List<String>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account\n\n\n\nDo not add
0.0.0.0/0
toblocked_ip_list
- comment String
- Specifies a comment for the network policy.
- name String
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkPolicy resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing NetworkPolicy Resource
Get an existing NetworkPolicy 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?: NetworkPolicyState, opts?: CustomResourceOptions): NetworkPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allowed_ip_lists: Optional[Sequence[str]] = None,
blocked_ip_lists: Optional[Sequence[str]] = None,
comment: Optional[str] = None,
name: Optional[str] = None) -> NetworkPolicy
func GetNetworkPolicy(ctx *Context, name string, id IDInput, state *NetworkPolicyState, opts ...ResourceOption) (*NetworkPolicy, error)
public static NetworkPolicy Get(string name, Input<string> id, NetworkPolicyState? state, CustomResourceOptions? opts = null)
public static NetworkPolicy get(String name, Output<String> id, NetworkPolicyState 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.
- Allowed
Ip List<string>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account
- Blocked
Ip List<string>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account\n\n\n\nDo not add
0.0.0.0/0
toblocked_ip_list
- Comment string
- Specifies a comment for the network policy.
- Name string
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created.
- Allowed
Ip []stringLists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account
- Blocked
Ip []stringLists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account\n\n\n\nDo not add
0.0.0.0/0
toblocked_ip_list
- Comment string
- Specifies a comment for the network policy.
- Name string
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created.
- allowed
Ip List<String>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account
- blocked
Ip List<String>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account\n\n\n\nDo not add
0.0.0.0/0
toblocked_ip_list
- comment String
- Specifies a comment for the network policy.
- name String
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created.
- allowed
Ip string[]Lists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account
- blocked
Ip string[]Lists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account\n\n\n\nDo not add
0.0.0.0/0
toblocked_ip_list
- comment string
- Specifies a comment for the network policy.
- name string
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created.
- allowed_
ip_ Sequence[str]lists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account
- blocked_
ip_ Sequence[str]lists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account\n\n\n\nDo not add
0.0.0.0/0
toblocked_ip_list
- comment str
- Specifies a comment for the network policy.
- name str
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created.
- allowed
Ip List<String>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are allowed access to your Snowflake account
- blocked
Ip List<String>Lists - Specifies one or more IPv4 addresses (CIDR notation) that are denied access to your Snowflake account\n\n\n\nDo not add
0.0.0.0/0
toblocked_ip_list
- comment String
- Specifies a comment for the network policy.
- name String
- Specifies the identifier for the network policy; must be unique for the account in which the network policy is created.
Package Details
- Repository
- Snowflake pulumi/pulumi-snowflake
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
snowflake
Terraform Provider.