Skip to content

Commit 948fa86

Browse files
authored
Merge pull request #512 from brickzzhang/master
[fit to project tag]
2 parents a5398cf + a4026ee commit 948fa86

8 files changed

+14
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ FEATURES:
88
ENHANCEMENTS:
99

1010
* Doc: optimize document directory.
11+
* Resource: `tencentcloud_mongodb_instance`, `tencentcloud_mongodb_sharding_instance` and `tencentcloud_mongodb_standby_instance` remove system reserved tag `project`.
1112

1213
## 1.41.3 (September 3, 2020)
1314

tencentcloud/extension_mongodb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func TencentMongodbBasicInfo() map[string]*schema.Schema {
153153
"tags": {
154154
Type: schema.TypeMap,
155155
Optional: true,
156-
Description: "The tags of the Mongodb.",
156+
Description: "The tags of the Mongodb. Key name `project` is system reserved and can't be used.",
157157
},
158158
// payment
159159
"charge_type": {

tencentcloud/resource_tc_mongodb_instance.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,9 @@ func resourceTencentCloudMongodbInstanceRead(d *schema.ResourceData, meta interf
366366
if tag.TagValue == nil {
367367
return errors.New("mongodb tag value is nil")
368368
}
369+
if *tag.TagKey == "project" {
370+
continue
371+
}
369372

370373
tags[*tag.TagKey] = *tag.TagValue
371374
}

tencentcloud/resource_tc_mongodb_sharding_instance.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,9 @@ func resourceMongodbShardingInstanceRead(d *schema.ResourceData, meta interface{
361361
if tag.TagValue == nil {
362362
return errors.New("mongodb tag value is nil")
363363
}
364+
if *tag.TagKey == "project" {
365+
continue
366+
}
364367

365368
tags[*tag.TagKey] = *tag.TagValue
366369
}

tencentcloud/resource_tc_mongodb_standby_instance.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,9 @@ func resourceTencentCloudMongodbStandbyInstanceRead(d *schema.ResourceData, meta
421421
if tag.TagValue == nil {
422422
return errors.New("mongodb tag value is nil")
423423
}
424+
if *tag.TagKey == "project" {
425+
continue
426+
}
424427

425428
tags[*tag.TagKey] = *tag.TagValue
426429
}

website/docs/r/mongodb_instance.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The following arguments are supported:
4545
* `project_id` - (Optional) ID of the project which the instance belongs.
4646
* `security_groups` - (Optional, ForceNew) ID of the security group. NOTE: for instance which `engine_version` is `MONGO_40_WT`, `security_groups` is not supported.
4747
* `subnet_id` - (Optional, ForceNew) ID of the subnet within this VPC. The value is required if `vpc_id` is set.
48-
* `tags` - (Optional) The tags of the Mongodb.
48+
* `tags` - (Optional) The tags of the Mongodb. Key name `project` is system reserved and can't be used.
4949
* `vpc_id` - (Optional, ForceNew) ID of the VPC.
5050

5151
## Attributes Reference

website/docs/r/mongodb_sharding_instance.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The following arguments are supported:
4949
* `project_id` - (Optional) ID of the project which the instance belongs.
5050
* `security_groups` - (Optional, ForceNew) ID of the security group. NOTE: for instance which `engine_version` is `MONGO_40_WT`, `security_groups` is not supported.
5151
* `subnet_id` - (Optional, ForceNew) ID of the subnet within this VPC. The value is required if `vpc_id` is set.
52-
* `tags` - (Optional) The tags of the Mongodb.
52+
* `tags` - (Optional) The tags of the Mongodb. Key name `project` is system reserved and can't be used.
5353
* `vpc_id` - (Optional, ForceNew) ID of the VPC.
5454

5555
## Attributes Reference

website/docs/r/mongodb_standby_instance.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The following arguments are supported:
7272
* `project_id` - (Optional) ID of the project which the instance belongs.
7373
* `security_groups` - (Optional, ForceNew) ID of the security group. NOTE: for instance which `engine_version` is `MONGO_40_WT`, `security_groups` is not supported.
7474
* `subnet_id` - (Optional, ForceNew) ID of the subnet within this VPC. The value is required if `vpc_id` is set.
75-
* `tags` - (Optional) The tags of the Mongodb.
75+
* `tags` - (Optional) The tags of the Mongodb. Key name `project` is system reserved and can't be used.
7676
* `vpc_id` - (Optional, ForceNew) ID of the VPC.
7777

7878
## Attributes Reference

0 commit comments

Comments
 (0)