Skip to content

Commit

Permalink
Merge pull request #132 from Jason-Zhang9309/dev-dedicated-storage
Browse files Browse the repository at this point in the history
feat(ecs/sfs): support dedicated storage in evs volume and sfs turbo
  • Loading branch information
Jason-Zhang9309 authored Jul 7, 2023
2 parents 46626fa + 627a856 commit cae6518
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 9 deletions.
17 changes: 16 additions & 1 deletion docs/resources/evs_volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ The following arguments are supported:
* `device_type` - (Optional, String, ForceNew) Specifies the device type of disk to create. Valid options are VBD and
SCSI. Defaults to VBD. Changing this creates a new disk.

* `dedicated_storage_id` - (Optional, String, ForceNew) Specifies the ID of the DSS storage pool accommodating the disk.

* `enterprise_project_id` - (Optional, String, ForceNew) Specifies the enterprise project id of the disk. Changing this
creates a new disk.

Expand All @@ -111,10 +113,23 @@ The following arguments are supported:
In addition to all arguments above, the following attributes are exported:

* `id` - A resource ID in UUID format.

* `attachment` - If a disk is attached to an instance, this attribute will display the Attachment ID, Instance ID, and
the Device as the Instance sees it.
the Device as the Instance sees it. The [object](#attachment_struct) structure is documented below.

* `wwn` - The unique identifier used for mounting the EVS disk.

<a name="attachment_struct"></a>
The `attachment` block supports:

* `id` - The ID of the attachment information.

* `instance_id` - The ID of the server to which the disk is attached.

* `device` - The device name.

* `dedicated_storage_name` - The name of the DSS storage pool accommodating the disk.

## Import

Volumes can be imported using the `id`, e.g.
Expand Down
5 changes: 5 additions & 0 deletions docs/resources/sfs_turbo.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ The following arguments are supported:
* `crypt_key_id` - (Optional, String, ForceNew) Specifies the ID of a KMS key to encrypt the file system. Changing this
will create a new resource.

* `dedicated_flavor` - (Optional, String, ForceNew) Specifies the VM flavor used for creating a dedicated file system.

* `dedicated_storage_id` - (Optional, String, ForceNew) Specifies the ID of the dedicated distributed storage used
when creating a dedicated file system.

* `enterprise_project_id` - (Optional, String, ForceNew) The enterprise project id of the file system. Changing this
will create a new resource.

Expand Down
4 changes: 2 additions & 2 deletions g42cloud/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func Provider() *schema.Provider {
"g42cloud_apig_environments": apig.DataSourceEnvironments(),
"g42cloud_availability_zones": huaweicloud.DataSourceAvailabilityZones(),
"g42cloud_bms_flavors": bms.DataSourceBmsFlavors(),
"g42cloud_cbr_vaults": cbr.DataSourceCbrVaultsV3(),
"g42cloud_cbr_vaults": cbr.DataSourceVaults(),
"g42cloud_cce_cluster": cce.DataSourceCCEClusterV3(),
"g42cloud_cce_node": cce.DataSourceNode(),
"g42cloud_cce_addon_template": cce.DataSourceAddonTemplate(),
Expand Down Expand Up @@ -264,7 +264,7 @@ func Provider() *schema.Provider {
"g42cloud_as_group": as.ResourceASGroup(),
"g42cloud_as_policy": as.ResourceASPolicy(),
"g42cloud_bms_instance": bms.ResourceBmsInstance(),
"g42cloud_cbr_policy": cbr.ResourceCBRPolicyV3(),
"g42cloud_cbr_policy": cbr.ResourcePolicy(),
"g42cloud_cbr_vault": cbr.ResourceVault(),
"g42cloud_cce_cluster": cce.ResourceCCEClusterV3(),
"g42cloud_cce_node": cce.ResourceNode(),
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ module github.com/g42cloud-terraform/terraform-provider-g42cloud
go 1.18

require (
github.com/chnsz/golangsdk v0.0.0-20230525064225-b5b27a428622
github.com/chnsz/golangsdk v0.0.0-20230621084258-643878e3d381
github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0
github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.20
github.com/huaweicloud/terraform-provider-huaweicloud v1.48.1-0.20230527105244-24af11f6b40a
github.com/huaweicloud/terraform-provider-huaweicloud v1.50.1-0.20230626070954-c3f682c64e43
)

require (
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkE
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chnsz/golangsdk v0.0.0-20230525064225-b5b27a428622 h1:oVyHS67CFW8MBFT+hayIwvZXUvRf/v6L+K887idqn44=
github.com/chnsz/golangsdk v0.0.0-20230525064225-b5b27a428622/go.mod h1:j6UR2TfACtmWBEvYrQqTpk5wy3b2QsEdiLkjMoM47j8=
github.com/chnsz/golangsdk v0.0.0-20230621084258-643878e3d381 h1:vD5YWOZF1KbrSq53AStBwxF7F+8QEEUD7u0WxX0eidc=
github.com/chnsz/golangsdk v0.0.0-20230621084258-643878e3d381/go.mod h1:j6UR2TfACtmWBEvYrQqTpk5wy3b2QsEdiLkjMoM47j8=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
Expand Down Expand Up @@ -139,8 +139,8 @@ github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.20 h1:Pyz8ZjJEAel4axFfL3bvPJ0nXg2IAMW2ksZbepyM7KE=
github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.20/go.mod h1:QpZ96CRqyqd5fEODVmnzDNp3IWi5W95BFmWz1nfkq+s=
github.com/huaweicloud/terraform-provider-huaweicloud v1.48.1-0.20230527105244-24af11f6b40a h1:5QP2NrPdrsd9mtbzl6Yv4tQqTHaC2/r6yJlzWYN+Mao=
github.com/huaweicloud/terraform-provider-huaweicloud v1.48.1-0.20230527105244-24af11f6b40a/go.mod h1:VknzHNy2ZlUsT9Sh0vptA8uJv6lC22jqBbuP/OsKLhU=
github.com/huaweicloud/terraform-provider-huaweicloud v1.50.1-0.20230626070954-c3f682c64e43 h1:qDZyzXEkkKmxI6qvprmN3DgU6ibM/G1ue74l5rK89cI=
github.com/huaweicloud/terraform-provider-huaweicloud v1.50.1-0.20230626070954-c3f682c64e43/go.mod h1:KxZVdGskCpSy0OmQDGzfSlMoyCFs0YO/PKshYkvdKgQ=
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
Expand Down

0 comments on commit cae6518

Please sign in to comment.