Skip to content

Commit 5e43780

Browse files
committed
data-source/alicloud_resource_manager_accounts: add new attribute deletion_status.
1 parent 26e62ed commit 5e43780

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

alicloud/data_source_alicloud_resource_manager_accounts.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ func dataSourceAliCloudResourceManagerAccounts() *schema.Resource {
9494
Type: schema.TypeString,
9595
Computed: true,
9696
},
97+
"deletion_status": {
98+
Type: schema.TypeString,
99+
Computed: true,
100+
},
97101
},
98102
},
99103
},
@@ -133,7 +137,7 @@ func dataSourceAliCloudResourceManagerAccountsRead(d *schema.ResourceData, meta
133137
for {
134138
wait := incrementalWait(3*time.Second, 3*time.Second)
135139
err = resource.Retry(5*time.Minute, func() *resource.RetryError {
136-
response, err = client.RpcPost("ResourceManager", "2020-03-31", action, nil, request, true)
140+
response, err = client.RpcPost("ResourceDirectoryMaster", "2022-04-19", action, nil, request, true)
137141
if err != nil {
138142
if NeedRetry(err) {
139143
wait()
@@ -190,6 +194,7 @@ func dataSourceAliCloudResourceManagerAccountsRead(d *schema.ResourceData, meta
190194
"join_method": object["JoinMethod"],
191195
"join_time": object["JoinTime"],
192196
"modify_time": object["ModifyTime"],
197+
"deletion_status": object["DeletionStatus"],
193198
}
194199

195200
if v, ok := object["Tags"]; ok {

alicloud/data_source_alicloud_resource_manager_accounts_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ func TestAccAliCloudResourceManagerAccountsDataSource_basic0(t *testing.T) {
8686
"accounts.0.join_method": CHECKSET,
8787
"accounts.0.join_time": CHECKSET,
8888
"accounts.0.modify_time": CHECKSET,
89+
"accounts.0.deletion_status": CHECKSET,
8990
}
9091
}
9192

@@ -219,6 +220,7 @@ func TestAccAliCloudResourceManagerAccountsDataSource_basic1(t *testing.T) {
219220
"accounts.0.join_method": CHECKSET,
220221
"accounts.0.join_time": CHECKSET,
221222
"accounts.0.modify_time": CHECKSET,
223+
"accounts.0.deletion_status": CHECKSET,
222224
}
223225
}
224226

@@ -243,6 +245,7 @@ func dataSourceResourceManagerAccountsConfig(name string) string {
243245
}
244246
245247
data "alicloud_resource_manager_accounts" "test"{
248+
ids = ["1893454309173762"]
246249
}
247250
`, name)
248251
}

website/docs/d/resource_manager_accounts.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,4 @@ The following attributes are exported in addition to the arguments listed above:
5151
* `join_method` - The way in which the member joins the resource directory.
5252
* `join_time` - The time when the member joined the resource directory.
5353
* `modify_time` - The time when the member was modified.
54+
* `deletion_status` - (Available since v1.264.0) The deletion status of the member.

0 commit comments

Comments
 (0)