Skip to content

Commit

Permalink
Merge pull request #47 from Jason-Zhang9309/dev-doc
Browse files Browse the repository at this point in the history
doc: update docs of g42cloud
  • Loading branch information
Jason-Zhang9309 authored Jan 28, 2022
2 parents 9cc76a1 + aa58d98 commit 46a4b5d
Show file tree
Hide file tree
Showing 73 changed files with 2,136 additions and 1,558 deletions.
6 changes: 3 additions & 3 deletions docs/data-sources/availability_zones.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# g42cloud\_availability\_zones
# g42cloud_availability_zones

Use this data source to get a list of availability zones from G42Cloud

Expand All @@ -10,11 +10,11 @@ data "g42cloud_availability_zones" "zones" {}

## Argument Reference

* `region` - (Optional, String) The region in which to obtain the available zones. If omitted, the provider-level region will be used.
* `region` - (Optional, String) The region in which to obtain the available zones. If omitted, the provider-level region
will be used.

* `state` - (Optional, String) The `state` of the availability zones to match, default ("available").


## Attributes Reference

In addition to all arguments above, the following attributes are exported:
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/cce_addon_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
subcategory: "Cloud Container Engine (CCE)"
---

# g42cloud\_cce\_addon\_template
# g42cloud_cce_addon_template

Use this data source to get available G42Cloud CCE add-on template.

Expand Down
71 changes: 45 additions & 26 deletions docs/data-sources/cce_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
subcategory: "Cloud Container Engine (CCE)"
---

# g42cloud\_cce\_cluster
# g42cloud_cce_cluster

Provides details about all clusters and obtains certificate for accessing cluster information.

