Skip to content

Commit

Permalink
Merge pull request #65 from volcengine/feat/optBioosDoc
Browse files Browse the repository at this point in the history
Feat/opt bioos doc
  • Loading branch information
xuyaming0800 authored Feb 21, 2023
2 parents 209200b + e0dd719 commit 3c450e4
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 129 deletions.
2 changes: 1 addition & 1 deletion common/common_volcengine_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package common

const (
TerraformProviderName = "terraform-provider-volcengine"
TerraformProviderVersion = "0.0.54"
TerraformProviderVersion = "0.0.55"
)
2 changes: 1 addition & 1 deletion example/bioosCluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion example/bioosClusterBind/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "volcengine_bioos_cluster_bind" "example" {
workspace_id = "wcfhp1vdeig48u8ufv8sg"
workspace_id = "wcfhp1vdeig48u8ufv8sg" //必填
cluster_id = "ucfhp1nteig48u8ufv8s0" //必填
type = "workflow" //必填, workflow 或 notebook
}
31 changes: 3 additions & 28 deletions volcengine/bioos/cluster/data_source_volcengine_bioos_clusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ 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,
Computed: true,
Description: "The list of cluster.",
Description: "The list of clusters.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"name": {
Expand All @@ -70,38 +70,13 @@ 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,
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,
Expand Down
42 changes: 1 addition & 41 deletions volcengine/bioos/cluster/resource_volcengine_bioos_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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.",
Expand Down
26 changes: 0 additions & 26 deletions volcengine/bioos/cluster/service_volcengine_bioos_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down Expand Up @@ -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",
},
},
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
11 changes: 3 additions & 8 deletions website/docs/d/bioos_clusters.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,16 @@ 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.
* `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.
* `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 Vpc query.
* `total_count` - The total count of Cluster query.


4 changes: 2 additions & 2 deletions website/docs/d/bioos_workspaces.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.


13 changes: 2 additions & 11 deletions website/docs/r/bioos_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/bioos_cluster_bind.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
1 change: 0 additions & 1 deletion website/docs/r/bioos_workspace.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3c450e4

Please sign in to comment.