Skip to content

Commit

Permalink
Merge pull request #142 from Zippo-Wang/feat_upgrade
Browse files Browse the repository at this point in the history
feat(ECS): add dss_pool_id and upgrade version.
  • Loading branch information
Jason-Zhang9309 authored Nov 2, 2023
2 parents f264cb3 + b788548 commit df09970
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 38 deletions.
6 changes: 6 additions & 0 deletions docs/resources/compute_instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ The following arguments are supported:
* `system_disk_kms_key_id` - (Optional, String, ForceNew) Specifies the ID of a KMS key. This is used to encrypt the
system disk. Changing this parameter will create a new resource.

* `system_disk_dss_pool_id` - (Optional, String, ForceNew) Specifies the system disk DSS pool ID. This field is used
only for dedicated storage. Changing this parameter will create a new resource.

* `data_disks` - (Optional, String, ForceNew) Specifies an array of one or more data disks to attach to the instance.
The data_disks object structure is documented below. Changing this creates a new instance.

Expand Down Expand Up @@ -328,6 +331,9 @@ The `data_disks` block supports:
* `kms_key_id` - (Optional, String, ForceNew) Specifies the ID of a KMS key. This is used to encrypt the data disk.
Changing this parameter will create a new resource.

* `dss_pool_id` - (Optional, String, ForceNew) Specifies the data disk DSS pool ID. This field is used
only for dedicated storage. Changing this parameter will create a new resource.

The `bandwidth` block supports:

* `share_type` - (Required, String, ForceNew) Specifies the bandwidth sharing type. Changing this creates a new instance.
Expand Down
18 changes: 10 additions & 8 deletions g42cloud/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"sync"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/lts"
"github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/sfs"

"github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud"
"github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/config"
Expand Down Expand Up @@ -213,13 +215,13 @@ func Provider() *schema.Provider {
"g42cloud_images_image": ims.DataSourceImagesImageV2(),
"g42cloud_images_images": ims.DataSourceImagesImages(),
"g42cloud_kms_key": dew.DataSourceKmsKey(),
"g42cloud_kms_data_key": huaweicloud.DataSourceKmsDataKeyV1(),
"g42cloud_kms_data_key": dew.DataSourceKmsDataKeyV1(),
"g42cloud_modelarts_datasets": modelarts.DataSourceDatasets(),
"g42cloud_modelarts_dataset_versions": modelarts.DataSourceDatasetVerions(),
"g42cloud_modelarts_notebook_images": modelarts.DataSourceNotebookImages(),
"g42cloud_nat_gateway": nat.DataSourcePublicGateway(),
"g42cloud_networking_port": vpc.DataSourceNetworkingPortV2(),
"g42cloud_networking_secgroup": huaweicloud.DataSourceNetworkingSecGroup(),
"g42cloud_networking_secgroup": vpc.DataSourceNetworkingSecGroup(),
"g42cloud_obs_bucket_object": obs.DataSourceObsBucketObject(),

"g42cloud_rms_policy_definitions": rms.DataSourcePolicyDefinitions(),
Expand Down Expand Up @@ -315,7 +317,7 @@ func Provider() *schema.Provider {
"g42cloud_elb_pool": elb.ResourcePoolV3(),
"g42cloud_elb_member": elb.ResourceMemberV3(),
"g42cloud_enterprise_project": eps.ResourceEnterpriseProject(),
"g42cloud_evs_snapshot": huaweicloud.ResourceEvsSnapshotV2(),
"g42cloud_evs_snapshot": evs.ResourceEvsSnapshotV2(),
"g42cloud_evs_volume": evs.ResourceEvsVolume(),
"g42cloud_fgs_function": fgs.ResourceFgsFunctionV2(),
"g42cloud_identity_role_assignment": iam.ResourceIdentityGroupRoleAssignment(),
Expand All @@ -337,8 +339,8 @@ func Provider() *schema.Provider {
"g42cloud_lb_monitor": lb.ResourceMonitorV2(),
"g42cloud_lb_pool": lb.ResourcePoolV2(),
"g42cloud_lb_whitelist": lb.ResourceWhitelistV2(),
"g42cloud_lts_group": huaweicloud.ResourceLTSGroupV2(),
"g42cloud_lts_stream": huaweicloud.ResourceLTSStreamV2(),
"g42cloud_lts_group": lts.ResourceLTSGroup(),
"g42cloud_lts_stream": lts.ResourceLTSStream(),
"g42cloud_mapreduce_cluster": mrs.ResourceMRSClusterV2(),
"g42cloud_mapreduce_job": mrs.ResourceMRSJobV2(),

Expand Down Expand Up @@ -371,7 +373,7 @@ func Provider() *schema.Provider {
"g42cloud_servicestage_environment": servicestage.ResourceEnvironment(),
"g42cloud_servicestage_repo_token_authorization": servicestage.ResourceRepoTokenAuth(),
"g42cloud_servicestage_repo_password_authorization": servicestage.ResourceRepoPwdAuth(),
"g42cloud_sfs_turbo": huaweicloud.ResourceSFSTurbo(),
"g42cloud_sfs_turbo": sfs.ResourceSFSTurbo(),
"g42cloud_smn_subscription": smn.ResourceSubscription(),
"g42cloud_smn_topic": smn.ResourceTopic(),
"g42cloud_sms_server_template": sms.ResourceServerTemplate(),
Expand Down Expand Up @@ -403,8 +405,8 @@ func Provider() *schema.Provider {
"g42cloud_waf_rule_cc_protection": waf.ResourceRuleCCProtection(),
"g42cloud_waf_rule_precise_protection": waf.ResourceRulePreciseProtection(),
"g42cloud_networking_eip_associate": eip.ResourceEIPAssociate(),
"g42cloud_networking_secgroup": huaweicloud.ResourceNetworkingSecGroup(),
"g42cloud_networking_secgroup_rule": huaweicloud.ResourceNetworkingSecGroupRule(),
"g42cloud_networking_secgroup": vpc.ResourceNetworkingSecGroup(),
"g42cloud_networking_secgroup_rule": vpc.ResourceNetworkingSecGroupRule(),
"g42cloud_networking_vip": vpc.ResourceNetworkingVip(),
"g42cloud_networking_vip_associate": vpc.ResourceNetworkingVIPAssociateV2(),
"g42cloud_vpcep_approval": vpcep.ResourceVPCEndpointApproval(),
Expand Down
23 changes: 12 additions & 11 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-20230816083154-a48d61280e1c
github.com/chnsz/golangsdk v0.0.0-20231027080141-c5721e2542e4
github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0
github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.47
github.com/huaweicloud/terraform-provider-huaweicloud v1.54.1
github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.62
github.com/huaweicloud/terraform-provider-huaweicloud v1.57.0
)

require (
Expand All @@ -16,7 +16,7 @@ require (
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
Expand Down Expand Up @@ -52,19 +52,20 @@ require (
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/tjfoc/gmsm v1.4.1 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
github.com/vmihailenco/tagparser v0.1.1 // indirect
github.com/zclconf/go-cty v1.11.0 // indirect
go.mongodb.org/mongo-driver v1.12.0 // indirect
golang.org/x/crypto v0.10.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sys v0.9.0 // indirect
golang.org/x/text v0.10.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/grpc v1.56.3 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit df09970

Please sign in to comment.