Expand All @@ -21,68 +21,87 @@ data "g42cloud_cce_cluster" "cluster" {

The following arguments are supported:

* `region` - (Optional, String) The region in which to obtain the cce clusters. If omitted, the provider-level region will be used.
* `region` - (Optional, String) Specifies the region in which to obtain the CCE cluster. If omitted, the provider-level
region will be used.

* `name` - (Optional, String)The Name of the cluster resource.

* `id` - (Optional, String) The ID of container cluster.
* `name` - (Optional, String) Specifies the name of the cluster.

* `status` - (Optional, String) The state of the cluster.
* `id` - (Optional, String) Specifies the ID of the cluster.

* `cluster_type` - (Optional, String) Type of the cluster. Possible values: VirtualMachine, BareMetal.
* `status` - (Optional, String) Specifies the status of the cluster.

* `cluster_type` - (Optional, String) Specifies the type of the cluster. Possible values: **VirtualMachine**, **ARM64**.

* `vpc_id` - (Optional, String) Specifies the VPC ID to which the cluster belongs.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:

* `billingMode` - Charging mode of the cluster.
* `billing_mode` - Charging mode of the cluster.

* `description` - Cluster description.

* `name` - The name of the cluster in string format.

* `flavor_id` - The cluster specification in string format.

* `cluster_version` - The version of cluster in string format.

* `container_network_cidr` - The container network segment.

* `container_network_type` - The container network type: overlay_l2 , underlay_ipvlan, vpc-router or eni.
* `container_network_type` - The container network type: **overlay_l2** , **underlay_ipvlan**, **vpc-router** or **eni**.

* `eni_subnet_id` - Eni subnet id. Specified when creating a CCE Turbo cluster.
* `eni_subnet_id` - ENI subnet ID. Specified when creating a CCE Turbo cluster.

* `eni_subnet_cidr` - Eni network segment. Specified when creating a CCE Turbo cluster.
* `eni_subnet_cidr` - ENI network segment. Specified when creating a CCE Turbo cluster.

* `service_network_cidr` - The service network segment.

* `authentication_mode` - Authentication mode of the cluster, possible values are x509 and rbac. Defaults to *rbac*.
* `authentication_mode` - Authentication mode of the cluster, possible values are x509 and rbac. Defaults to **rbac**.

* `masters` - Advanced configuration of master nodes.
* `masters` - Advanced configuration of master nodes. Structure is documented below.

* `security_group_id` - Security group ID of the cluster.

* `subnet_id` - The ID of the subnet used to create the node.

* `highway_subnet_id` - The ID of the high speed network used to create bare metal nodes.

* `enterprise_project_id` - The enterprise project id of the cce cluster.
* `enterprise_project_id` - The enterprise project ID of the CCE cluster.

**endpoints**
* `endpoints` - The access addresses of kube-apiserver in the cluster. Structure is documented below.

* `internal` - The address accessed within the user's subnet.
* `certificate_clusters` - The certificate clusters. Structure is documented below.

* `external` - Public network access address.
* `certificate_users` - The certificate users. Structure is documented below.

* `certificate_clusters/name` - The cluster name.
* `kube_config_raw` - Raw Kubernetes config to be used by kubectl and other compatible tools.

* `certificate_clusters/server` - The server IP address.
The `masters` block supports:

* `certificate_clusters/certificate_authority_data` - The certificate data.
* `availability_zone` - The availability zone (AZ) of the master node.

* `certificate_users/name` - The user name.
The `endpoints` block supports:

* `certificate_users/client_certificate_data` - The client certificate data.
* `url` - The URL of the cluster access address.

* `certificate_users/client_key_data` - The client key data.
* `type` - The type of the cluster access address.
+ **Internal**: The user's subnet access address.
+ **External**: The public network access address.

* `kube_config_raw` - Raw Kubernetes config to be used by kubectl and other compatible tools.
The `certificate_clusters` block supports:

* `name` - The cluster name.

* `server` - The server IP address.

* `certificate_authority_data` - The certificate data.

The `certificate_users` block supports:

* `name` - The user name.

* `client_certificate_data` - The client certificate data.

* `client_key_data` - The client key data.
44 changes: 23 additions & 21 deletions docs/data-sources/cce_node.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
subcategory: "Cloud Container Engine (CCE)"
---

# g42cloud\_cce\_node
# g42cloud_cce_node

To get the specified node in a cluster.

Expand All @@ -17,56 +17,58 @@ data "g42cloud_cce_node" "node" {
name = var.node_name
}
```

## Argument Reference

The following arguments are supported:

* `region` - (Optional, String) The region in which to obtain the cce nodes. If omitted, the provider-level region will be used.

* `Cluster_id` - (Required, String) The id of container cluster.
* `region` - (Optional, String) Specifies the region in which to obtain the CCE nodes.
If omitted, the provider-level region will be used.

* `name` - (Optional, String) Name of the node.
* `cluster_id` - (Required, String) Specifies the ID of container cluster.

* `node_id` - (Optional, String) The id of the node.
* `name` - (Optional, String) Specifies the name of the node.

* `status` - (Optional, String) The state of the node.
* `node_id` - (Optional, String) Specifies the ID of the node.

* `status` - (Optional, String) Specifies the state of the node.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:

* `flavor_id` - The flavor id to be used.
* `id` - The node ID.

* `flavor_id` - The flavor ID to be used.

* `availability_zone` - Available partitions where the node is located.
* `availability_zone` - Available partitions where the node is located.

* `os` - Operating System of the node.

* `subnet_id` - The ID of the subnet which the NIC belongs to.
* `subnet_id` - The ID of the subnet to which the NIC belongs.

* `esc_group_id` - The ID of Ecs group which the node belongs to.
* `ecs_group_id` - The ID of ECS group to which the node belongs.

* `tags` - Tags of a VM node, key/value pair format.

* `key_pair` - Key pair name when logging in to select the key pair mode.

* `billing_mode` - Node's billing mode: The value is 0 (on demand).

* `server_id` - The node's virtual machine ID in ECS.

* `public_ip` - Elastic IP parameters of the node.

* `private_ip` - Private IP of the node
* `private_ip` - Private IP of the node.

* `root_volume` - It corresponds to the system disk related configuration. Structure is documented below.

* `root_volume` - It corresponds to the system disk related configuration.
* `data_volumes` - Represents the data disk to be created. Structure is documented below.

* `size` - Disk size in GB.
* `volumetype` - Disk type.
* `extend_params` - Disk expansion parameters.
The `root_volume` and `data_volumes` blocks support:

* `data_volumes` - Represents the data disk to be created.
* `size` - Disk size in GB.

* `size` - Disk size in GB.
* `volumetype` - Disk type.
* `extend_params` - Disk expansion parameters.
* `volumetype` - Disk type.

* `extend_params` - Disk expansion parameters.
34 changes: 13 additions & 21 deletions docs/data-sources/cce_node_pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
subcategory: "Cloud Container Engine (CCE)"
---

# g42cloud\_cce\_node\_pool
# g42cloud_cce_node_pool

To get the specified node pool in a cluster.

Expand All @@ -17,22 +17,22 @@ data "g42cloud_cce_node_pool" "node_pool" {
name = var.node_pool_name
}
```

## Argument Reference

The following arguments are supported:

* `region` - (Optional, String) The region in which to obtain the cce node pools.
* `region` - (Optional, String) Specifies the region in which to obtain the CCE node pools.
If omitted, the provider-level region will be used.
* `cluster_id` - (Required, String) Specifies the id of container cluster.

* `cluster_id` - (Required, String) Specifies the ID of container cluster.

* `name` - (Optional, String) Specifies the name of the node pool.

* `node_pool_id` - (Optional, String) Specifies the id of the node pool.
* `node_pool_id` - (Optional, String) Specifies the ID of the node pool.

* `status` - (Optional, String) Specifies the state of the node pool.


## Attributes Reference

In addition to all arguments above, the following attributes are exported:
Expand All @@ -43,10 +43,10 @@ In addition to all arguments above, the following attributes are exported:

* `current_node_count` - Current number of nodes in the node pool.

* `flavor_id` - The flavor id.
* `flavor_id` - The flavor ID.

* `type` - Node Pool type.

* `availability_zone` - The name of the available partition (AZ).

* `os` - Operating System of the node.
Expand All @@ -73,22 +73,14 @@ In addition to all arguments above, the following attributes are exported:

* `tags` - Tags of a VM node, key/value pair format.

* `root_volume` - It corresponds to the system disk related configuration.
* `root_volume` - It corresponds to the system disk related configuration. Structure is documented below.

* `data_volumes` - Represents the data disk to be created.
* `data_volumes` - Represents the data disk to be created. Structure is documented below.

The `root_volume` block supports:
The `root_volume` and `data_volumes` blocks support:

* `size` - Disk size in GB.

* `volumetype` - Disk type.

* `extend_params` - Disk expansion parameters.

The `data_volumes` block supports:

* `size` - Disk size in GB.

* `volumetype` - Disk type.
* `extend_params` - Disk expansion parameters.

* `extend_params` - Disk expansion parameters.
17 changes: 12 additions & 5 deletions docs/data-sources/compute_flavors.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
subcategory: "Elastic Cloud Server (ECS)"
---

# g42cloud\_compute\_flavors
# g42cloud_compute_flavors

Use this data source to get the ID of the available Compute Flavors.

Expand All @@ -29,19 +29,26 @@ resource "g42cloud_compute_instance" "instance" {

In addition to all arguments above, the following attributes are exported:

* `region` - (Optional, String) The region in which to obtain the flavors. If omitted, the provider-level region will be used.
* `region` - (Optional, String) The region in which to obtain the flavors.
If omitted, the provider-level region will be used.

* `availability_zone` - (Optional, String) Specifies the AZ name.

* `performance_type` - (Optional, String) Specifies the ECS flavor type.
* `performance_type` - (Optional, String) Specifies the ECS flavor type. Possible values are as follows:
+ **normal**: General computing
+ **computingv3**: General computing-plus
+ **highmem**: Memory-optimized
+ **saphana**: Large-memory HANA ECS
+ **diskintensive**: Disk-intensive

* `generation` - (Optional, String) Specifies the generation of an ECS type.
* `generation` - (Optional, String) Specifies the generation of an ECS type. For example, **s3** indicates
the general-purpose third-generation ECSs. For details, see
[ECS Specifications](https://docs.g42cloud.com/en-us/usermanual/ecs/en-us_topic_0202842213.html).

* `cpu_core_count` - (Optional, Int) Specifies the number of vCPUs in the ECS flavor.

* `memory_size` - (Optional, Int) Specifies the memory size(GB) in the ECS flavor.


## Attributes Reference

In addition to all arguments above, the following attributes are exported:
Expand Down
16 changes: 9 additions & 7 deletions docs/data-sources/dds_flavors.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,30 @@ data "g42cloud_dds_flavors" "flavor" {

## Argument Reference

* `region` - (Optional, String) Specifies the region in which to obtain the V3 dds client. If omitted, the provider-level region will be used.
* `region` - (Optional, String) Specifies the region in which to obtain the flavors. If omitted,
the provider-level region will be used.

* `engine_name` - (Required, String) Specifies the engine name of the dds, "DDS-Community" and "DDS-Enhanced" are supported.
* `engine_name` - (Required, String) Specifies the engine name of the dds, "DDS-Community" and "DDS-Enhanced" are
supported.

* `type` - (Optional, String) Specifies the type of the dds falvor. "mongos", "shard", "config", "replica" and "single" are supported.
* `type` - (Optional, String) Specifies the type of the dds falvor. "mongos", "shard", "config", "replica" and "single"
are supported.

* `vcpus` - (Optional, String) Specifies the vcpus of the dds flavor.

* `memory` - (Optional, String) Specifies the ram of the dds flavor in GB.


## Attributes Reference

In addition to all arguments above, the following attributes are exported:

* `id` - Specifies a data source ID in UUID format.
* `id` - The data source ID.

* `flavors` - Indicates the flavors information. Structure is documented below.

The `flavors` block contains:

* `spec_code - The name of the rds flavor.
* `spec_code` - The name of the dds flavor.
* `type` - See `type` above.
* `vcpus` - See `vcpus` above.
* `memory` - See 'memory' above.
* `memory` - See `memory` above.
Loading

0 comments on commit 46a4b5d

Please sign in to comment.