From 0ae5d1b135a845e6cbea99ca130bc6a3d952fe3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=93=B2=E9=93=AD?= Date: Tue, 21 Feb 2023 10:20:11 +0800 Subject: [PATCH 1/2] feat: opt bioos doc --- example/bioosCluster/main.tf | 2 +- example/bioosClusterBind/main.tf | 2 +- .../data_source_volcengine_bioos_clusters.go | 27 +----------- .../resource_volcengine_bioos_cluster.go | 42 +------------------ .../service_volcengine_bioos_cluster.go | 26 ------------ ...data_source_volcengine_bioos_workspaces.go | 4 +- .../resource_volcengine_bioos_workspace.go | 6 --- website/docs/d/bioos_clusters.html.markdown | 7 +--- website/docs/d/bioos_workspaces.html.markdown | 4 +- website/docs/r/bioos_cluster.html.markdown | 13 +----- .../docs/r/bioos_cluster_bind.html.markdown | 2 +- website/docs/r/bioos_workspace.html.markdown | 1 - 12 files changed, 12 insertions(+), 124 deletions(-) diff --git a/example/bioosCluster/main.tf b/example/bioosCluster/main.tf index fb9819fe..a8cb1cc2 100644 --- a/example/bioosCluster/main.tf +++ b/example/bioosCluster/main.tf @@ -3,7 +3,7 @@ resource "volcengine_bioos_cluster" "foo" { description = "test-description" //选填 # vke_config { //选填,和shared_config二者中必填一个 # cluster_id = "ccerdh8fqtofh16uf6q60" //也可替换成volcengine_vke_cluster.example.id -# storage_class = "ebs" +# storage_class = "ebs-ssd" # } shared_config { enable = true diff --git a/example/bioosClusterBind/main.tf b/example/bioosClusterBind/main.tf index fafcb587..e68ecd06 100644 --- a/example/bioosClusterBind/main.tf +++ b/example/bioosClusterBind/main.tf @@ -1,5 +1,5 @@ resource "volcengine_bioos_cluster_bind" "example" { - workspace_id = "wcfhp1vdeig48u8ufv8sg" + workspace_id = "wcfhp1vdeig48u8ufv8sg" //必填 cluster_id = "ucfhp1nteig48u8ufv8s0" //必填 type = "workflow" //必填, workflow 或 notebook } \ No newline at end of file diff --git a/volcengine/bioos/cluster/data_source_volcengine_bioos_clusters.go b/volcengine/bioos/cluster/data_source_volcengine_bioos_clusters.go index c8462b90..ad0d9d75 100644 --- a/volcengine/bioos/cluster/data_source_volcengine_bioos_clusters.go +++ b/volcengine/bioos/cluster/data_source_volcengine_bioos_clusters.go @@ -49,7 +49,7 @@ func DataSourceVolcengineBioosClusters() *schema.Resource { "total_count": { Type: schema.TypeInt, Computed: true, - Description: "The total count of Vpc query.", + Description: "The total count of Cluster query.", }, "items": { Type: schema.TypeList, @@ -77,31 +77,6 @@ func DataSourceVolcengineBioosClusters() *schema.Resource { Computed: true, Description: "The name of the StorageClass that the vke cluster has installed.", }, - "external_config_wes_endpoint": { - Type: schema.TypeString, - Computed: true, - Description: "The WES endpoint.", - }, - "external_config_jupyterhub_endpoint": { - Type: schema.TypeString, - Computed: true, - Description: "The endpoint of jupyterhub.", - }, - "external_config_jupyterhub_jwt_secret": { - Type: schema.TypeString, - Computed: true, - Description: "The jupyterhub jwt secret.", - }, - "external_config_resource_scheduler": { - Type: schema.TypeString, - Computed: true, - Description: "External Resource Scheduler.", - }, - "external_config_filesystem": { - Type: schema.TypeString, - Computed: true, - Description: "Workflow computing engine file system (currently supports tos, local).", - }, "id": { Type: schema.TypeString, Computed: true, diff --git a/volcengine/bioos/cluster/resource_volcengine_bioos_cluster.go b/volcengine/bioos/cluster/resource_volcengine_bioos_cluster.go index 6093057f..3152dfff 100644 --- a/volcengine/bioos/cluster/resource_volcengine_bioos_cluster.go +++ b/volcengine/bioos/cluster/resource_volcengine_bioos_cluster.go @@ -56,7 +56,7 @@ func ResourceVolcengineBioosCluster() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - Description: "The id of the vke cluster id.", + Description: "The id of the vke cluster.", }, "storage_class": { Type: schema.TypeString, @@ -67,46 +67,6 @@ func ResourceVolcengineBioosCluster() *schema.Resource { }, }, }, - "external_config": { - Type: schema.TypeList, - Description: "The configuration of the external cluster.", - Optional: true, - ForceNew: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "wes_endpoint": { - Type: schema.TypeString, - ForceNew: true, - Required: true, - Description: "The WES endpoint.", - }, - "jupyterhub_endpoint": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - Description: "The endpoint of jupyterhub.", - }, - "jupyterhub_jwt_secret": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - Description: "The jupyterhub jwt secret.", - }, - "resource_scheduler": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - Description: "External Resource Scheduler.", - }, - "filesystem": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - Description: "Workflow computing engine file system (currently supports tos, local).", - }, - }, - }, - }, "shared_config": { Type: schema.TypeList, Description: "The configuration of the shared cluster.", diff --git a/volcengine/bioos/cluster/service_volcengine_bioos_cluster.go b/volcengine/bioos/cluster/service_volcengine_bioos_cluster.go index 32c25964..696a1a54 100644 --- a/volcengine/bioos/cluster/service_volcengine_bioos_cluster.go +++ b/volcengine/bioos/cluster/service_volcengine_bioos_cluster.go @@ -106,17 +106,6 @@ func (s *VolcengineBioosClusterService) CreateResource(data *schema.ResourceData TargetField: "VKEConfig", ConvertType: ve.ConvertJsonObject, }, - "external_config": { - ConvertType: ve.ConvertJsonObject, - NextLevelConvert: map[string]ve.RequestConvert{ - "wes_endpoint": { - TargetField: "ExternalConfig.WESEndpoint", - }, - "jupyterhub_jwt_secret": { - TargetField: "ExternalConfig.JupyterhubJWTSecret", - }, - }, - }, "shared_config": { ConvertType: ve.ConvertJsonObject, }, @@ -211,21 +200,6 @@ func (s *VolcengineBioosClusterService) DatasourceResources(*schema.ResourceData "VKEConfig.StorageClass": { TargetField: "vke_config_storage_class", }, - "ExternalConfig.WESEndpoint": { - TargetField: "external_config_wes_endpoint", - }, - "ExternalConfig.JupyterhubEndpoint": { - TargetField: "external_config_jupyterhub_endpoint", - }, - "ExternalConfig.JupyterhubJWTSecret": { - TargetField: "external_config_jupyterhub_jwt_secret", - }, - "ExternalConfig.ResourceScheduler": { - TargetField: "external_config_resource_scheduler", - }, - "ExternalConfig.Filesystem": { - TargetField: "external_config_filesystem", - }, }, } } diff --git a/volcengine/bioos/workspace/data_source_volcengine_bioos_workspaces.go b/volcengine/bioos/workspace/data_source_volcengine_bioos_workspaces.go index 3f0922c6..b8a8eb06 100644 --- a/volcengine/bioos/workspace/data_source_volcengine_bioos_workspaces.go +++ b/volcengine/bioos/workspace/data_source_volcengine_bioos_workspaces.go @@ -36,12 +36,12 @@ func DataSourceVolcengineBioosWorkspaces() *schema.Resource { "total_count": { Type: schema.TypeInt, Computed: true, - Description: "The total count of Vpc query.", + Description: "The total count of Workspace query.", }, "keyword": { Type: schema.TypeString, Optional: true, - Description: "The name of the workspace.", + Description: "Keyword to filter by workspace name or description.", }, "ids": { Type: schema.TypeSet, diff --git a/volcengine/bioos/workspace/resource_volcengine_bioos_workspace.go b/volcengine/bioos/workspace/resource_volcengine_bioos_workspace.go index f355c998..2494aec0 100644 --- a/volcengine/bioos/workspace/resource_volcengine_bioos_workspace.go +++ b/volcengine/bioos/workspace/resource_volcengine_bioos_workspace.go @@ -43,12 +43,6 @@ func ResourceVolcengineBioosWorkspace() *schema.Resource { Required: true, Description: "The description of the workspace.", }, - "s3_bucket": { - Type: schema.TypeString, - Optional: true, - Computed: true, - Description: "s3 bucket address.", - }, "cover_path": { Type: schema.TypeString, Optional: true, diff --git a/website/docs/d/bioos_clusters.html.markdown b/website/docs/d/bioos_clusters.html.markdown index 1405c972..7d0f77f3 100644 --- a/website/docs/d/bioos_clusters.html.markdown +++ b/website/docs/d/bioos_clusters.html.markdown @@ -27,11 +27,6 @@ In addition to all arguments above, the following attributes are exported: * `items` - The list of cluster. * `bound` - Whether there is a bound workspace. * `description` - The description of the cluster. - * `external_config_filesystem` - Workflow computing engine file system (currently supports tos, local). - * `external_config_jupyterhub_endpoint` - The endpoint of jupyterhub. - * `external_config_jupyterhub_jwt_secret` - The jupyterhub jwt secret. - * `external_config_resource_scheduler` - External Resource Scheduler. - * `external_config_wes_endpoint` - The WES endpoint. * `id` - The id of the bioos cluster. * `name` - The name of the cluster. * `public` - whether it is a public cluster. @@ -39,6 +34,6 @@ In addition to all arguments above, the following attributes are exported: * `stopped_time` - The end time of the cluster. * `vke_config_id` - The id of the vke cluster id. * `vke_config_storage_class` - The name of the StorageClass that the vke cluster has installed. -* `total_count` - The total count of Vpc query. +* `total_count` - The total count of Cluster query. diff --git a/website/docs/d/bioos_workspaces.html.markdown b/website/docs/d/bioos_workspaces.html.markdown index 12fde3a5..e3a4465b 100644 --- a/website/docs/d/bioos_workspaces.html.markdown +++ b/website/docs/d/bioos_workspaces.html.markdown @@ -17,7 +17,7 @@ data "volcengine_bioos_workspaces" "default" { ## Argument Reference The following arguments are supported: * `ids` - (Optional) A list of workspace ids. -* `keyword` - (Optional) The name of the workspace. +* `keyword` - (Optional) Keyword to filter by workspace name or description. * `output_file` - (Optional) File name where to save data source results. * `sort_by` - (Optional) Sort Field (Name CreateTime). * `sort_order` - (Optional) The sort order. @@ -34,6 +34,6 @@ In addition to all arguments above, the following attributes are exported: * `role` - The role of the user. * `s3_bucket` - S3 bucket address. * `update_time` - The update time of the workspace. -* `total_count` - The total count of Vpc query. +* `total_count` - The total count of Workspace query. diff --git a/website/docs/r/bioos_cluster.html.markdown b/website/docs/r/bioos_cluster.html.markdown index 17592125..58cbf218 100644 --- a/website/docs/r/bioos_cluster.html.markdown +++ b/website/docs/r/bioos_cluster.html.markdown @@ -15,7 +15,7 @@ resource "volcengine_bioos_cluster" "foo" { description = "test-description" //选填 # vke_config { //选填,和shared_config二者中必填一个 # cluster_id = "ccerdh8fqtofh16uf6q60" //也可替换成volcengine_vke_cluster.example.id - # storage_class = "ebs" + # storage_class = "ebs-ssd" # } shared_config { enable = true @@ -26,25 +26,16 @@ resource "volcengine_bioos_cluster" "foo" { The following arguments are supported: * `name` - (Required, ForceNew) The name of the cluster. * `description` - (Optional, ForceNew) The description of the cluster. -* `external_config` - (Optional, ForceNew) The configuration of the external cluster. * `shared_config` - (Optional, ForceNew) The configuration of the shared cluster. * `vke_config` - (Optional, ForceNew) The configuration of the vke cluster. -The `external_config` object supports the following: - -* `filesystem` - (Required, ForceNew) Workflow computing engine file system (currently supports tos, local). -* `jupyterhub_endpoint` - (Required, ForceNew) The endpoint of jupyterhub. -* `jupyterhub_jwt_secret` - (Required, ForceNew) The jupyterhub jwt secret. -* `resource_scheduler` - (Required, ForceNew) External Resource Scheduler. -* `wes_endpoint` - (Required, ForceNew) The WES endpoint. - The `shared_config` object supports the following: * `enable` - (Required, ForceNew) Whether to enable a shared cluster. The `vke_config` object supports the following: -* `cluster_id` - (Required, ForceNew) The id of the vke cluster id. +* `cluster_id` - (Required, ForceNew) The id of the vke cluster. * `storage_class` - (Required, ForceNew) The name of the StorageClass that the vke cluster has installed. ## Attributes Reference diff --git a/website/docs/r/bioos_cluster_bind.html.markdown b/website/docs/r/bioos_cluster_bind.html.markdown index 1806b037..3bc1d6d9 100644 --- a/website/docs/r/bioos_cluster_bind.html.markdown +++ b/website/docs/r/bioos_cluster_bind.html.markdown @@ -11,7 +11,7 @@ Provides a resource to manage bioos cluster bind ## Example Usage ```hcl resource "volcengine_bioos_cluster_bind" "example" { - workspace_id = "wcfhp1vdeig48u8ufv8sg" + workspace_id = "wcfhp1vdeig48u8ufv8sg" //必填 cluster_id = "ucfhp1nteig48u8ufv8s0" //必填 type = "workflow" //必填, workflow 或 notebook } diff --git a/website/docs/r/bioos_workspace.html.markdown b/website/docs/r/bioos_workspace.html.markdown index 6e3aa9bc..8f54952f 100644 --- a/website/docs/r/bioos_workspace.html.markdown +++ b/website/docs/r/bioos_workspace.html.markdown @@ -21,7 +21,6 @@ The following arguments are supported: * `description` - (Required) The description of the workspace. * `name` - (Required) The name of the workspace. * `cover_path` - (Optional) Cover path (relative path in tos bucket). -* `s3_bucket` - (Optional) s3 bucket address. ## Attributes Reference In addition to all arguments above, the following attributes are exported: From e0dd71929fa0e710f18dfdaad7d45b66c6945d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=93=B2=E9=93=AD?= Date: Tue, 21 Feb 2023 12:18:16 +0800 Subject: [PATCH 2/2] feat: opt bioos doc --- common/common_volcengine_version.go | 2 +- .../bioos/cluster/data_source_volcengine_bioos_clusters.go | 4 ++-- website/docs/d/bioos_clusters.html.markdown | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/common_volcengine_version.go b/common/common_volcengine_version.go index a3092591..ff46e758 100644 --- a/common/common_volcengine_version.go +++ b/common/common_volcengine_version.go @@ -2,5 +2,5 @@ package common const ( TerraformProviderName = "terraform-provider-volcengine" - TerraformProviderVersion = "0.0.54" + TerraformProviderVersion = "0.0.55" ) diff --git a/volcengine/bioos/cluster/data_source_volcengine_bioos_clusters.go b/volcengine/bioos/cluster/data_source_volcengine_bioos_clusters.go index ad0d9d75..978bdf40 100644 --- a/volcengine/bioos/cluster/data_source_volcengine_bioos_clusters.go +++ b/volcengine/bioos/cluster/data_source_volcengine_bioos_clusters.go @@ -54,7 +54,7 @@ func DataSourceVolcengineBioosClusters() *schema.Resource { "items": { Type: schema.TypeList, Computed: true, - Description: "The list of cluster.", + Description: "The list of clusters.", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "name": { @@ -70,7 +70,7 @@ func DataSourceVolcengineBioosClusters() *schema.Resource { "vke_config_id": { Type: schema.TypeString, Computed: true, - Description: "The id of the vke cluster id.", + Description: "The id of the vke cluster.", }, "vke_config_storage_class": { Type: schema.TypeString, diff --git a/website/docs/d/bioos_clusters.html.markdown b/website/docs/d/bioos_clusters.html.markdown index 7d0f77f3..ec6563ed 100644 --- a/website/docs/d/bioos_clusters.html.markdown +++ b/website/docs/d/bioos_clusters.html.markdown @@ -24,7 +24,7 @@ The following arguments are supported: ## Attributes Reference In addition to all arguments above, the following attributes are exported: -* `items` - The list of cluster. +* `items` - The list of clusters. * `bound` - Whether there is a bound workspace. * `description` - The description of the cluster. * `id` - The id of the bioos cluster. @@ -32,7 +32,7 @@ In addition to all arguments above, the following attributes are exported: * `public` - whether it is a public cluster. * `start_time` - The start time of the cluster. * `stopped_time` - The end time of the cluster. - * `vke_config_id` - The id of the vke cluster id. + * `vke_config_id` - The id of the vke cluster. * `vke_config_storage_class` - The name of the StorageClass that the vke cluster has installed. * `total_count` - The total count of Cluster query.