Skip to content

Commit d2bd483

Browse files
Merge pull request #37 from MagaluCloud/feat/new-release
chore: new datasources
2 parents 264dd8d + dee2043 commit d2bd483

11 files changed

+557
-397
lines changed
+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "mgc_kubernetes_cluster Data Source - terraform-provider-mgc"
4+
subcategory: "Kubernetes"
5+
description: |-
6+
Data source for Kubernetes cluster in MGC
7+
---
8+
9+
# mgc_kubernetes_cluster (Data Source)
10+
11+
Data source for Kubernetes cluster in MGC
12+
13+
```hcl
14+
data "mgc_kubernetes_cluster" "cluster" {
15+
id = {cluster_ID}
16+
}
17+
```
18+
19+
<!-- schema generated by tfplugindocs -->
20+
21+
## Schema
22+
23+
### Required
24+
25+
- `id` (String) Cluster's UUID.
26+
27+
### Read-Only
28+
29+
- `addons_loadbalance` (String) Flag indicating whether the load balancer service is enabled/disabled in the cluster.
30+
- `addons_secrets` (String) Native Kubernetes secret to be included in the cluster during provisioning.
31+
- `addons_volume` (String) Flag indicating whether the storage class service is configured by default.
32+
- `allowed_cidrs` (List of String) List of allowed CIDR blocks for API server access.
33+
- `cidr` (String) Available IP addresses used for provisioning nodes in the cluster.
34+
- `cluster_name` (String) Name of the node pool.
35+
- `controlplane` (Attributes) Object of the node pool response. (see [below for nested schema](#nestedatt--controlplane))
36+
- `created_at` (String) Creation date of the Kubernetes cluster.
37+
- `description` (String) A brief description of the Kubernetes cluster.
38+
- `enabled_bastion` (Boolean) Indicates if a bastion host is enabled for secure access to the cluster.
39+
- `enabled_server_group` (Boolean) Indicates if a server group with anti-affinity policy is used for the cluster and its node pools.
40+
- `kube_api_disable_api_server_fip` (Boolean) Enables or disables the use of Floating IP on the API Server.
41+
- `kube_api_fixed_ip` (String) Fixed IP configured for the Kubernetes API Server.
42+
- `kube_api_floating_ip` (String) Floating IP created for the Kubernetes API Server.
43+
- `kube_api_port` (Number) Port used by the Kubernetes API Server.
44+
- `message` (String) Detailed message about the status of the cluster or node.
45+
- `name` (String) Kubernetes cluster name.
46+
- `node_pools` (Attributes List) An array representing a set of nodes within a Kubernetes cluster. (see [below for nested schema](#nestedatt--node_pools))
47+
- `project_id` (String, Deprecated) (Deprecated) Unique identifier of the project where the cluster was provisioned.
48+
- `region` (String) Identifier of the region where the Kubernetes cluster is located.
49+
- `state` (String) Current state of the cluster or node.
50+
- `subnet_id` (String) Identifier of the internal subnet where the cluster will be provisioned.
51+
- `updated_at` (String) Date of the last modification of the Kubernetes cluster.
52+
- `version` (String) The native Kubernetes version of the cluster.
53+
- `zone` (String) Identifier of the zone where the Kubernetes cluster is located.
54+
55+
<a id="nestedatt--controlplane"></a>
56+
57+
### Nested Schema for `controlplane`
58+
59+
Read-Only:
60+
61+
- `created_at` (String) Date of creation of the Kubernetes cluster.
62+
- `disk_size` (Number) Size of the disk attached to each node.
63+
- `disk_type` (String) Type of disk attached to each node.
64+
- `flavor_id` (String) Unique identifier for the Flavor.
65+
- `flavor_name` (String) Name of the Flavor.
66+
- `id` (String) Node pool's UUID.
67+
- `labels` (Map of String) Key/value pairs attached to the object and used for specification.
68+
- `max_replicas` (Number) Maximum number of replicas for autoscaling.
69+
- `min_replicas` (Number) Minimum number of replicas for autoscaling.
70+
- `name` (String) Node pool name
71+
- `node_image` (String) Operating system image running on each node.
72+
- `replicas` (Number) Number of replicas of the nodes in the node pool.
73+
- `security_groups` (List of String) Name of the security group to define rules allowing network traffic in the worker node pool.
74+
- `state` (String) Current state of the node pool or control plane.
75+
- `status_messages` (List of String) Detailed message about the status of the node pool or control plane.
76+
- `tags` (List of String) List of tags applied to the node pool.
77+
- `taints` (Attributes List) Property for associating a set of nodes. (see [below for nested schema](#nestedatt--controlplane--taints))
78+
- `updated_at` (String) Date of the last change to the Kubernetes cluster.
79+
- `zone` (List of String) Availability zone for creating the Kubernetes cluster.
80+
81+
<a id="nestedatt--controlplane--taints"></a>
82+
83+
### Nested Schema for `controlplane.taints`
84+
85+
Read-Only:
86+
87+
- `effect` (String) The effect of the taint on pods that do not tolerate the taint.
88+
- `key` (String) Key of the taint to be applied to the node.
89+
- `value` (String) Value corresponding to the taint key.
90+
91+
<a id="nestedatt--node_pools"></a>
92+
93+
### Nested Schema for `node_pools`
94+
95+
Read-Only:
96+
97+
- `created_at` (String) Date of creation of the Kubernetes Node.
98+
- `flavor_name` (String) Definition of the CPU, RAM, and storage capacity of the nodes.
99+
- `id` (String) Node pool's UUID.
100+
- `max_replicas` (Number) Maximum number of replicas for autoscaling.
101+
- `min_replicas` (Number) Minimum number of replicas for autoscaling.
102+
- `name` (String) Name of the node pool.
103+
- `replicas` (Number) Number of replicas of the nodes in the node pool.
104+
- `tags` (List of String) List of tags applied to the node pool.
105+
- `taints` (Attributes List) Property associating a set of nodes. (see [below for nested schema](#nestedatt--node_pools--taints))
106+
- `updated_at` (String) Date of the last change to the Kubernetes Node.
107+
108+
<a id="nestedatt--node_pools--taints"></a>
109+
110+
### Nested Schema for `node_pools.taints`
111+
112+
Read-Only:
113+
114+
- `effect` (String) The effect of the taint on pods that do not tolerate the taint.
115+
- `key` (String) Key of the taint to be applied to the node.
116+
- `value` (String) Value corresponding to the taint key.
+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "mgc_kubernetes_flavor Data Source - terraform-provider-mgc"
4+
subcategory: "Kubernetes"
5+
description: |-
6+
Available flavors for Kubernetes clusters.
7+
---
8+
9+
# mgc_kubernetes_flavor (Data Source)
10+
11+
Available flavors for Kubernetes clusters.
12+
13+
```hcl
14+
data "mgc_kubernetes_flavor" "flavor" {
15+
}
16+
17+
output "flavor_output" {
18+
value = data.mgc_kubernetes_flavor.flavor
19+
}
20+
```
21+
22+
23+
<!-- schema generated by tfplugindocs -->
24+
## Schema
25+
26+
### Read-Only
27+
28+
- `bastion` (Attributes List) Bastion configuration. (see [below for nested schema](#nestedatt--bastion))
29+
- `controlplane` (Attributes List) Control plane configuration. (see [below for nested schema](#nestedatt--controlplane))
30+
- `nodepool` (Attributes List) Node pool configuration. (see [below for nested schema](#nestedatt--nodepool))
31+
32+
<a id="nestedatt--bastion"></a>
33+
### Nested Schema for `bastion`
34+
35+
Read-Only:
36+
37+
- `id` (String) ID of the flavor.
38+
- `name` (String) Name of the flavor.
39+
- `ram` (Number) Amount of RAM in MB.
40+
- `size` (Number) Size of the flavor.
41+
- `vcpu` (Number) Number of virtual CPUs.
42+
43+
44+
<a id="nestedatt--controlplane"></a>
45+
### Nested Schema for `controlplane`
46+
47+
Read-Only:
48+
49+
- `id` (String) ID of the flavor.
50+
- `name` (String) Name of the flavor.
51+
- `ram` (Number) Amount of RAM in MB.
52+
- `size` (Number) Size of the flavor.
53+
- `vcpu` (Number) Number of virtual CPUs.
54+
55+
56+
<a id="nestedatt--nodepool"></a>
57+
### Nested Schema for `nodepool`
58+
59+
Read-Only:
60+
61+
- `id` (String) ID of the flavor.
62+
- `name` (String) Name of the flavor.
63+
- `ram` (Number) Amount of RAM in MB.
64+
- `size` (Number) Size of the flavor.
65+
- `vcpu` (Number) Number of virtual CPUs.

docs/data-sources/kubernetes_node.md

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "mgc_kubernetes_node Data Source - terraform-provider-mgc"
4+
subcategory: "Kubernetes"
5+
description: |-
6+
Data source for Kubernetes cluster in MGC
7+
---
8+
9+
# mgc_kubernetes_node (Data Source)
10+
11+
Data source for Kubernetes cluster in MGC
12+
13+
```hcl
14+
data "mgc_kubernetes_node" "node" {
15+
nodepool_id = mgc_kubernetes_nodepool.gp1_small.id
16+
cluster_id = mgc_kubernetes_cluster.cluster_with_nodepool.id
17+
}
18+
```
19+
20+
21+
<!-- schema generated by tfplugindocs -->
22+
## Schema
23+
24+
### Required
25+
26+
- `cluster_id` (String) ID of the cluster.
27+
- `nodepool_id` (String) ID of the node pool.
28+
29+
### Read-Only
30+
31+
- `nodes` (Attributes List) List of nodes in the cluster. (see [below for nested schema](#nestedatt--nodes))
32+
33+
<a id="nestedatt--nodes"></a>
34+
### Nested Schema for `nodes`
35+
36+
Read-Only:
37+
38+
- `addresses` (Attributes List) List of node addresses. (see [below for nested schema](#nestedatt--nodes--addresses))
39+
- `allocatable_cpu` (String) Allocatable CPU.
40+
- `allocatable_ephemeral_storage` (String) Allocatable ephemeral storage.
41+
- `allocatable_hugepages_1gi` (String) Allocatable hugepages (1Gi).
42+
- `allocatable_hugepages_2mi` (String) Allocatable hugepages (2Mi).
43+
- `allocatable_memory` (String) Allocatable memory.
44+
- `allocatable_pods` (String) Allocatable pods.
45+
- `capacity_cpu` (String) CPU capacity.
46+
- `capacity_ephemeral_storage` (String) Ephemeral storage capacity.
47+
- `capacity_hugepages_1gi` (String) Hugepages capacity (1Gi).
48+
- `capacity_hugepages_2mi` (String) Hugepages capacity (2Mi).
49+
- `capacity_memory` (String) Memory capacity.
50+
- `capacity_pods` (String) Pods capacity.
51+
- `cluster_name` (String) Name of the cluster.
52+
- `created_at` (String) Creation timestamp.
53+
- `flavor` (String) Node flavor.
54+
- `id` (String) Node's UUID.
55+
- `infrastructure_architecture` (String) Node architecture.
56+
- `infrastructure_container_runtime` (String) Container runtime version.
57+
- `infrastructure_kernel_version` (String) Kernel version of the node.
58+
- `infrastructure_kube_proxy_version` (String) Kube-proxy version.
59+
- `infrastructure_kubelet_version` (String) Kubelet version.
60+
- `infrastructure_operating_system` (String) Operating system of the node.
61+
- `infrastructure_os_image` (String) OS image of the node.
62+
- `name` (String) Node name.
63+
- `namespace` (String) Namespace of the node.
64+
- `node_image` (String) Image of the node.
65+
- `nodepool_name` (String) Name of the nodepool.
66+
- `status_message` (String) Status message of the node.
67+
- `status_state` (String) State of the node.
68+
- `taints` (Attributes List) List of node taints. (see [below for nested schema](#nestedatt--nodes--taints))
69+
- `zone` (String) Zone of the node.
70+
71+
<a id="nestedatt--nodes--addresses"></a>
72+
### Nested Schema for `nodes.addresses`
73+
74+
Read-Only:
75+
76+
- `address` (String) The address of the node.
77+
- `type` (String) The type of the address.
78+
79+
80+
<a id="nestedatt--nodes--taints"></a>
81+
### Nested Schema for `nodes.taints`
82+
83+
Read-Only:
84+
85+
- `effect` (String) The effect of the taint.
86+
- `key` (String) The key of the taint.
87+
- `value` (String) The value of the taint.
+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "mgc_kubernetes_nodepool Data Source - terraform-provider-mgc"
4+
subcategory: "Kubernetes"
5+
description: |-
6+
Data source for Kubernetes Nodepool
7+
---
8+
9+
# mgc_kubernetes_nodepool (Data Source)
10+
11+
Data source for Kubernetes Nodepool
12+
13+
```hcl
14+
data "mgc_kubernetes_nodepool" "nodepool" {
15+
id = mgc_kubernetes_nodepool.gp1_small.id
16+
cluster_id = mgc_kubernetes_cluster.cluster_with_nodepool.id
17+
}
18+
```
19+
20+
21+
<!-- schema generated by tfplugindocs -->
22+
## Schema
23+
24+
### Required
25+
26+
- `cluster_id` (String) Cluster UUID.
27+
- `id` (String) Nodepool UUID.
28+
29+
### Read-Only
30+
31+
- `auto_scale_max_replicas` (Number) Maximum number of replicas for auto-scaling.
32+
- `auto_scale_min_replicas` (Number) Minimum number of replicas for auto-scaling.
33+
- `created_at` (String) Creation timestamp.
34+
- `instance_template_disk_size` (Number) Disk size in GB for the instance template.
35+
- `instance_template_disk_type` (String) Disk type for the instance template.
36+
- `instance_template_flavor_id` (String) Flavor ID for the instance template.
37+
- `instance_template_flavor_name` (String) Flavor name for the instance template.
38+
- `instance_template_flavor_ram` (Number) RAM in MB for the instance template flavor.
39+
- `instance_template_flavor_size` (Number) Size in GB for the instance template flavor.
40+
- `instance_template_flavor_vcpu` (Number) Number of vCPUs for the instance template flavor.
41+
- `instance_template_node_image` (String) Node image for the instance template.
42+
- `labels` (Map of String) Labels attached to the nodepool.
43+
- `name` (String) Name of the nodepool.
44+
- `replicas` (Number) Number of replicas.
45+
- `security_groups` (List of String) List of security groups.
46+
- `status_messages` (List of String) Status messages.
47+
- `status_state` (String) Current state of the nodepool.
48+
- `tags` (List of String) List of tags.
49+
- `taints` (Attributes List) List of taints. (see [below for nested schema](#nestedatt--taints))
50+
- `updated_at` (String) Last update timestamp.
51+
- `zone` (List of String) List of zones.
52+
53+
<a id="nestedatt--taints"></a>
54+
### Nested Schema for `taints`
55+
56+
Read-Only:
57+
58+
- `effect` (String) Taint effect.
59+
- `key` (String) Taint key.
60+
- `value` (String) Taint value.
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "mgc_kubernetes_version Data Source - terraform-provider-mgc"
4+
subcategory: "Kubernetes"
5+
description: |-
6+
Get the available versions of Kubernetes.
7+
---
8+
9+
# mgc_kubernetes_version (Data Source)
10+
11+
Get the available versions of Kubernetes.
12+
13+
```hcl
14+
data "mgc_kubernetes_version" "cluster_version" {
15+
}
16+
17+
output "cluster_version_output" {
18+
value = data.mgc_kubernetes_version.cluster_version
19+
}
20+
```
21+
22+
23+
<!-- schema generated by tfplugindocs -->
24+
## Schema
25+
26+
### Read-Only
27+
28+
- `versions` (Attributes List) List of available Kubernetes versions. (see [below for nested schema](#nestedatt--versions))
29+
30+
<a id="nestedatt--versions"></a>
31+
### Nested Schema for `versions`
32+
33+
Read-Only:
34+
35+
- `deprecated` (Boolean) Whether the version is deprecated.
36+
- `version` (String) The Kubernetes version.

0 commit comments

Comments
 (0)