aws logo
AWS Classic v5.29.0, Feb 1 23

aws.wafv2.IpSet

Provides a WAFv2 IP Set Resource

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.WafV2.IpSet("example", new()
    {
        Addresses = new[]
        {
            "1.2.3.4/32",
            "5.6.7.8/32",
        },
        Description = "Example IP set",
        IpAddressVersion = "IPV4",
        Scope = "REGIONAL",
        Tags = 
        {
            { "Tag1", "Value1" },
            { "Tag2", "Value2" },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/wafv2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := wafv2.NewIpSet(ctx, "example", &wafv2.IpSetArgs{
			Addresses: pulumi.StringArray{
				pulumi.String("1.2.3.4/32"),
				pulumi.String("5.6.7.8/32"),
			},
			Description:      pulumi.String("Example IP set"),
			IpAddressVersion: pulumi.String("IPV4"),
			Scope:            pulumi.String("REGIONAL"),
			Tags: pulumi.StringMap{
				"Tag1": pulumi.String("Value1"),
				"Tag2": pulumi.String("Value2"),
			},
		})
		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.aws.wafv2.IpSet;
import com.pulumi.aws.wafv2.IpSetArgs;
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 example = new IpSet("example", IpSetArgs.builder()        
            .addresses(            
                "1.2.3.4/32",
                "5.6.7.8/32")
            .description("Example IP set")
            .ipAddressVersion("IPV4")
            .scope("REGIONAL")
            .tags(Map.ofEntries(
                Map.entry("Tag1", "Value1"),
                Map.entry("Tag2", "Value2")
            ))
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.wafv2.IpSet("example",
    addresses=[
        "1.2.3.4/32",
        "5.6.7.8/32",
    ],
    description="Example IP set",
    ip_address_version="IPV4",
    scope="REGIONAL",
    tags={
        "Tag1": "Value1",
        "Tag2": "Value2",
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.wafv2.IpSet("example", {
    addresses: [
        "1.2.3.4/32",
        "5.6.7.8/32",
    ],
    description: "Example IP set",
    ipAddressVersion: "IPV4",
    scope: "REGIONAL",
    tags: {
        Tag1: "Value1",
        Tag2: "Value2",
    },
});
resources:
  example:
    type: aws:wafv2:IpSet
    properties:
      addresses:
        - 1.2.3.4/32
        - 5.6.7.8/32
      description: Example IP set
      ipAddressVersion: IPV4
      scope: REGIONAL
      tags:
        Tag1: Value1
        Tag2: Value2

Create IpSet Resource

new IpSet(name: string, args: IpSetArgs, opts?: CustomResourceOptions);
@overload
def IpSet(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          addresses: Optional[Sequence[str]] = None,
          description: Optional[str] = None,
          ip_address_version: Optional[str] = None,
          name: Optional[str] = None,
          scope: Optional[str] = None,
          tags: Optional[Mapping[str, str]] = None)
@overload
def IpSet(resource_name: str,
          args: IpSetArgs,
          opts: Optional[ResourceOptions] = None)
func NewIpSet(ctx *Context, name string, args IpSetArgs, opts ...ResourceOption) (*IpSet, error)
public IpSet(string name, IpSetArgs args, CustomResourceOptions? opts = null)
public IpSet(String name, IpSetArgs args)
public IpSet(String name, IpSetArgs args, CustomResourceOptions options)
type: aws:wafv2:IpSet
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args IpSetArgs
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 IpSetArgs
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 IpSetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args IpSetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args IpSetArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

IpAddressVersion string

Specify IPV4 or IPV6. Valid values are IPV4 or IPV6.

Scope string

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the Region US East (N. Virginia).

Addresses List<string>

Contains an array of strings that specify one or more IP addresses or blocks of IP addresses in Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports all address ranges for IP versions IPv4 and IPv6.

Description string

A friendly description of the IP set.

Name string

A friendly name of the IP set.

Tags Dictionary<string, string>

An array of key:value pairs to associate with the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

IpAddressVersion string

Specify IPV4 or IPV6. Valid values are IPV4 or IPV6.

Scope string

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the Region US East (N. Virginia).

Addresses []string

Contains an array of strings that specify one or more IP addresses or blocks of IP addresses in Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports all address ranges for IP versions IPv4 and IPv6.

Description string

A friendly description of the IP set.

Name string

A friendly name of the IP set.

Tags map[string]string

An array of key:value pairs to associate with the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

ipAddressVersion String

Specify IPV4 or IPV6. Valid values are IPV4 or IPV6.

scope String

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the Region US East (N. Virginia).

addresses List<String>

Contains an array of strings that specify one or more IP addresses or blocks of IP addresses in Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports all address ranges for IP versions IPv4 and IPv6.

description String

A friendly description of the IP set.

name String

A friendly name of the IP set.

tags Map<String,String>

An array of key:value pairs to associate with the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

ipAddressVersion string

Specify IPV4 or IPV6. Valid values are IPV4 or IPV6.

scope string

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the Region US East (N. Virginia).

addresses string[]

Contains an array of strings that specify one or more IP addresses or blocks of IP addresses in Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports all address ranges for IP versions IPv4 and IPv6.

description string

A friendly description of the IP set.

name string

A friendly name of the IP set.

tags {[key: string]: string}

An array of key:value pairs to associate with the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

ip_address_version str

Specify IPV4 or IPV6. Valid values are IPV4 or IPV6.

scope str

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the Region US East (N. Virginia).

addresses Sequence[str]

Contains an array of strings that specify one or more IP addresses or blocks of IP addresses in Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports all address ranges for IP versions IPv4 and IPv6.

description str

A friendly description of the IP set.

name str

A friendly name of the IP set.

tags Mapping[str, str]

An array of key:value pairs to associate with the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

ipAddressVersion String

Specify IPV4 or IPV6. Valid values are IPV4 or IPV6.

scope String

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the Region US East (N. Virginia).

addresses List<String>

Contains an array of strings that specify one or more IP addresses or blocks of IP addresses in Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports all address ranges for IP versions IPv4 and IPv6.

description String

A friendly description of the IP set.

name String

A friendly name of the IP set.

tags Map<String>

An array of key:value pairs to associate with the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Outputs

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

Arn string

The Amazon Resource Name (ARN) of the IP set.

Id string

The provider-assigned unique ID for this managed resource.

LockToken string
TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Arn string

The Amazon Resource Name (ARN) of the IP set.

Id string

The provider-assigned unique ID for this managed resource.

LockToken string
TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

The Amazon Resource Name (ARN) of the IP set.

id String

The provider-assigned unique ID for this managed resource.

lockToken String
tagsAll Map<String,String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn string

The Amazon Resource Name (ARN) of the IP set.

id string

The provider-assigned unique ID for this managed resource.

lockToken string
tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn str

The Amazon Resource Name (ARN) of the IP set.

id str

The provider-assigned unique ID for this managed resource.

lock_token str
tags_all Mapping[str, str]

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

The Amazon Resource Name (ARN) of the IP set.

id String

The provider-assigned unique ID for this managed resource.

lockToken String
tagsAll Map<String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Look up Existing IpSet Resource

Get an existing IpSet 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?: IpSetState, opts?: CustomResourceOptions): IpSet
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        addresses: Optional[Sequence[str]] = None,
        arn: Optional[str] = None,
        description: Optional[str] = None,
        ip_address_version: Optional[str] = None,
        lock_token: Optional[str] = None,
        name: Optional[str] = None,
        scope: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> IpSet
func GetIpSet(ctx *Context, name string, id IDInput, state *IpSetState, opts ...ResourceOption) (*IpSet, error)
public static IpSet Get(string name, Input<string> id, IpSetState? state, CustomResourceOptions? opts = null)
public static IpSet get(String name, Output<String> id, IpSetState 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:
Addresses List<string>

Contains an array of strings that specify one or more IP addresses or blocks of IP addresses in Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports all address ranges for IP versions IPv4 and IPv6.

Arn string

The Amazon Resource Name (ARN) of the IP set.

Description string

A friendly description of the IP set.

IpAddressVersion string

Specify IPV4 or IPV6. Valid values are IPV4 or IPV6.

LockToken string
Name string

A friendly name of the IP set.

Scope string

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the Region US East (N. Virginia).

Tags Dictionary<string, string>

An array of key:value pairs to associate with the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Addresses []string

Contains an array of strings that specify one or more IP addresses or blocks of IP addresses in Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports all address ranges for IP versions IPv4 and IPv6.

Arn string

The Amazon Resource Name (ARN) of the IP set.

Description string

A friendly description of the IP set.

IpAddressVersion string

Specify IPV4 or IPV6. Valid values are IPV4 or IPV6.

LockToken string
Name string

A friendly name of the IP set.

Scope string

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the Region US East (N. Virginia).

Tags map[string]string

An array of key:value pairs to associate with the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

addresses List<String>

Contains an array of strings that specify one or more IP addresses or blocks of IP addresses in Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports all address ranges for IP versions IPv4 and IPv6.

arn String

The Amazon Resource Name (ARN) of the IP set.

description String

A friendly description of the IP set.

ipAddressVersion String

Specify IPV4 or IPV6. Valid values are IPV4 or IPV6.

lockToken String
name String

A friendly name of the IP set.

scope String

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the Region US East (N. Virginia).

tags Map<String,String>

An array of key:value pairs to associate with the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map<String,String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

addresses string[]

Contains an array of strings that specify one or more IP addresses or blocks of IP addresses in Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports all address ranges for IP versions IPv4 and IPv6.

arn string

The Amazon Resource Name (ARN) of the IP set.

description string

A friendly description of the IP set.

ipAddressVersion string

Specify IPV4 or IPV6. Valid values are IPV4 or IPV6.

lockToken string
name string

A friendly name of the IP set.

scope string

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the Region US East (N. Virginia).

tags {[key: string]: string}

An array of key:value pairs to associate with the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

addresses Sequence[str]

Contains an array of strings that specify one or more IP addresses or blocks of IP addresses in Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports all address ranges for IP versions IPv4 and IPv6.

arn str

The Amazon Resource Name (ARN) of the IP set.

description str

A friendly description of the IP set.

ip_address_version str

Specify IPV4 or IPV6. Valid values are IPV4 or IPV6.

lock_token str
name str

A friendly name of the IP set.

scope str

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the Region US East (N. Virginia).

tags Mapping[str, str]

An array of key:value pairs to associate with the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tags_all Mapping[str, str]

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

addresses List<String>

Contains an array of strings that specify one or more IP addresses or blocks of IP addresses in Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports all address ranges for IP versions IPv4 and IPv6.

arn String

The Amazon Resource Name (ARN) of the IP set.

description String

A friendly description of the IP set.

ipAddressVersion String

Specify IPV4 or IPV6. Valid values are IPV4 or IPV6.

lockToken String
name String

A friendly name of the IP set.

scope String

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the Region US East (N. Virginia).

tags Map<String>

An array of key:value pairs to associate with the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map<String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Import

WAFv2 IP Sets can be imported using ID/name/scope

 $ pulumi import aws:wafv2/ipSet:IpSet example a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc/example/REGIONAL

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.