Skip to content

Commit b3d0f2f

Browse files
authored
Feat/tcr doc modify (#1995)
* example readjust: tencentcloud_kubernetes_serverless_node_pool * add pre-commit-local * adjust e2e case * update example * update 1.service account doc. 2.allow cron_setting to modify * add changelog
1 parent fd70932 commit b3d0f2f

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
lines changed

.changelog/1995.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
```release-note:enhancement
2+
resource/tencentcloud_tcr_service_account: update example
3+
```
4+
5+
```release-note:enhancement
6+
resource/tencentcloud_tcr_tag_retention_rule: allow `cron_setting` to be modified
7+
```

tencentcloud/resource_tc_tcr_service_account.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ resource "tencentcloud_tcr_namespace" "example" {
2727
}
2828
}
2929
30-
resource "tencentcloud_tcr_custom_account" "example" {
30+
resource "tencentcloud_tcr_service_account" "example" {
3131
registry_id = tencentcloud_tcr_instance.example.id
3232
name = "tf_example_account"
3333
permissions {
@@ -46,7 +46,7 @@ resource "tencentcloud_tcr_custom_account" "example" {
4646
With specified expiration time
4747
4848
```hcl
49-
resource "tencentcloud_tcr_custom_account" "example" {
49+
resource "tencentcloud_tcr_service_account" "example" {
5050
registry_id = tencentcloud_tcr_instance.example.id
5151
name = "tf_example_account"
5252
permissions {

tencentcloud/resource_tc_tcr_tag_retention_rule.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ func resourceTencentCloudTcrTagRetentionRuleUpdate(d *schema.ResourceData, meta
298298
request.CronSetting = helper.String(v.(string))
299299
}
300300

301-
immutableArgs := []string{"registry_id", "namespace_name", "cron_setting"}
301+
immutableArgs := []string{"registry_id", "namespace_name"}
302302

303303
for _, v := range immutableArgs {
304304
if d.HasChange(v) {

tencentcloud/resource_tc_tcr_tag_retention_rule_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func TestAccTencentCloudTcrTagRetentionRuleResource_basic(t *testing.T) {
5050
resource.TestCheckResourceAttrSet("tencentcloud_tcr_tag_retention_rule.my_rule", "retention_rule.#"),
5151
resource.TestCheckResourceAttr("tencentcloud_tcr_tag_retention_rule.my_rule", "retention_rule.0.key", "nDaysSinceLastPush"),
5252
resource.TestCheckResourceAttr("tencentcloud_tcr_tag_retention_rule.my_rule", "retention_rule.0.value", "2"),
53-
resource.TestCheckResourceAttr("tencentcloud_tcr_tag_retention_rule.my_rule", "cron_setting", "daily"),
53+
resource.TestCheckResourceAttr("tencentcloud_tcr_tag_retention_rule.my_rule", "cron_setting", "weekly"),
5454
resource.TestCheckResourceAttr("tencentcloud_tcr_tag_retention_rule.my_rule", "disabled", "true"),
5555
),
5656
},
@@ -196,7 +196,7 @@ resource "tencentcloud_tcr_tag_retention_rule" "my_rule" {
196196
key = "nDaysSinceLastPush"
197197
value = 2
198198
}
199-
cron_setting = "daily"
199+
cron_setting = "weekly"
200200
disabled = true
201201
}
202202

website/docs/r/tcr_service_account.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ resource "tencentcloud_tcr_namespace" "example" {
3737
}
3838
}
3939
40-
resource "tencentcloud_tcr_custom_account" "example" {
40+
resource "tencentcloud_tcr_service_account" "example" {
4141
registry_id = tencentcloud_tcr_instance.example.id
4242
name = "tf_example_account"
4343
permissions {
@@ -56,7 +56,7 @@ resource "tencentcloud_tcr_custom_account" "example" {
5656
### With specified expiration time
5757

5858
```hcl
59-
resource "tencentcloud_tcr_custom_account" "example" {
59+
resource "tencentcloud_tcr_service_account" "example" {
6060
registry_id = tencentcloud_tcr_instance.example.id
6161
name = "tf_example_account"
6262
permissions {

0 commit comments

Comments
 (0)