Skip to content

Commit 05d55d5

Browse files
authored
cfs add fs id (#1517)
* cfs add fs id * add changelog
1 parent f1bf3ad commit 05d55d5

File tree

5 files changed

+21
-0
lines changed

5 files changed

+21
-0
lines changed

.changelog/1517.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
```release-note:enhancement
2+
datasource/tencentcloud_cfs_file_systems: add computed fs_id
3+
```
4+
5+
```release-note:enhancement
6+
resource/tencentcloud_cfs_file_system: add computed fs_id
7+
```

tencentcloud/data_source_tc_cfs_file_systems.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ func dataSourceTencentCloudCfsFileSystems() *schema.Resource {
120120
Computed: true,
121121
Description: "IP of the file system.",
122122
},
123+
"fs_id": {
124+
Type: schema.TypeString,
125+
Computed: true,
126+
Description: "Mount root-directory.",
127+
},
123128
},
124129
},
125130
},
@@ -200,6 +205,7 @@ func dataSourceTencentCloudCfsFileSystemsRead(d *schema.ResourceData, meta inter
200205
}
201206
if mountTarget != nil {
202207
mapping["mount_ip"] = mountTarget.IpAddress
208+
mapping["fs_id"] = mountTarget.FSID
203209
}
204210
fileSystemList = append(fileSystemList, mapping)
205211
ids = append(ids, *fileSystem.FileSystemId)

tencentcloud/resource_tc_cfs_file_system.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ func resourceTencentCloudCfsFileSystem() *schema.Resource {
106106
Computed: true,
107107
Description: "Create time of the file system.",
108108
},
109+
"fs_id": {
110+
Type: schema.TypeString,
111+
Computed: true,
112+
Description: "Mount root-directory.",
113+
},
109114
"tags": {
110115
Type: schema.TypeMap,
111116
Optional: true,
@@ -256,6 +261,7 @@ func resourceTencentCloudCfsFileSystemRead(d *schema.ResourceData, meta interfac
256261
_ = d.Set("vpc_id", mountTarget.VpcId)
257262
_ = d.Set("subnet_id", mountTarget.SubnetId)
258263
_ = d.Set("mount_ip", mountTarget.IpAddress)
264+
_ = d.Set("fs_id", mountTarget.FSID)
259265
}
260266

261267
return nil

website/docs/d/cfs_file_systems.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ In addition to all arguments above, the following attributes are exported:
4141
* `availability_zone` - The available zone that the file system locates at.
4242
* `create_time` - Creation time of the file system.
4343
* `file_system_id` - ID of the file system.
44+
* `fs_id` - Mount root-directory.
4445
* `mount_ip` - IP of the file system.
4546
* `name` - Name of the file system.
4647
* `protocol` - Protocol of the file system.

website/docs/r/cfs_file_system.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ In addition to all arguments above, the following attributes are exported:
4444

4545
* `id` - ID of the resource.
4646
* `create_time` - Create time of the file system.
47+
* `fs_id` - Mount root-directory.
4748

4849

4950
## Import

0 commit comments

Comments
 (0)