Provides a resource to create a CFW vpc policy order config
NOTE: If resource
tencentcloud.CfwVpcPolicyOrderConfigis used to sort resourcetencentcloud.CfwVpcPolicy, all instances of resourcetencentcloud.CfwVpcPolicymust be configured simultaneously, and the sorting of this resource cannot be declared elsewhere.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example1 = new tencentcloud.CfwVpcPolicy("example1", {
sourceContent: "1.1.1.1/0",
sourceType: "net",
destContent: "192.168.0.1",
destType: "net",
protocol: "ANY",
ruleAction: "log",
port: "-1/-1",
description: "description.",
enable: "true",
fwGroupId: "ALL",
});
const example2 = new tencentcloud.CfwVpcPolicy("example2", {
sourceContent: "2.2.2.2/0",
sourceType: "net",
destContent: "192.168.0.2",
destType: "net",
protocol: "ANY",
ruleAction: "log",
port: "-1/-1",
description: "description.",
enable: "true",
fwGroupId: "ALL",
});
const example3 = new tencentcloud.CfwVpcPolicy("example3", {
sourceContent: "3.3.3.3/0",
sourceType: "net",
destContent: "192.168.0.3",
destType: "net",
protocol: "ANY",
ruleAction: "log",
port: "-1/-1",
description: "description.",
enable: "true",
fwGroupId: "ALL",
});
const example = new tencentcloud.CfwVpcPolicyOrderConfig("example", {ruleUuidLists: [
example3.uuid,
example1.uuid,
example2.uuid,
]});
import pulumi
import pulumi_tencentcloud as tencentcloud
example1 = tencentcloud.CfwVpcPolicy("example1",
source_content="1.1.1.1/0",
source_type="net",
dest_content="192.168.0.1",
dest_type="net",
protocol="ANY",
rule_action="log",
port="-1/-1",
description="description.",
enable="true",
fw_group_id="ALL")
example2 = tencentcloud.CfwVpcPolicy("example2",
source_content="2.2.2.2/0",
source_type="net",
dest_content="192.168.0.2",
dest_type="net",
protocol="ANY",
rule_action="log",
port="-1/-1",
description="description.",
enable="true",
fw_group_id="ALL")
example3 = tencentcloud.CfwVpcPolicy("example3",
source_content="3.3.3.3/0",
source_type="net",
dest_content="192.168.0.3",
dest_type="net",
protocol="ANY",
rule_action="log",
port="-1/-1",
description="description.",
enable="true",
fw_group_id="ALL")
example = tencentcloud.CfwVpcPolicyOrderConfig("example", rule_uuid_lists=[
example3.uuid,
example1.uuid,
example2.uuid,
])
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 {
example1, err := tencentcloud.NewCfwVpcPolicy(ctx, "example1", &tencentcloud.CfwVpcPolicyArgs{
SourceContent: pulumi.String("1.1.1.1/0"),
SourceType: pulumi.String("net"),
DestContent: pulumi.String("192.168.0.1"),
DestType: pulumi.String("net"),
Protocol: pulumi.String("ANY"),
RuleAction: pulumi.String("log"),
Port: pulumi.String("-1/-1"),
Description: pulumi.String("description."),
Enable: pulumi.String("true"),
FwGroupId: pulumi.String("ALL"),
})
if err != nil {
return err
}
example2, err := tencentcloud.NewCfwVpcPolicy(ctx, "example2", &tencentcloud.CfwVpcPolicyArgs{
SourceContent: pulumi.String("2.2.2.2/0"),
SourceType: pulumi.String("net"),
DestContent: pulumi.String("192.168.0.2"),
DestType: pulumi.String("net"),
Protocol: pulumi.String("ANY"),
RuleAction: pulumi.String("log"),
Port: pulumi.String("-1/-1"),
Description: pulumi.String("description."),
Enable: pulumi.String("true"),
FwGroupId: pulumi.String("ALL"),
})
if err != nil {
return err
}
example3, err := tencentcloud.NewCfwVpcPolicy(ctx, "example3", &tencentcloud.CfwVpcPolicyArgs{
SourceContent: pulumi.String("3.3.3.3/0"),
SourceType: pulumi.String("net"),
DestContent: pulumi.String("192.168.0.3"),
DestType: pulumi.String("net"),
Protocol: pulumi.String("ANY"),
RuleAction: pulumi.String("log"),
Port: pulumi.String("-1/-1"),
Description: pulumi.String("description."),
Enable: pulumi.String("true"),
FwGroupId: pulumi.String("ALL"),
})
if err != nil {
return err
}
_, err = tencentcloud.NewCfwVpcPolicyOrderConfig(ctx, "example", &tencentcloud.CfwVpcPolicyOrderConfigArgs{
RuleUuidLists: pulumi.Float64Array{
example3.Uuid,
example1.Uuid,
example2.Uuid,
},
})
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 example1 = new Tencentcloud.CfwVpcPolicy("example1", new()
{
SourceContent = "1.1.1.1/0",
SourceType = "net",
DestContent = "192.168.0.1",
DestType = "net",
Protocol = "ANY",
RuleAction = "log",
Port = "-1/-1",
Description = "description.",
Enable = "true",
FwGroupId = "ALL",
});
var example2 = new Tencentcloud.CfwVpcPolicy("example2", new()
{
SourceContent = "2.2.2.2/0",
SourceType = "net",
DestContent = "192.168.0.2",
DestType = "net",
Protocol = "ANY",
RuleAction = "log",
Port = "-1/-1",
Description = "description.",
Enable = "true",
FwGroupId = "ALL",
});
var example3 = new Tencentcloud.CfwVpcPolicy("example3", new()
{
SourceContent = "3.3.3.3/0",
SourceType = "net",
DestContent = "192.168.0.3",
DestType = "net",
Protocol = "ANY",
RuleAction = "log",
Port = "-1/-1",
Description = "description.",
Enable = "true",
FwGroupId = "ALL",
});
var example = new Tencentcloud.CfwVpcPolicyOrderConfig("example", new()
{
RuleUuidLists = new[]
{
example3.Uuid,
example1.Uuid,
example2.Uuid,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.CfwVpcPolicy;
import com.pulumi.tencentcloud.CfwVpcPolicyArgs;
import com.pulumi.tencentcloud.CfwVpcPolicyOrderConfig;
import com.pulumi.tencentcloud.CfwVpcPolicyOrderConfigArgs;
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 example1 = new CfwVpcPolicy("example1", CfwVpcPolicyArgs.builder()
.sourceContent("1.1.1.1/0")
.sourceType("net")
.destContent("192.168.0.1")
.destType("net")
.protocol("ANY")
.ruleAction("log")
.port("-1/-1")
.description("description.")
.enable("true")
.fwGroupId("ALL")
.build());
var example2 = new CfwVpcPolicy("example2", CfwVpcPolicyArgs.builder()
.sourceContent("2.2.2.2/0")
.sourceType("net")
.destContent("192.168.0.2")
.destType("net")
.protocol("ANY")
.ruleAction("log")
.port("-1/-1")
.description("description.")
.enable("true")
.fwGroupId("ALL")
.build());
var example3 = new CfwVpcPolicy("example3", CfwVpcPolicyArgs.builder()
.sourceContent("3.3.3.3/0")
.sourceType("net")
.destContent("192.168.0.3")
.destType("net")
.protocol("ANY")
.ruleAction("log")
.port("-1/-1")
.description("description.")
.enable("true")
.fwGroupId("ALL")
.build());
var example = new CfwVpcPolicyOrderConfig("example", CfwVpcPolicyOrderConfigArgs.builder()
.ruleUuidLists(
example3.uuid(),
example1.uuid(),
example2.uuid())
.build());
}
}
resources:
example1:
type: tencentcloud:CfwVpcPolicy
properties:
sourceContent: 1.1.1.1/0
sourceType: net
destContent: 192.168.0.1
destType: net
protocol: ANY
ruleAction: log
port: -1/-1
description: description.
enable: 'true'
fwGroupId: ALL
example2:
type: tencentcloud:CfwVpcPolicy
properties:
sourceContent: 2.2.2.2/0
sourceType: net
destContent: 192.168.0.2
destType: net
protocol: ANY
ruleAction: log
port: -1/-1
description: description.
enable: 'true'
fwGroupId: ALL
example3:
type: tencentcloud:CfwVpcPolicy
properties:
sourceContent: 3.3.3.3/0
sourceType: net
destContent: 192.168.0.3
destType: net
protocol: ANY
ruleAction: log
port: -1/-1
description: description.
enable: 'true'
fwGroupId: ALL
example:
type: tencentcloud:CfwVpcPolicyOrderConfig
properties:
ruleUuidLists:
- ${example3.uuid}
- ${example1.uuid}
- ${example2.uuid}
Create CfwVpcPolicyOrderConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CfwVpcPolicyOrderConfig(name: string, args?: CfwVpcPolicyOrderConfigArgs, opts?: CustomResourceOptions);@overload
def CfwVpcPolicyOrderConfig(resource_name: str,
args: Optional[CfwVpcPolicyOrderConfigArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def CfwVpcPolicyOrderConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
cfw_vpc_policy_order_config_id: Optional[str] = None,
rule_uuid_lists: Optional[Sequence[float]] = None)func NewCfwVpcPolicyOrderConfig(ctx *Context, name string, args *CfwVpcPolicyOrderConfigArgs, opts ...ResourceOption) (*CfwVpcPolicyOrderConfig, error)public CfwVpcPolicyOrderConfig(string name, CfwVpcPolicyOrderConfigArgs? args = null, CustomResourceOptions? opts = null)
public CfwVpcPolicyOrderConfig(String name, CfwVpcPolicyOrderConfigArgs args)
public CfwVpcPolicyOrderConfig(String name, CfwVpcPolicyOrderConfigArgs args, CustomResourceOptions options)
type: tencentcloud:CfwVpcPolicyOrderConfig
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 CfwVpcPolicyOrderConfigArgs
- 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 CfwVpcPolicyOrderConfigArgs
- 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 CfwVpcPolicyOrderConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CfwVpcPolicyOrderConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CfwVpcPolicyOrderConfigArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CfwVpcPolicyOrderConfig 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 CfwVpcPolicyOrderConfig resource accepts the following input properties:
- Cfw
Vpc stringPolicy Order Config Id - ID of the resource.
- Rule
Uuid List<double>Lists - The unique IDs of the rule, which is not required when you create a rule. The priority will be determined by the index position of the UUID in the list.
- Cfw
Vpc stringPolicy Order Config Id - ID of the resource.
- Rule
Uuid []float64Lists - The unique IDs of the rule, which is not required when you create a rule. The priority will be determined by the index position of the UUID in the list.
- cfw
Vpc StringPolicy Order Config Id - ID of the resource.
- rule
Uuid List<Double>Lists - The unique IDs of the rule, which is not required when you create a rule. The priority will be determined by the index position of the UUID in the list.
- cfw
Vpc stringPolicy Order Config Id - ID of the resource.
- rule
Uuid number[]Lists - The unique IDs of the rule, which is not required when you create a rule. The priority will be determined by the index position of the UUID in the list.
- cfw_
vpc_ strpolicy_ order_ config_ id - ID of the resource.
- rule_
uuid_ Sequence[float]lists - The unique IDs of the rule, which is not required when you create a rule. The priority will be determined by the index position of the UUID in the list.
- cfw
Vpc StringPolicy Order Config Id - ID of the resource.
- rule
Uuid List<Number>Lists - The unique IDs of the rule, which is not required when you create a rule. The priority will be determined by the index position of the UUID in the list.
Outputs
All input properties are implicitly available as output properties. Additionally, the CfwVpcPolicyOrderConfig 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 CfwVpcPolicyOrderConfig Resource
Get an existing CfwVpcPolicyOrderConfig 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?: CfwVpcPolicyOrderConfigState, opts?: CustomResourceOptions): CfwVpcPolicyOrderConfig@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cfw_vpc_policy_order_config_id: Optional[str] = None,
rule_uuid_lists: Optional[Sequence[float]] = None) -> CfwVpcPolicyOrderConfigfunc GetCfwVpcPolicyOrderConfig(ctx *Context, name string, id IDInput, state *CfwVpcPolicyOrderConfigState, opts ...ResourceOption) (*CfwVpcPolicyOrderConfig, error)public static CfwVpcPolicyOrderConfig Get(string name, Input<string> id, CfwVpcPolicyOrderConfigState? state, CustomResourceOptions? opts = null)public static CfwVpcPolicyOrderConfig get(String name, Output<String> id, CfwVpcPolicyOrderConfigState state, CustomResourceOptions options)resources: _: type: tencentcloud:CfwVpcPolicyOrderConfig 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.
- Cfw
Vpc stringPolicy Order Config Id - ID of the resource.
- Rule
Uuid List<double>Lists - The unique IDs of the rule, which is not required when you create a rule. The priority will be determined by the index position of the UUID in the list.
- Cfw
Vpc stringPolicy Order Config Id - ID of the resource.
- Rule
Uuid []float64Lists - The unique IDs of the rule, which is not required when you create a rule. The priority will be determined by the index position of the UUID in the list.
- cfw
Vpc StringPolicy Order Config Id - ID of the resource.
- rule
Uuid List<Double>Lists - The unique IDs of the rule, which is not required when you create a rule. The priority will be determined by the index position of the UUID in the list.
- cfw
Vpc stringPolicy Order Config Id - ID of the resource.
- rule
Uuid number[]Lists - The unique IDs of the rule, which is not required when you create a rule. The priority will be determined by the index position of the UUID in the list.
- cfw_
vpc_ strpolicy_ order_ config_ id - ID of the resource.
- rule_
uuid_ Sequence[float]lists - The unique IDs of the rule, which is not required when you create a rule. The priority will be determined by the index position of the UUID in the list.
- cfw
Vpc StringPolicy Order Config Id - ID of the resource.
- rule
Uuid List<Number>Lists - The unique IDs of the rule, which is not required when you create a rule. The priority will be determined by the index position of the UUID in the list.
Import
CFW vpc policy order config can be imported using the customId(like uuid or base64 string), e.g.
$ pulumi import tencentcloud:index/cfwVpcPolicyOrderConfig:CfwVpcPolicyOrderConfig example GedqV07VpNU0ob8LuOXw==
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
tencentcloudTerraform Provider.
