Skip to content

Commit

Permalink
rm enterprise_project_id
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-sidelnikov committed Jan 26, 2023
1 parent 1f385ef commit 4ed582e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 23 deletions.
4 changes: 0 additions & 4 deletions docs/resources/dws_cluster_v1.md
Expand Up @@ -63,10 +63,6 @@ The following arguments are supported:
Lowercase letters Uppercase letters Digits Special characters
~!@#%^&*()-_=+|[{}];:,<.>/?

* `enterprise_project_id` - (Optional, String, ForceNew) Specifies the enterprise project id of the dws cluster,
Value 0 indicates the default enterprise project.
Changing this parameter will create a new resource.

* `availability_zone` - (Optional, String, ForceNew) AZ in a cluster.

* `port` - (Optional, Int) Service port of a cluster (8000 to 10000). The default value is 8000.
Expand Down
Expand Up @@ -105,12 +105,6 @@ func ResourceDcsInstanceV1() *schema.Resource {
Default: 3,
ForceNew: true,
},
"enterprise_project_id": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Computed: true,
},
"keep_last_manual_snapshot": {
Type: schema.TypeInt,
Optional: true,
Expand Down Expand Up @@ -224,18 +218,17 @@ func resourceDwsClusterV1Create(ctx context.Context, d *schema.ResourceData, met
}

createOpts := cluster.CreateClusterOpts{
NodeType: d.Get("node_type").(string),
Name: d.Get("name").(string),
NumberOfNode: d.Get("number_of_node").(int),
SubnetId: d.Get("network_id").(string),
SecurityGroupId: d.Get("security_group_id").(string),
VpcId: d.Get("vpc_id").(string),
AvailabilityZone: d.Get("availability_zone").(string),
Port: d.Get("port").(int),
UserName: d.Get("user_name").(string),
UserPwd: d.Get("user_pwd").(string),
NumberOfCn: d.Get("number_of_cn").(int),
EnterpriseProjectId: d.Get("enterprise_project_id").(string),
NodeType: d.Get("node_type").(string),
Name: d.Get("name").(string),
NumberOfNode: d.Get("number_of_node").(int),
SubnetId: d.Get("network_id").(string),
SecurityGroupId: d.Get("security_group_id").(string),
VpcId: d.Get("vpc_id").(string),
AvailabilityZone: d.Get("availability_zone").(string),
Port: d.Get("port").(int),
UserName: d.Get("user_name").(string),
UserPwd: d.Get("user_pwd").(string),
NumberOfCn: d.Get("number_of_cn").(int),
}

if _, ok := d.GetOk("public_ip.0"); ok {
Expand Down Expand Up @@ -294,7 +287,6 @@ func resourceDwsClusterV1Read(_ context.Context, d *schema.ResourceData, meta in
d.Set("vpc_id", v.VpcId),
d.Set("availability_zone", v.AvailabilityZone),
d.Set("port", v.Port),
d.Set("enterprise_project_id", v.EnterpriseProjectId),
d.Set("created", v.Created),
d.Set("recent_event", v.RecentEvent),
d.Set("status", v.Status),
Expand Down

0 comments on commit 4ed582e

Please sign in to comment.