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)
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:
- Ip
Address stringVersion Specify IPV4 or IPV6. Valid values are
IPV4
orIPV6
.- Scope string
Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are
CLOUDFRONT
orREGIONAL
. 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.
- 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.
- Ip
Address stringVersion Specify IPV4 or IPV6. Valid values are
IPV4
orIPV6
.- Scope string
Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are
CLOUDFRONT
orREGIONAL
. 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.
- 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.
- ip
Address StringVersion Specify IPV4 or IPV6. Valid values are
IPV4
orIPV6
.- scope String
Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are
CLOUDFRONT
orREGIONAL
. 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.
- 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.
- ip
Address stringVersion Specify IPV4 or IPV6. Valid values are
IPV4
orIPV6
.- scope string
Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are
CLOUDFRONT
orREGIONAL
. 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.
- {[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_ strversion Specify IPV4 or IPV6. Valid values are
IPV4
orIPV6
.- scope str
Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are
CLOUDFRONT
orREGIONAL
. 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.
- 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.
- ip
Address StringVersion Specify IPV4 or IPV6. Valid values are
IPV4
orIPV6
.- scope String
Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are
CLOUDFRONT
orREGIONAL
. 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.
- 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 str
The Amazon Resource Name (ARN) of the IP set.
- id str
The provider-assigned unique ID for this managed resource.
- lock_
token str - Mapping[str, str]
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.
- 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.
- Ip
Address stringVersion Specify IPV4 or IPV6. Valid values are
IPV4
orIPV6
.- Lock
Token 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
orREGIONAL
. To work with CloudFront, you must also specify the Region US East (N. Virginia).- 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.- 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.
- Ip
Address stringVersion Specify IPV4 or IPV6. Valid values are
IPV4
orIPV6
.- Lock
Token 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
orREGIONAL
. To work with CloudFront, you must also specify the Region US East (N. Virginia).- 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.- 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.
- ip
Address StringVersion Specify IPV4 or IPV6. Valid values are
IPV4
orIPV6
.- lock
Token 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
orREGIONAL
. To work with CloudFront, you must also specify the Region US East (N. Virginia).- 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.- 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.
- ip
Address stringVersion Specify IPV4 or IPV6. Valid values are
IPV4
orIPV6
.- lock
Token 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
orREGIONAL
. To work with CloudFront, you must also specify the Region US East (N. Virginia).- {[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.- {[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_ strversion Specify IPV4 or IPV6. Valid values are
IPV4
orIPV6
.- 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
orREGIONAL
. To work with CloudFront, you must also specify the Region US East (N. Virginia).- 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.- 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.
- ip
Address StringVersion Specify IPV4 or IPV6. Valid values are
IPV4
orIPV6
.- lock
Token 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
orREGIONAL
. To work with CloudFront, you must also specify the Region US East (N. Virginia).- 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.- 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.