diff --git a/docs/data-sources/dedicated_kubernetes_engine_v1.md b/docs/data-sources/dedicated_kubernetes_engine_v1.md new file mode 100644 index 0000000..d33355d --- /dev/null +++ b/docs/data-sources/dedicated_kubernetes_engine_v1.md @@ -0,0 +1,48 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "fptcloud_dedicated_kubernetes_engine_v1 Data Source - terraform-provider-fptcloud" +subcategory: "" +description: |- + Retrieves information about dedicated FKE clusters +--- + +# fptcloud_dedicated_kubernetes_engine_v1 (Data Source) + +Retrieves information about dedicated FKE clusters + + + + +## Schema + +### Required + +- `cluster_id` (String) Cluster ID, as shown on the dashboard, usually has a length of 8 characters +- `vpc_id` (String) VPC ID + +### Read-Only + +- `cluster_name` (String) Cluster name +- `edge_id` (String) Edge ID +- `id` (String) UUID of the cluster +- `ip_private_firewall` (String) IP private firewall +- `ip_public_firewall` (String) IP public firewall +- `k8s_version` (String) Kubernetes version +- `lb_size` (String) Load balancer size +- `master_count` (Number) Number of master node +- `master_disk_size` (Number) Master node disk capacity in GB +- `master_type` (String) ID of the flavor of master node +- `max_pod_per_node` (Number) Max pods per node +- `network_id` (String) Network UUID +- `network_node_prefix` (Number) Network node prefix +- `nfs_disk_size` (Number) NFS disk size +- `nfs_status` (String) NFS status +- `node_dns` (String) DNS server of nodes +- `pod_network` (String) Pod network in CIDR notation +- `region_id` (String) Region ID +- `scale_max` (Number) Maximum number of nodes for autoscaling +- `scale_min` (Number) Minimum number of nodes for autoscaling +- `service_network` (String) Service network in CIDR notation +- `storage_policy` (String) Storage policy +- `worker_disk_size` (Number) Worker node disk capacity in GB +- `worker_type` (String) ID of the flavor of worker node diff --git a/docs/data-sources/managed_kubernetes_engine_v1.md b/docs/data-sources/managed_kubernetes_engine_v1.md new file mode 100644 index 0000000..db833a6 --- /dev/null +++ b/docs/data-sources/managed_kubernetes_engine_v1.md @@ -0,0 +1,53 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "fptcloud_managed_kubernetes_engine_v1 Data Source - terraform-provider-fptcloud" +subcategory: "" +description: |- + Manage managed FKE clusters. +--- + +# fptcloud_managed_kubernetes_engine_v1 (Data Source) + +Manage managed FKE clusters. + + + + +## Schema + +### Required + +- `cluster_name` (String) +- `vpc_id` (String) + +### Read-Only + +- `id` (String) The ID of this resource. +- `k8s_max_pod` (Number) +- `k8s_version` (String) +- `load_balancer_type` (String) +- `network_node_prefix` (Number) +- `pod_network` (String) +- `pod_prefix` (String) +- `pools` (Block List) (see [below for nested schema](#nestedblock--pools)) +- `purpose` (String) +- `range_ip_lb_end` (String) +- `range_ip_lb_start` (String) +- `service_network` (String) +- `service_prefix` (String) + + +### Nested Schema for `pools` + +Read-Only: + +- `auto_scale` (Boolean) +- `is_enable_auto_repair` (Boolean) +- `name` (String) +- `network_id` (String) +- `network_name` (String) +- `scale_max` (Number) +- `scale_min` (Number) +- `storage_profile` (String) +- `worker_disk_size` (Number) +- `worker_type` (String) diff --git a/docs/resources/dedicated_kubernetes_engine_v1.md b/docs/resources/dedicated_kubernetes_engine_v1.md new file mode 100644 index 0000000..8f35710 --- /dev/null +++ b/docs/resources/dedicated_kubernetes_engine_v1.md @@ -0,0 +1,48 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "fptcloud_dedicated_kubernetes_engine_v1 Resource - terraform-provider-fptcloud" +subcategory: "" +description: |- + Manage dedicated FKE clusters. +--- + +# fptcloud_dedicated_kubernetes_engine_v1 (Resource) + +Manage dedicated FKE clusters. + + + + +## Schema + +### Required + +- `cluster_name` (String) Cluster name +- `edge_id` (String) Edge ID +- `ip_private_firewall` (String) IP private firewall +- `ip_public_firewall` (String) IP public firewall +- `k8s_version` (String) Kubernetes version +- `lb_size` (String) Load balancer size +- `master_count` (Number) Number of master nodes +- `master_disk_size` (Number) Disk size of master node in GB +- `master_type` (String) Flavor ID of master node +- `max_pod_per_node` (Number) Max pods per node +- `network_id` (String) Disk size of worker node in GB +- `network_node_prefix` (Number) Network node prefix +- `nfs_disk_size` (Number) NFS disk size +- `nfs_status` (String) NFS status +- `node_dns` (String) DNS server of nodes +- `pod_network` (String) Pod network in CIDR notation +- `region_id` (String) Region ID +- `scale_max` (Number) Maximum number of nodes for autoscaling +- `scale_min` (Number) Minimum number of nodes for autoscaling +- `service_network` (String) Service network in CIDR notation +- `storage_policy` (String) Storage policy +- `vpc_id` (String) VPC ID +- `worker_disk_size` (Number) Disk size of worker node in GB +- `worker_type` (String) Flavor ID of worker node + +### Read-Only + +- `cluster_id` (String) Cluster slug +- `id` (String) Cluster UUID diff --git a/docs/resources/dedicated_kubernetes_engine_v1_state.md b/docs/resources/dedicated_kubernetes_engine_v1_state.md new file mode 100644 index 0000000..61c2ffb --- /dev/null +++ b/docs/resources/dedicated_kubernetes_engine_v1_state.md @@ -0,0 +1,25 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "fptcloud_dedicated_kubernetes_engine_v1_state Resource - terraform-provider-fptcloud" +subcategory: "" +description: |- + Manage dedicated FKE cluster state +--- + +# fptcloud_dedicated_kubernetes_engine_v1_state (Resource) + +Manage dedicated FKE cluster state + + + + +## Schema + +### Required + +- `is_running` (Boolean) +- `vpc_id` (String) + +### Read-Only + +- `id` (String) The ID of this resource. diff --git a/docs/resources/managed_kubernetes_engine_v1.md b/docs/resources/managed_kubernetes_engine_v1.md new file mode 100644 index 0000000..6ebe75e --- /dev/null +++ b/docs/resources/managed_kubernetes_engine_v1.md @@ -0,0 +1,56 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "fptcloud_managed_kubernetes_engine_v1 Resource - terraform-provider-fptcloud" +subcategory: "" +description: |- + Manage managed FKE clusters. +--- + +# fptcloud_managed_kubernetes_engine_v1 (Resource) + +Manage managed FKE clusters. + + + + +## Schema + +### Required + +- `cluster_name` (String) Cluster name +- `k8s_max_pod` (Number) Max pods per node +- `k8s_version` (String) Kubernetes version +- `load_balancer_type` (String) Load balancer type +- `network_node_prefix` (Number) Network node prefix +- `pod_network` (String) Pod network (subnet ID) +- `pod_prefix` (String) Pod network (prefix) +- `purpose` (String) Cluster purpose +- `range_ip_lb_end` (String) IP stop for range of LB +- `range_ip_lb_start` (String) IP start for range of LB +- `service_network` (String) Service network (subnet ID) +- `service_prefix` (String) Service prefix (prefix) +- `vpc_id` (String) VPC ID + +### Optional + +- `pools` (Block List) (see [below for nested schema](#nestedblock--pools)) + +### Read-Only + +- `id` (String) The ID of this resource. + + +### Nested Schema for `pools` + +Required: + +- `auto_scale` (Boolean) Whether to enable autoscaling +- `is_enable_auto_repair` (Boolean) Whether to enable auto-repair +- `name` (String) Pool name +- `network_id` (String) Subnet ID +- `network_name` (String) Subnet name +- `scale_max` (Number) Maximum number of nodes for autoscaling +- `scale_min` (Number) Minimum number of nodes for autoscaling +- `storage_profile` (String) Pool storage profile +- `worker_disk_size` (Number) Worker disk size +- `worker_type` (String) Worker flavor ID diff --git a/fptcloud/mfke/mfke_descriptions.go b/fptcloud/mfke/mfke_descriptions.go new file mode 100644 index 0000000..3eb4dfc --- /dev/null +++ b/fptcloud/mfke/mfke_descriptions.go @@ -0,0 +1,29 @@ +package fptcloud_mfke + +var descriptions = map[string]string{ + "vpc_id": "VPC ID", + "cluster_name": "Cluster name", + "k8s_version": "Kubernetes version", + "purpose": "Cluster purpose", + "pod_network": "Pod network (subnet ID)", + "pod_prefix": "Pod network (prefix)", + "service_network": "Service network (subnet ID)", + "service_prefix": "Service prefix (prefix)", + "range_ip_lb_start": "IP start for range of LB", + "range_ip_lb_end": "IP stop for range of LB", + "load_balancer_type": "Load balancer type", + + "k8s_max_pod": "Max pods per node", + "network_node_prefix": "Network node prefix", + + "name": "Pool name", + "storage_profile": "Pool storage profile", + "worker_type": "Worker flavor ID", + "network_name": "Subnet name", + "network_id": "Subnet ID", + "worker_disk_size": "Worker disk size", + "scale_min": "Minimum number of nodes for autoscaling", + "scale_max": "Maximum number of nodes for autoscaling", + "auto_scale": "Whether to enable autoscaling", + "is_enable_auto_repair": "Whether to enable auto-repair", +} diff --git a/main.go b/main.go index 22bf931..88eed1c 100644 --- a/main.go +++ b/main.go @@ -11,6 +11,8 @@ import ( "terraform-provider-fptcloud/fptcloud" ) +//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs generate -provider-name terraform-provider-fptcloud + func main() { ctx := context.Background() var debugMode bool = true