tencentcloud.ClbCustomizedConfigAttachment
Explore with Pulumi AI
Provides a resource to create a CLB customized config attachment.
NOTE: This resource must exclusive in one CLB customized config attachment, do not declare additional rule resources of this CLB customized config attachment elsewhere.
Example Usage
If config_type is SERVER
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const exampleClbCustomizedConfigV2 = new tencentcloud.ClbCustomizedConfigV2("exampleClbCustomizedConfigV2", {
configContent: `client_max_body_size 224M;\x0d
client_body_timeout 60s;`,
configName: "tf-example",
configType: "SERVER",
});
const exampleClbCustomizedConfigAttachment = new tencentcloud.ClbCustomizedConfigAttachment("exampleClbCustomizedConfigAttachment", {
configId: exampleClbCustomizedConfigV2.configId,
bindLists: [
{
loadBalancerId: "lb-g1miv1ok",
listenerId: "lbl-9bsa90io",
domain: "demo1.com",
},
{
loadBalancerId: "lb-g1miv1ok",
listenerId: "lbl-qfljudr4",
domain: "demo2.com",
},
],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example_clb_customized_config_v2 = tencentcloud.ClbCustomizedConfigV2("exampleClbCustomizedConfigV2",
config_content="""client_max_body_size 224M;\x0d
client_body_timeout 60s;""",
config_name="tf-example",
config_type="SERVER")
example_clb_customized_config_attachment = tencentcloud.ClbCustomizedConfigAttachment("exampleClbCustomizedConfigAttachment",
config_id=example_clb_customized_config_v2.config_id,
bind_lists=[
{
"load_balancer_id": "lb-g1miv1ok",
"listener_id": "lbl-9bsa90io",
"domain": "demo1.com",
},
{
"load_balancer_id": "lb-g1miv1ok",
"listener_id": "lbl-qfljudr4",
"domain": "demo2.com",
},
])
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 {
exampleClbCustomizedConfigV2, err := tencentcloud.NewClbCustomizedConfigV2(ctx, "exampleClbCustomizedConfigV2", &tencentcloud.ClbCustomizedConfigV2Args{
ConfigContent: pulumi.String("client_max_body_size 224M;
\nclient_body_timeout 60s;"),
ConfigName: pulumi.String("tf-example"),
ConfigType: pulumi.String("SERVER"),
})
if err != nil {
return err
}
_, err = tencentcloud.NewClbCustomizedConfigAttachment(ctx, "exampleClbCustomizedConfigAttachment", &tencentcloud.ClbCustomizedConfigAttachmentArgs{
ConfigId: exampleClbCustomizedConfigV2.ConfigId,
BindLists: tencentcloud.ClbCustomizedConfigAttachmentBindListArray{
&tencentcloud.ClbCustomizedConfigAttachmentBindListArgs{
LoadBalancerId: pulumi.String("lb-g1miv1ok"),
ListenerId: pulumi.String("lbl-9bsa90io"),
Domain: pulumi.String("demo1.com"),
},
&tencentcloud.ClbCustomizedConfigAttachmentBindListArgs{
LoadBalancerId: pulumi.String("lb-g1miv1ok"),
ListenerId: pulumi.String("lbl-qfljudr4"),
Domain: pulumi.String("demo2.com"),
},
},
})
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 exampleClbCustomizedConfigV2 = new Tencentcloud.ClbCustomizedConfigV2("exampleClbCustomizedConfigV2", new()
{
ConfigContent = @"client_max_body_size 224M;
client_body_timeout 60s;",
ConfigName = "tf-example",
ConfigType = "SERVER",
});
var exampleClbCustomizedConfigAttachment = new Tencentcloud.ClbCustomizedConfigAttachment("exampleClbCustomizedConfigAttachment", new()
{
ConfigId = exampleClbCustomizedConfigV2.ConfigId,
BindLists = new[]
{
new Tencentcloud.Inputs.ClbCustomizedConfigAttachmentBindListArgs
{
LoadBalancerId = "lb-g1miv1ok",
ListenerId = "lbl-9bsa90io",
Domain = "demo1.com",
},
new Tencentcloud.Inputs.ClbCustomizedConfigAttachmentBindListArgs
{
LoadBalancerId = "lb-g1miv1ok",
ListenerId = "lbl-qfljudr4",
Domain = "demo2.com",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ClbCustomizedConfigV2;
import com.pulumi.tencentcloud.ClbCustomizedConfigV2Args;
import com.pulumi.tencentcloud.ClbCustomizedConfigAttachment;
import com.pulumi.tencentcloud.ClbCustomizedConfigAttachmentArgs;
import com.pulumi.tencentcloud.inputs.ClbCustomizedConfigAttachmentBindListArgs;
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 exampleClbCustomizedConfigV2 = new ClbCustomizedConfigV2("exampleClbCustomizedConfigV2", ClbCustomizedConfigV2Args.builder()
.configContent("""
client_max_body_size 224M;
client_body_timeout 60s; """)
.configName("tf-example")
.configType("SERVER")
.build());
var exampleClbCustomizedConfigAttachment = new ClbCustomizedConfigAttachment("exampleClbCustomizedConfigAttachment", ClbCustomizedConfigAttachmentArgs.builder()
.configId(exampleClbCustomizedConfigV2.configId())
.bindLists(
ClbCustomizedConfigAttachmentBindListArgs.builder()
.loadBalancerId("lb-g1miv1ok")
.listenerId("lbl-9bsa90io")
.domain("demo1.com")
.build(),
ClbCustomizedConfigAttachmentBindListArgs.builder()
.loadBalancerId("lb-g1miv1ok")
.listenerId("lbl-qfljudr4")
.domain("demo2.com")
.build())
.build());
}
}
resources:
exampleClbCustomizedConfigV2:
type: tencentcloud:ClbCustomizedConfigV2
properties:
configContent: "client_max_body_size 224M;\r\nclient_body_timeout 60s;"
configName: tf-example
configType: SERVER
exampleClbCustomizedConfigAttachment:
type: tencentcloud:ClbCustomizedConfigAttachment
properties:
configId: ${exampleClbCustomizedConfigV2.configId}
bindLists:
- loadBalancerId: lb-g1miv1ok
listenerId: lbl-9bsa90io
domain: demo1.com
- loadBalancerId: lb-g1miv1ok
listenerId: lbl-qfljudr4
domain: demo2.com
If config_type is LOCATION
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const exampleClbCustomizedConfigV2 = new tencentcloud.ClbCustomizedConfigV2("exampleClbCustomizedConfigV2", {
configContent: `client_max_body_size 224M;\x0d
client_body_timeout 60s;`,
configName: "tf-example",
configType: "LOCATION",
});
const exampleClbCustomizedConfigAttachment = new tencentcloud.ClbCustomizedConfigAttachment("exampleClbCustomizedConfigAttachment", {
configId: exampleClbCustomizedConfigV2.configId,
bindLists: [
{
loadBalancerId: "lb-g1miv1ok",
listenerId: "lbl-9bsa90io",
domain: "demo1.com",
locationId: "loc-5he3og2u",
},
{
loadBalancerId: "lb-g1miv1ok",
listenerId: "lbl-qfljudr4",
domain: "demo2.com",
locationId: "loc-0oxl4lfw",
},
],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example_clb_customized_config_v2 = tencentcloud.ClbCustomizedConfigV2("exampleClbCustomizedConfigV2",
config_content="""client_max_body_size 224M;\x0d
client_body_timeout 60s;""",
config_name="tf-example",
config_type="LOCATION")
example_clb_customized_config_attachment = tencentcloud.ClbCustomizedConfigAttachment("exampleClbCustomizedConfigAttachment",
config_id=example_clb_customized_config_v2.config_id,
bind_lists=[
{
"load_balancer_id": "lb-g1miv1ok",
"listener_id": "lbl-9bsa90io",
"domain": "demo1.com",
"location_id": "loc-5he3og2u",
},
{
"load_balancer_id": "lb-g1miv1ok",
"listener_id": "lbl-qfljudr4",
"domain": "demo2.com",
"location_id": "loc-0oxl4lfw",
},
])
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 {
exampleClbCustomizedConfigV2, err := tencentcloud.NewClbCustomizedConfigV2(ctx, "exampleClbCustomizedConfigV2", &tencentcloud.ClbCustomizedConfigV2Args{
ConfigContent: pulumi.String("client_max_body_size 224M;
\nclient_body_timeout 60s;"),
ConfigName: pulumi.String("tf-example"),
ConfigType: pulumi.String("LOCATION"),
})
if err != nil {
return err
}
_, err = tencentcloud.NewClbCustomizedConfigAttachment(ctx, "exampleClbCustomizedConfigAttachment", &tencentcloud.ClbCustomizedConfigAttachmentArgs{
ConfigId: exampleClbCustomizedConfigV2.ConfigId,
BindLists: tencentcloud.ClbCustomizedConfigAttachmentBindListArray{
&tencentcloud.ClbCustomizedConfigAttachmentBindListArgs{
LoadBalancerId: pulumi.String("lb-g1miv1ok"),
ListenerId: pulumi.String("lbl-9bsa90io"),
Domain: pulumi.String("demo1.com"),
LocationId: pulumi.String("loc-5he3og2u"),
},
&tencentcloud.ClbCustomizedConfigAttachmentBindListArgs{
LoadBalancerId: pulumi.String("lb-g1miv1ok"),
ListenerId: pulumi.String("lbl-qfljudr4"),
Domain: pulumi.String("demo2.com"),
LocationId: pulumi.String("loc-0oxl4lfw"),
},
},
})
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 exampleClbCustomizedConfigV2 = new Tencentcloud.ClbCustomizedConfigV2("exampleClbCustomizedConfigV2", new()
{
ConfigContent = @"client_max_body_size 224M;
client_body_timeout 60s;",
ConfigName = "tf-example",
ConfigType = "LOCATION",
});
var exampleClbCustomizedConfigAttachment = new Tencentcloud.ClbCustomizedConfigAttachment("exampleClbCustomizedConfigAttachment", new()
{
ConfigId = exampleClbCustomizedConfigV2.ConfigId,
BindLists = new[]
{
new Tencentcloud.Inputs.ClbCustomizedConfigAttachmentBindListArgs
{
LoadBalancerId = "lb-g1miv1ok",
ListenerId = "lbl-9bsa90io",
Domain = "demo1.com",
LocationId = "loc-5he3og2u",
},
new Tencentcloud.Inputs.ClbCustomizedConfigAttachmentBindListArgs
{
LoadBalancerId = "lb-g1miv1ok",
ListenerId = "lbl-qfljudr4",
Domain = "demo2.com",
LocationId = "loc-0oxl4lfw",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ClbCustomizedConfigV2;
import com.pulumi.tencentcloud.ClbCustomizedConfigV2Args;
import com.pulumi.tencentcloud.ClbCustomizedConfigAttachment;
import com.pulumi.tencentcloud.ClbCustomizedConfigAttachmentArgs;
import com.pulumi.tencentcloud.inputs.ClbCustomizedConfigAttachmentBindListArgs;
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 exampleClbCustomizedConfigV2 = new ClbCustomizedConfigV2("exampleClbCustomizedConfigV2", ClbCustomizedConfigV2Args.builder()
.configContent("""
client_max_body_size 224M;
client_body_timeout 60s; """)
.configName("tf-example")
.configType("LOCATION")
.build());
var exampleClbCustomizedConfigAttachment = new ClbCustomizedConfigAttachment("exampleClbCustomizedConfigAttachment", ClbCustomizedConfigAttachmentArgs.builder()
.configId(exampleClbCustomizedConfigV2.configId())
.bindLists(
ClbCustomizedConfigAttachmentBindListArgs.builder()
.loadBalancerId("lb-g1miv1ok")
.listenerId("lbl-9bsa90io")
.domain("demo1.com")
.locationId("loc-5he3og2u")
.build(),
ClbCustomizedConfigAttachmentBindListArgs.builder()
.loadBalancerId("lb-g1miv1ok")
.listenerId("lbl-qfljudr4")
.domain("demo2.com")
.locationId("loc-0oxl4lfw")
.build())
.build());
}
}
resources:
exampleClbCustomizedConfigV2:
type: tencentcloud:ClbCustomizedConfigV2
properties:
configContent: "client_max_body_size 224M;\r\nclient_body_timeout 60s;"
configName: tf-example
configType: LOCATION
exampleClbCustomizedConfigAttachment:
type: tencentcloud:ClbCustomizedConfigAttachment
properties:
configId: ${exampleClbCustomizedConfigV2.configId}
bindLists:
- loadBalancerId: lb-g1miv1ok
listenerId: lbl-9bsa90io
domain: demo1.com
locationId: loc-5he3og2u
- loadBalancerId: lb-g1miv1ok
listenerId: lbl-qfljudr4
domain: demo2.com
locationId: loc-0oxl4lfw
Create ClbCustomizedConfigAttachment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ClbCustomizedConfigAttachment(name: string, args: ClbCustomizedConfigAttachmentArgs, opts?: CustomResourceOptions);
@overload
def ClbCustomizedConfigAttachment(resource_name: str,
args: ClbCustomizedConfigAttachmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ClbCustomizedConfigAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
bind_lists: Optional[Sequence[ClbCustomizedConfigAttachmentBindListArgs]] = None,
config_id: Optional[str] = None,
clb_customized_config_attachment_id: Optional[str] = None)
func NewClbCustomizedConfigAttachment(ctx *Context, name string, args ClbCustomizedConfigAttachmentArgs, opts ...ResourceOption) (*ClbCustomizedConfigAttachment, error)
public ClbCustomizedConfigAttachment(string name, ClbCustomizedConfigAttachmentArgs args, CustomResourceOptions? opts = null)
public ClbCustomizedConfigAttachment(String name, ClbCustomizedConfigAttachmentArgs args)
public ClbCustomizedConfigAttachment(String name, ClbCustomizedConfigAttachmentArgs args, CustomResourceOptions options)
type: tencentcloud:ClbCustomizedConfigAttachment
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 ClbCustomizedConfigAttachmentArgs
- 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 ClbCustomizedConfigAttachmentArgs
- 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 ClbCustomizedConfigAttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClbCustomizedConfigAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ClbCustomizedConfigAttachmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ClbCustomizedConfigAttachment 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 ClbCustomizedConfigAttachment resource accepts the following input properties:
- Bind
Lists List<ClbCustomized Config Attachment Bind List> - Associated server or location.
- Config
Id string - ID of Customized Config.
- Clb
Customized stringConfig Attachment Id - ID of the resource.
- Bind
Lists []ClbCustomized Config Attachment Bind List Args - Associated server or location.
- Config
Id string - ID of Customized Config.
- Clb
Customized stringConfig Attachment Id - ID of the resource.
- bind
Lists List<ClbCustomized Config Attachment Bind List> - Associated server or location.
- config
Id String - ID of Customized Config.
- clb
Customized StringConfig Attachment Id - ID of the resource.
- bind
Lists ClbCustomized Config Attachment Bind List[] - Associated server or location.
- config
Id string - ID of Customized Config.
- clb
Customized stringConfig Attachment Id - ID of the resource.
- bind_
lists Sequence[ClbCustomized Config Attachment Bind List Args] - Associated server or location.
- config_
id str - ID of Customized Config.
- clb_
customized_ strconfig_ attachment_ id - ID of the resource.
- bind
Lists List<Property Map> - Associated server or location.
- config
Id String - ID of Customized Config.
- clb
Customized StringConfig Attachment Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the ClbCustomizedConfigAttachment 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 ClbCustomizedConfigAttachment Resource
Get an existing ClbCustomizedConfigAttachment 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?: ClbCustomizedConfigAttachmentState, opts?: CustomResourceOptions): ClbCustomizedConfigAttachment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bind_lists: Optional[Sequence[ClbCustomizedConfigAttachmentBindListArgs]] = None,
clb_customized_config_attachment_id: Optional[str] = None,
config_id: Optional[str] = None) -> ClbCustomizedConfigAttachment
func GetClbCustomizedConfigAttachment(ctx *Context, name string, id IDInput, state *ClbCustomizedConfigAttachmentState, opts ...ResourceOption) (*ClbCustomizedConfigAttachment, error)
public static ClbCustomizedConfigAttachment Get(string name, Input<string> id, ClbCustomizedConfigAttachmentState? state, CustomResourceOptions? opts = null)
public static ClbCustomizedConfigAttachment get(String name, Output<String> id, ClbCustomizedConfigAttachmentState state, CustomResourceOptions options)
resources: _: type: tencentcloud:ClbCustomizedConfigAttachment 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.
- Bind
Lists List<ClbCustomized Config Attachment Bind List> - Associated server or location.
- Clb
Customized stringConfig Attachment Id - ID of the resource.
- Config
Id string - ID of Customized Config.
- Bind
Lists []ClbCustomized Config Attachment Bind List Args - Associated server or location.
- Clb
Customized stringConfig Attachment Id - ID of the resource.
- Config
Id string - ID of Customized Config.
- bind
Lists List<ClbCustomized Config Attachment Bind List> - Associated server or location.
- clb
Customized StringConfig Attachment Id - ID of the resource.
- config
Id String - ID of Customized Config.
- bind
Lists ClbCustomized Config Attachment Bind List[] - Associated server or location.
- clb
Customized stringConfig Attachment Id - ID of the resource.
- config
Id string - ID of Customized Config.
- bind_
lists Sequence[ClbCustomized Config Attachment Bind List Args] - Associated server or location.
- clb_
customized_ strconfig_ attachment_ id - ID of the resource.
- config_
id str - ID of Customized Config.
- bind
Lists List<Property Map> - Associated server or location.
- clb
Customized StringConfig Attachment Id - ID of the resource.
- config
Id String - ID of Customized Config.
Supporting Types
ClbCustomizedConfigAttachmentBindList, ClbCustomizedConfigAttachmentBindListArgs
- Domain string
- Domain.
- Listener
Id string - Listener ID.
- Load
Balancer stringId - Clb ID.
- Location
Id string - Location ID.
- Domain string
- Domain.
- Listener
Id string - Listener ID.
- Load
Balancer stringId - Clb ID.
- Location
Id string - Location ID.
- domain String
- Domain.
- listener
Id String - Listener ID.
- load
Balancer StringId - Clb ID.
- location
Id String - Location ID.
- domain string
- Domain.
- listener
Id string - Listener ID.
- load
Balancer stringId - Clb ID.
- location
Id string - Location ID.
- domain str
- Domain.
- listener_
id str - Listener ID.
- load_
balancer_ strid - Clb ID.
- location_
id str - Location ID.
- domain String
- Domain.
- listener
Id String - Listener ID.
- load
Balancer StringId - Clb ID.
- location
Id String - Location ID.
Import
CLB customized config attachment can be imported using the id, e.g.
$ pulumi import tencentcloud:index/clbCustomizedConfigAttachment:ClbCustomizedConfigAttachment example pz-ivj39268
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.