Skip to content

Commit 311a9cb

Browse files
committed
[fit to project tag]
1. ignore project tag
1 parent 16d2c14 commit 311a9cb

8 files changed

+17
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ FEATURES:
55
* **New Resource**: `tencentcloud_ckafka_topic`
66
* **New Data Source**: `tencentcloud_ckafka_topics`
77

8+
ENHANCEMENTS:
9+
10+
* Resource: `tencentcloud_mongodb_instance`, `tencentcloud_mongodb_sharding_instance` and `tencentcloud_mongodb_standby_instance` remove system reserved tag `project`.
11+
812
## 1.41.3 (September 3, 2020)
913

1014
ENHANCEMENTS:

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. Value `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
@@ -44,7 +44,7 @@ The following arguments are supported:
4444
* `project_id` - (Optional) ID of the project which the instance belongs.
4545
* `security_groups` - (Optional, ForceNew) ID of the security group. NOTE: for instance which `engine_version` is `MONGO_40_WT`, `security_groups` is not supported.
4646
* `subnet_id` - (Optional, ForceNew) ID of the subnet within this VPC. The value is required if `vpc_id` is set.
47-
* `tags` - (Optional) The tags of the Mongodb.
47+
* `tags` - (Optional) The tags of the Mongodb. Value `project` is system reserved and can't be used.
4848
* `vpc_id` - (Optional, ForceNew) ID of the VPC.
4949

5050
## Attributes Reference

website/docs/r/mongodb_sharding_instance.html.markdown

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

5454
## Attributes Reference

website/docs/r/mongodb_standby_instance.html.markdown

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

7777
## Attributes Reference

0 commit comments

Comments
 (0)