tencentcloud.WafIpAccessControl
Explore with Pulumi AI
Provides a resource to create a waf ip_access_control
NOTE: This resource is no longer under maintenance, please use
tencentcloud.WafIpAccessControlV2
instead
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.WafIpAccessControl("example", {
domain: "www.demo.com",
edition: "sparta-waf",
instanceId: "waf_2kxtlbky00b3b4qz",
items: [
{
action: 40,
ip: "1.1.1.1",
note: "desc info.",
validTs: 2019571199,
},
{
action: 42,
ip: "2.2.2.2",
note: "desc info.",
validTs: 2019571199,
},
{
action: 40,
ip: "3.3.3.3",
note: "desc info.",
validTs: 1680570420,
},
],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.WafIpAccessControl("example",
domain="www.demo.com",
edition="sparta-waf",
instance_id="waf_2kxtlbky00b3b4qz",
items=[
{
"action": 40,
"ip": "1.1.1.1",
"note": "desc info.",
"valid_ts": 2019571199,
},
{
"action": 42,
"ip": "2.2.2.2",
"note": "desc info.",
"valid_ts": 2019571199,
},
{
"action": 40,
"ip": "3.3.3.3",
"note": "desc info.",
"valid_ts": 1680570420,
},
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewWafIpAccessControl(ctx, "example", &tencentcloud.WafIpAccessControlArgs{
Domain: pulumi.String("www.demo.com"),
Edition: pulumi.String("sparta-waf"),
InstanceId: pulumi.String("waf_2kxtlbky00b3b4qz"),
Items: tencentcloud.WafIpAccessControlItemArray{
&tencentcloud.WafIpAccessControlItemArgs{
Action: pulumi.Float64(40),
Ip: pulumi.String("1.1.1.1"),
Note: pulumi.String("desc info."),
ValidTs: pulumi.Float64(2019571199),
},
&tencentcloud.WafIpAccessControlItemArgs{
Action: pulumi.Float64(42),
Ip: pulumi.String("2.2.2.2"),
Note: pulumi.String("desc info."),
ValidTs: pulumi.Float64(2019571199),
},
&tencentcloud.WafIpAccessControlItemArgs{
Action: pulumi.Float64(40),
Ip: pulumi.String("3.3.3.3"),
Note: pulumi.String("desc info."),
ValidTs: pulumi.Float64(1680570420),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.WafIpAccessControl("example", new()
{
Domain = "www.demo.com",
Edition = "sparta-waf",
InstanceId = "waf_2kxtlbky00b3b4qz",
Items = new[]
{
new Tencentcloud.Inputs.WafIpAccessControlItemArgs
{
Action = 40,
Ip = "1.1.1.1",
Note = "desc info.",
ValidTs = 2019571199,
},
new Tencentcloud.Inputs.WafIpAccessControlItemArgs
{
Action = 42,
Ip = "2.2.2.2",
Note = "desc info.",
ValidTs = 2019571199,
},
new Tencentcloud.Inputs.WafIpAccessControlItemArgs
{
Action = 40,
Ip = "3.3.3.3",
Note = "desc info.",
ValidTs = 1680570420,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.WafIpAccessControl;
import com.pulumi.tencentcloud.WafIpAccessControlArgs;
import com.pulumi.tencentcloud.inputs.WafIpAccessControlItemArgs;
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 WafIpAccessControl("example", WafIpAccessControlArgs.builder()
.domain("www.demo.com")
.edition("sparta-waf")
.instanceId("waf_2kxtlbky00b3b4qz")
.items(
WafIpAccessControlItemArgs.builder()
.action(40)
.ip("1.1.1.1")
.note("desc info.")
.validTs("2019571199")
.build(),
WafIpAccessControlItemArgs.builder()
.action(42)
.ip("2.2.2.2")
.note("desc info.")
.validTs("2019571199")
.build(),
WafIpAccessControlItemArgs.builder()
.action(40)
.ip("3.3.3.3")
.note("desc info.")
.validTs("1680570420")
.build())
.build());
}
}
resources:
example:
type: tencentcloud:WafIpAccessControl
properties:
domain: www.demo.com
edition: sparta-waf
instanceId: waf_2kxtlbky00b3b4qz
items:
- action: 40
ip: 1.1.1.1
note: desc info.
validTs: '2019571199'
- action: 42
ip: 2.2.2.2
note: desc info.
validTs: '2019571199'
- action: 40
ip: 3.3.3.3
note: desc info.
validTs: '1680570420'
Create WafIpAccessControl Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WafIpAccessControl(name: string, args: WafIpAccessControlArgs, opts?: CustomResourceOptions);
@overload
def WafIpAccessControl(resource_name: str,
args: WafIpAccessControlArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WafIpAccessControl(resource_name: str,
opts: Optional[ResourceOptions] = None,
domain: Optional[str] = None,
edition: Optional[str] = None,
instance_id: Optional[str] = None,
items: Optional[Sequence[WafIpAccessControlItemArgs]] = None,
waf_ip_access_control_id: Optional[str] = None)
func NewWafIpAccessControl(ctx *Context, name string, args WafIpAccessControlArgs, opts ...ResourceOption) (*WafIpAccessControl, error)
public WafIpAccessControl(string name, WafIpAccessControlArgs args, CustomResourceOptions? opts = null)
public WafIpAccessControl(String name, WafIpAccessControlArgs args)
public WafIpAccessControl(String name, WafIpAccessControlArgs args, CustomResourceOptions options)
type: tencentcloud:WafIpAccessControl
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 WafIpAccessControlArgs
- 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 WafIpAccessControlArgs
- 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 WafIpAccessControlArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WafIpAccessControlArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WafIpAccessControlArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
WafIpAccessControl 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 WafIpAccessControl resource accepts the following input properties:
- Domain string
- Domain.
- Edition string
- Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
- Instance
Id string - Waf instance Id.
- Items
List<Waf
Ip Access Control Item> - Ip parameter list.
- Waf
Ip stringAccess Control Id - ID of the resource.
- Domain string
- Domain.
- Edition string
- Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
- Instance
Id string - Waf instance Id.
- Items
[]Waf
Ip Access Control Item Args - Ip parameter list.
- Waf
Ip stringAccess Control Id - ID of the resource.
- domain String
- Domain.
- edition String
- Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
- instance
Id String - Waf instance Id.
- items
List<Waf
Ip Access Control Item> - Ip parameter list.
- waf
Ip StringAccess Control Id - ID of the resource.
- domain string
- Domain.
- edition string
- Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
- instance
Id string - Waf instance Id.
- items
Waf
Ip Access Control Item[] - Ip parameter list.
- waf
Ip stringAccess Control Id - ID of the resource.
- domain str
- Domain.
- edition str
- Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
- instance_
id str - Waf instance Id.
- items
Sequence[Waf
Ip Access Control Item Args] - Ip parameter list.
- waf_
ip_ straccess_ control_ id - ID of the resource.
- domain String
- Domain.
- edition String
- Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
- instance
Id String - Waf instance Id.
- items List<Property Map>
- Ip parameter list.
- waf
Ip StringAccess Control Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the WafIpAccessControl 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 WafIpAccessControl Resource
Get an existing WafIpAccessControl 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?: WafIpAccessControlState, opts?: CustomResourceOptions): WafIpAccessControl
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
domain: Optional[str] = None,
edition: Optional[str] = None,
instance_id: Optional[str] = None,
items: Optional[Sequence[WafIpAccessControlItemArgs]] = None,
waf_ip_access_control_id: Optional[str] = None) -> WafIpAccessControl
func GetWafIpAccessControl(ctx *Context, name string, id IDInput, state *WafIpAccessControlState, opts ...ResourceOption) (*WafIpAccessControl, error)
public static WafIpAccessControl Get(string name, Input<string> id, WafIpAccessControlState? state, CustomResourceOptions? opts = null)
public static WafIpAccessControl get(String name, Output<String> id, WafIpAccessControlState state, CustomResourceOptions options)
resources: _: type: tencentcloud:WafIpAccessControl 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.
- Domain string
- Domain.
- Edition string
- Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
- Instance
Id string - Waf instance Id.
- Items
List<Waf
Ip Access Control Item> - Ip parameter list.
- Waf
Ip stringAccess Control Id - ID of the resource.
- Domain string
- Domain.
- Edition string
- Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
- Instance
Id string - Waf instance Id.
- Items
[]Waf
Ip Access Control Item Args - Ip parameter list.
- Waf
Ip stringAccess Control Id - ID of the resource.
- domain String
- Domain.
- edition String
- Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
- instance
Id String - Waf instance Id.
- items
List<Waf
Ip Access Control Item> - Ip parameter list.
- waf
Ip StringAccess Control Id - ID of the resource.
- domain string
- Domain.
- edition string
- Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
- instance
Id string - Waf instance Id.
- items
Waf
Ip Access Control Item[] - Ip parameter list.
- waf
Ip stringAccess Control Id - ID of the resource.
- domain str
- Domain.
- edition str
- Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
- instance_
id str - Waf instance Id.
- items
Sequence[Waf
Ip Access Control Item Args] - Ip parameter list.
- waf_
ip_ straccess_ control_ id - ID of the resource.
- domain String
- Domain.
- edition String
- Waf edition. clb-waf means clb-waf, sparta-waf means saas-waf.
- instance
Id String - Waf instance Id.
- items List<Property Map>
- Ip parameter list.
- waf
Ip StringAccess Control Id - ID of the resource.
Supporting Types
WafIpAccessControlItem, WafIpAccessControlItemArgs
- Action double
- Action value 40 is whitelist, 42 is blacklist.
- Ip string
- IP address.
- Note string
- Note info.
- Valid
Ts double - Effective date, with a second level timestamp value. For example, 1680570420 represents 2023-04-04 09:07:00; 2019571199 means permanently effective.
- Id string
- ID of the resource.
- Source string
- Source.
- Valid
Status double - Valid status.
- Action float64
- Action value 40 is whitelist, 42 is blacklist.
- Ip string
- IP address.
- Note string
- Note info.
- Valid
Ts float64 - Effective date, with a second level timestamp value. For example, 1680570420 represents 2023-04-04 09:07:00; 2019571199 means permanently effective.
- Id string
- ID of the resource.
- Source string
- Source.
- Valid
Status float64 - Valid status.
- action Double
- Action value 40 is whitelist, 42 is blacklist.
- ip String
- IP address.
- note String
- Note info.
- valid
Ts Double - Effective date, with a second level timestamp value. For example, 1680570420 represents 2023-04-04 09:07:00; 2019571199 means permanently effective.
- id String
- ID of the resource.
- source String
- Source.
- valid
Status Double - Valid status.
- action number
- Action value 40 is whitelist, 42 is blacklist.
- ip string
- IP address.
- note string
- Note info.
- valid
Ts number - Effective date, with a second level timestamp value. For example, 1680570420 represents 2023-04-04 09:07:00; 2019571199 means permanently effective.
- id string
- ID of the resource.
- source string
- Source.
- valid
Status number - Valid status.
- action float
- Action value 40 is whitelist, 42 is blacklist.
- ip str
- IP address.
- note str
- Note info.
- valid_
ts float - Effective date, with a second level timestamp value. For example, 1680570420 represents 2023-04-04 09:07:00; 2019571199 means permanently effective.
- id str
- ID of the resource.
- source str
- Source.
- valid_
status float - Valid status.
- action Number
- Action value 40 is whitelist, 42 is blacklist.
- ip String
- IP address.
- note String
- Note info.
- valid
Ts Number - Effective date, with a second level timestamp value. For example, 1680570420 represents 2023-04-04 09:07:00; 2019571199 means permanently effective.
- id String
- ID of the resource.
- source String
- Source.
- valid
Status Number - Valid status.
Import
waf ip_access_control can be imported using the id, e.g.
$ pulumi import tencentcloud:index/wafIpAccessControl:WafIpAccessControl example waf_2kxtlbky00b3b4qz#www.demo.com#sparta-waf
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.