IpSet
Provides a WAFv2 IP Set Resource
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.WafV2.IpSet("example", new Aws.WafV2.IpSetArgs
{
Addresses =
{
"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/v2/go/aws/wafv2"
"github.com/pulumi/pulumi/sdk/v2/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
})
}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",
},
});Create a IpSet Resource
new IpSet(name: string, args: IpSetArgs, opts?: CustomResourceOptions);def IpSet(resource_name, opts=None, addresses=None, description=None, ip_address_version=None, name=None, scope=None, tags=None, __props__=None);public IpSet(string name, IpSetArgs args, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
IpSet Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The IpSet resource accepts the following input properties:
- Ip
Address stringVersion Specify IPV4 or IPV6. Valid values are
IPV4orIPV6.- Scope string
Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are
CLOUDFRONTorREGIONAL. 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.
- Ip
Address stringVersion Specify IPV4 or IPV6. Valid values are
IPV4orIPV6.- Scope string
Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are
CLOUDFRONTorREGIONAL. 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.
- ip
Address stringVersion Specify IPV4 or IPV6. Valid values are
IPV4orIPV6.- scope string
Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are
CLOUDFRONTorREGIONAL. 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.
- ip_
address_ strversion Specify IPV4 or IPV6. Valid values are
IPV4orIPV6.- scope str
Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are
CLOUDFRONTorREGIONAL. To work with CloudFront, you must also specify the Region US East (N. Virginia).- addresses List[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.
- Dict[str, str]
An array of key:value pairs to associate with the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the IpSet resource produces the following output properties:
Look up an 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): IpSetstatic get(resource_name, id, opts=None, addresses=None, arn=None, description=None, ip_address_version=None, lock_token=None, name=None, scope=None, tags=None, __props__=None);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)- 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.
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) that identifies the cluster.
- Description string
A friendly description of the IP set.
- Ip
Address stringVersion Specify IPV4 or IPV6. Valid values are
IPV4orIPV6.- 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
CLOUDFRONTorREGIONAL. 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.
- 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) that identifies the cluster.
- Description string
A friendly description of the IP set.
- Ip
Address stringVersion Specify IPV4 or IPV6. Valid values are
IPV4orIPV6.- 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
CLOUDFRONTorREGIONAL. 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.
- 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) that identifies the cluster.
- description string
A friendly description of the IP set.
- ip
Address stringVersion Specify IPV4 or IPV6. Valid values are
IPV4orIPV6.- 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
CLOUDFRONTorREGIONAL. 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.
- addresses List[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) that identifies the cluster.
- description str
A friendly description of the IP set.
- ip_
address_ strversion Specify IPV4 or IPV6. Valid values are
IPV4orIPV6.- 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
CLOUDFRONTorREGIONAL. To work with CloudFront, you must also specify the Region US East (N. Virginia).- Dict[str, str]
An array of key:value pairs to associate with the resource.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.