Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master-dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
chengxiangdong committed Mar 29, 2024
2 parents e597d76 + 94d0b00 commit 4d2cc1b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 1 addition & 2 deletions docs/resources/bms_instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ resource "hcs_bms_instance" "test" {
name = var.instance_name
image_id = var.image_id
flavor_id = var.flavor_id
user_id = var.user_id
security_groups = [data.hcs_networking_secgroup.mysecgroup.id]
availability_zone = data.hcs_availability_zones.myaz.names[0]
vpc_id = data.hcs_vpc.myvpc.id
Expand Down Expand Up @@ -83,7 +82,7 @@ The following arguments are supported:
* `flavor_id` - (Required, String, ForceNew) Specifies the flavor ID of the desired flavor for the instance. Changing
this creates a new instance.

* `user_id` - (Required, String, ForceNew) Specifies the user ID. You can obtain the user ID from My Credential on the
* `user_id` - (Optional, String, ForceNew) Specifies the user ID. You can obtain the user ID from My Credential on the
management console. Changing this creates a new instance.

* `availability_zone` - (Required, String, ForceNew) Specifies the availability zone in which to create the instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ type CreateOpts struct {

Name string `json:"name" required:"true"`

MetaData MetaData `json:"metadata" required:"true"`
MetaData MetaData `json:"metadata"`

UserData []byte `json:"-"`

AdminPass string `json:"admin_password,omitempty"`

KeyName string `json:"key_name,omitempty"`

SecurityGroups []SecurityGroup `json:"security_groups,omitempty"`
SecurityGroups []SecurityGroup `json:"security_groups"`

Nics []Nic `json:"nics" required:"true"`

Expand All @@ -41,7 +41,7 @@ type CreateOpts struct {
}

type MetaData struct {
OpSvcUserId string `json:"op_svc_userid" required:"true"`
OpSvcUserId string `json:"op_svc_userid,omitempty"`
BYOL string `json:"BYOL,omitempty"`
AdminPass string `json:"admin_pass,omitempty"`
AgencyName string `json:"agency_name,omitempty"`
Expand Down
3 changes: 2 additions & 1 deletion huaweicloudstack/services/bms/resource_hcs_bms_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ func ResourceBmsInstance() *schema.Resource {
},
"user_id": {
Type: schema.TypeString,
Required: true,
Optional: true,
Computed: true,
ForceNew: true,
},
"nics": {
Expand Down

0 comments on commit 4d2cc1b

Please sign in to comment.