Skip to content

fix(cdn): [137763127] tencentcloud_cdn_domain header_mode support set #3113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/3113.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/tencentcloud_cdn_domain: `header_mode` support `set`
```
2 changes: 1 addition & 1 deletion tencentcloud/services/cdn/resource_tc_cdn_domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ func ResourceTencentCloudCdnDomain() *schema.Resource {
"header_mode": {
Type: schema.TypeString,
Required: true,
Description: "Http header setting method. The following types are supported: `add`: add a head, if a head already exists, there will be a duplicate head, `del`: delete the head.",
Description: "Http header setting method. The following types are supported: `set`: sets a value for an existing header parameter, a new header parameter, or multiple header parameters. Multiple header parameters will be merged into one; `del`: deletes a header parameter; `add`: adds a header parameter. By default, you can repeat the same action to add the same header parameter, which may affect browser response. Please consider the set operation first.",
},
"header_name": {
Type: schema.TypeString,
Expand Down
112 changes: 56 additions & 56 deletions tencentcloud/services/emr/resource_tc_emr_cluster.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Provide a resource to create a emr cluster.
Provide a resource to create an emr cluster.

Example Usage

Expand All @@ -8,14 +8,14 @@ variable "availability_zone" {
}

data "tencentcloud_instance_types" "cvm4c8m" {
exclude_sold_out=true
cpu_core_count=4
memory_size=8
filter {
name = "instance-charge-type"
values = ["POSTPAID_BY_HOUR"]
}
filter {
exclude_sold_out = true
cpu_core_count = 4
memory_size = 8
filter {
name = "instance-charge-type"
values = ["POSTPAID_BY_HOUR"]
}
filter {
name = "zone"
values = [var.availability_zone]
}
Expand All @@ -41,52 +41,52 @@ resource "tencentcloud_security_group" "emr_sg" {
}

resource "tencentcloud_emr_cluster" "emr_cluster" {
product_id=38
vpc_settings={
vpc_id=tencentcloud_vpc.emr_vpc.id
subnet_id=tencentcloud_subnet.emr_subnet.id
}
softwares = [
"hdfs-2.8.5",
"knox-1.6.1",
"openldap-2.4.44",
"yarn-2.8.5",
"zookeeper-3.6.3",
]
support_ha=0
instance_name="emr-cluster-test"
resource_spec {
master_resource_spec {
mem_size=8192
cpu=4
disk_size=100
disk_type="CLOUD_PREMIUM"
spec="CVM.${data.tencentcloud_instance_types.cvm4c8m.instance_types.0.family}"
storage_type=5
root_size=50
}
core_resource_spec {
mem_size=8192
cpu=4
disk_size=100
disk_type="CLOUD_PREMIUM"
spec="CVM.${data.tencentcloud_instance_types.cvm4c8m.instance_types.0.family}"
storage_type=5
root_size=50
}
master_count=1
core_count=2
}
login_settings={
password="Tencent@cloud123"
}
time_span=3600
time_unit="s"
pay_mode=0
placement_info={
zone=var.availability_zone
project_id=0
}
sg_id=tencentcloud_security_group.emr_sg.id
product_id = 38
vpc_settings = {
vpc_id = tencentcloud_vpc.emr_vpc.id
subnet_id = tencentcloud_subnet.emr_subnet.id
}
softwares = [
"hdfs-2.8.5",
"knox-1.6.1",
"openldap-2.4.44",
"yarn-2.8.5",
"zookeeper-3.6.3",
]
support_ha = 0
instance_name = "emr-cluster-test"
resource_spec {
master_resource_spec {
mem_size = 8192
cpu = 4
disk_size = 100
disk_type = "CLOUD_PREMIUM"
spec = "CVM.${data.tencentcloud_instance_types.cvm4c8m.instance_types.0.family}"
storage_type = 5
root_size = 50
}
core_resource_spec {
mem_size = 8192
cpu = 4
disk_size = 100
disk_type = "CLOUD_PREMIUM"
spec = "CVM.${data.tencentcloud_instance_types.cvm4c8m.instance_types.0.family}"
storage_type = 5
root_size = 50
}
master_count = 1
core_count = 2
}
login_settings = {
password = "Tencent@cloud123"
}
time_span = 3600
time_unit = "s"
pay_mode = 0
placement_info {
zone = var.availability_zone
project_id = 0
}
sg_id = tencentcloud_security_group.emr_sg.id
}
```
2 changes: 1 addition & 1 deletion website/docs/r/cdn_domain.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ The `force_redirect` object of `https_config` supports the following:

The `header_rules` object of `request_header` supports the following:

* `header_mode` - (Required, String) Http header setting method. The following types are supported: `add`: add a head, if a head already exists, there will be a duplicate head, `del`: delete the head.
* `header_mode` - (Required, String) Http header setting method. The following types are supported: `set`: sets a value for an existing header parameter, a new header parameter, or multiple header parameters. Multiple header parameters will be merged into one; `del`: deletes a header parameter; `add`: adds a header parameter. By default, you can repeat the same action to add the same header parameter, which may affect browser response. Please consider the set operation first.
* `header_name` - (Required, String) Http header name.
* `header_value` - (Required, String) Http header value, optional when Mode is `del`, Required when Mode is `add`/`set`.
* `rule_paths` - (Required, List) Matching content under the corresponding type of CacheType: `all`: fill *, `file`: fill in the suffix name, such as jpg, txt, `directory`: fill in the path, such as /xxx/test, `path`: fill in the absolute path, such as /xxx/test.html.
Expand Down
6 changes: 3 additions & 3 deletions website/docs/r/emr_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ layout: "tencentcloud"
page_title: "TencentCloud: tencentcloud_emr_cluster"
sidebar_current: "docs-tencentcloud-resource-emr_cluster"
description: |-
Provide a resource to create a emr cluster.
Provide a resource to create an emr cluster.
---

# tencentcloud_emr_cluster

Provide a resource to create a emr cluster.
Provide a resource to create an emr cluster.

## Example Usage

Expand Down Expand Up @@ -94,7 +94,7 @@ resource "tencentcloud_emr_cluster" "emr_cluster" {
time_span = 3600
time_unit = "s"
pay_mode = 0
placement_info = {
placement_info {
zone = var.availability_zone
project_id = 0
}
Expand Down
Loading