Skip to content

Commit

Permalink
resource/alicloud_cs_edge_kubernetes: deprecated kubeconfig attribute…
Browse files Browse the repository at this point in the history
…; resource/alicloud_cs_managed_kubernetes: deprecated kubeconfig attribute; resource/alicloud_cs_kubernetes: deprecated kubeconfig attribute; resource/alicloud_cs_serverless_kubernetes: deprecated kubeconfig attribute; docs: deprecated kubeconfig attribute
  • Loading branch information
lijiuxing1 committed Feb 13, 2025
1 parent 9b073f5 commit bc5b714
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 23 deletions.
6 changes: 5 additions & 1 deletion alicloud/resource_alicloud_cs_edge_kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,19 +275,22 @@ func resourceAlicloudCSEdgeKubernetes() *schema.Resource {
"kube_config": {
Type: schema.TypeString,
Optional: true,
Deprecated: "Field 'kube_config' has been deprecated from provider version 1.187.0. New DataSource 'alicloud_cs_cluster_credential' manage your cluster's kube config.",
Deprecated: "Field 'kube_config' has been deprecated from provider version 1.187.0. Please use the attribute 'output_file' of new DataSource 'alicloud_cs_cluster_credential' to replace it.",
},
"client_cert": {
Type: schema.TypeString,
Optional: true,
Deprecated: "Field 'client_cert' has been deprecated from provider version 1.243.0. From version 1.187.0, new DataSource 'alicloud_cs_cluster_credential' is recommended to manage cluster's kubeconfig, you can also save the 'certificate_authority.client_cert' attribute content of new DataSource 'alicloud_cs_cluster_credential' to an appropriate path(like ~/.kube/client-cert.pem) for replace it.",
},
"client_key": {
Type: schema.TypeString,
Optional: true,
Deprecated: "Field 'client_key' has been deprecated from provider version 1.243.0. From version 1.187.0, new DataSource 'alicloud_cs_cluster_credential' is recommended to manage cluster's kubeconfig, you can also save the 'certificate_authority.client_key' attribute content of new DataSource 'alicloud_cs_cluster_credential' to an appropriate path(like ~/.kube/client-key.pem) for replace it.",
},
"cluster_ca_cert": {
Type: schema.TypeString,
Optional: true,
Deprecated: "Field 'cluster_ca_cert' has been deprecated from provider version 1.243.0. From version 1.187.0, new DataSource 'alicloud_cs_cluster_credential' is recommended to manage cluster's kubeconfig, you can also save the 'certificate_authority.cluster_cert' attribute content of new DataSource 'alicloud_cs_cluster_credential' to an appropriate path(like ~/.kube/cluster-ca-cert.pem) for replace it.",
},
"deletion_protection": {
Type: schema.TypeBool,
Expand Down Expand Up @@ -326,6 +329,7 @@ func resourceAlicloudCSEdgeKubernetes() *schema.Resource {
},
},
},
Deprecated: "Field 'certificate_authority' has been deprecated from provider version 1.243.0. Please use the attribute 'certificate_authority' of new DataSource 'alicloud_cs_cluster_credential' to replace it.",
},
"connections": {
Type: schema.TypeMap,
Expand Down
6 changes: 5 additions & 1 deletion alicloud/resource_alicloud_cs_kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,19 +543,22 @@ func resourceAlicloudCSKubernetes() *schema.Resource {
"kube_config": {
Type: schema.TypeString,
Optional: true,
Removed: "Field 'kube_config' has been removed from provider version 1.212.0. New DataSource 'alicloud_cs_cluster_credential' manage your cluster's kube config.",
Removed: "Field 'kube_config' has been removed from provider version 1.212.0. Please use the attribute 'output_file' of new DataSource 'alicloud_cs_cluster_credential' to replace it",
},
"client_cert": {
Type: schema.TypeString,
Optional: true,
Deprecated: "Field 'client_cert' has been deprecated from provider version 1.243.0. From version 1.187.0, new DataSource 'alicloud_cs_cluster_credential' is recommended to manage cluster's kubeconfig, you can also save the 'certificate_authority.client_cert' attribute content of new DataSource 'alicloud_cs_cluster_credential' to an appropriate path(like ~/.kube/client-cert.pem) for replace it.",
},
"client_key": {
Type: schema.TypeString,
Optional: true,
Deprecated: "Field 'client_key' has been deprecated from provider version 1.243.0. From version 1.187.0, new DataSource 'alicloud_cs_cluster_credential' is recommended to manage cluster's kubeconfig, you can also save the 'certificate_authority.client_key' attribute content of new DataSource 'alicloud_cs_cluster_credential' to an appropriate path(like ~/.kube/client-key.pem) for replace it.",
},
"cluster_ca_cert": {
Type: schema.TypeString,
Optional: true,
Deprecated: "Field 'cluster_ca_cert' has been deprecated from provider version 1.243.0. From version 1.187.0, new DataSource 'alicloud_cs_cluster_credential' is recommended to manage cluster's kubeconfig, you can also save the 'certificate_authority.cluster_cert' attribute content of new DataSource 'alicloud_cs_cluster_credential' to an appropriate path(like ~/.kube/cluster-ca-cert.pem) for replace it.",
},
"certificate_authority": {
Type: schema.TypeMap,
Expand All @@ -576,6 +579,7 @@ func resourceAlicloudCSKubernetes() *schema.Resource {
},
},
},
Deprecated: "Field 'certificate_authority' has been deprecated from provider version 1.243.0. Please use the attribute 'certificate_authority' of new DataSource 'alicloud_cs_cluster_credential' to replace it.",
},
"connections": {
Type: schema.TypeMap,
Expand Down
6 changes: 5 additions & 1 deletion alicloud/resource_alicloud_cs_managed_kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,19 +478,22 @@ func resourceAlicloudCSManagedKubernetes() *schema.Resource {
"kube_config": {
Type: schema.TypeString,
Optional: true,
Removed: "Field 'kube_config' has been removed from provider version 1.212.0. New DataSource 'alicloud_cs_cluster_credential' manage your cluster's kube config.",
Removed: "Field 'kube_config' has been removed from provider version 1.212.0. Please use the attribute 'output_file' of new DataSource 'alicloud_cs_cluster_credential' to replace it",
},
"client_cert": {
Type: schema.TypeString,
Optional: true,
Deprecated: "Field 'client_cert' has been deprecated from provider version 1.243.0. From version 1.187.0, new DataSource 'alicloud_cs_cluster_credential' is recommended to manage cluster's kubeconfig, you can also save the 'certificate_authority.client_cert' attribute content of new DataSource 'alicloud_cs_cluster_credential' to an appropriate path(like ~/.kube/client-cert.pem) for replace it.",
},
"client_key": {
Type: schema.TypeString,
Optional: true,
Deprecated: "Field 'client_key' has been deprecated from provider version 1.243.0. From version 1.187.0, new DataSource 'alicloud_cs_cluster_credential' is recommended to manage cluster's kubeconfig, you can also save the 'certificate_authority.client_key' attribute content of new DataSource 'alicloud_cs_cluster_credential' to an appropriate path(like ~/.kube/client-key.pem) for replace it.",
},
"cluster_ca_cert": {
Type: schema.TypeString,
Optional: true,
Deprecated: "Field 'cluster_ca_cert' has been deprecated from provider version 1.243.0. From version 1.187.0, new DataSource 'alicloud_cs_cluster_credential' is recommended to manage cluster's kubeconfig, you can also save the 'certificate_authority.cluster_cert' attribute content of new DataSource 'alicloud_cs_cluster_credential' to an appropriate path(like ~/.kube/cluster-ca-cert.pem) for replace it.",
},
"certificate_authority": {
Type: schema.TypeMap,
Expand All @@ -511,6 +514,7 @@ func resourceAlicloudCSManagedKubernetes() *schema.Resource {
},
},
},
Deprecated: "Field 'certificate_authority' has been deprecated from provider version 1.243.0. Please use the attribute 'certificate_authority' of new DataSource 'alicloud_cs_cluster_credential' to replace it.",
},
"connections": {
Type: schema.TypeMap,
Expand Down
5 changes: 4 additions & 1 deletion alicloud/resource_alicloud_cs_serverless_kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,22 @@ func resourceAlicloudCSServerlessKubernetes() *schema.Resource {
"kube_config": {
Type: schema.TypeString,
Optional: true,
Deprecated: "Field 'kube_config' has been deprecated from provider version 1.187.0. New DataSource 'alicloud_cs_cluster_credential' manage your cluster's kube config.",
Deprecated: "Field 'kube_config' has been deprecated from provider version 1.187.0. Please use the attribute 'output_file' of new DataSource 'alicloud_cs_cluster_credential' to replace it.",
},
"client_cert": {
Type: schema.TypeString,
Optional: true,
Deprecated: "Field 'client_cert' has been deprecated from provider version 1.243.0. From version 1.187.0, new DataSource 'alicloud_cs_cluster_credential' is recommended to manage cluster's kubeconfig, you can also save the 'certificate_authority.client_cert' attribute content of new DataSource 'alicloud_cs_cluster_credential' to an appropriate path(like ~/.kube/client-cert.pem) for replace it.",
},
"client_key": {
Type: schema.TypeString,
Optional: true,
Deprecated: "Field 'client_key' has been deprecated from provider version 1.243.0. From version 1.187.0, new DataSource 'alicloud_cs_cluster_credential' is recommended to manage cluster's kubeconfig, you can also save the 'certificate_authority.client_key' attribute content of new DataSource 'alicloud_cs_cluster_credential' to an appropriate path(like ~/.kube/client-key.pem) for replace it.",
},
"cluster_ca_cert": {
Type: schema.TypeString,
Optional: true,
Deprecated: "Field 'cluster_ca_cert' has been deprecated from provider version 1.243.0. From version 1.187.0, new DataSource 'alicloud_cs_cluster_credential' is recommended to manage cluster's kubeconfig, you can also save the 'certificate_authority.cluster_cert' attribute content of new DataSource 'alicloud_cs_cluster_credential' to an appropriate path(like ~/.kube/cluster-ca-cert.pem) for replace it.",
},
"tags": {
Type: schema.TypeMap,
Expand Down
10 changes: 5 additions & 5 deletions website/docs/r/cs_edge_kubernetes.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,10 @@ resource "alicloud_cs_edge_kubernetes" "default" {

You can set some file paths to save kube_config information, but this way is cumbersome. Since version 1.105.0, we've written it to tf state file. About its use,see export attribute certificate_authority. From version 1.187.0+, new DataSource `alicloud_cs_cluster_credential` is recommended to manage cluster's kube_config.

* `kube_config` - (Optional, Deprecated from v1.187.0) The path of kube config, like `~/.kube/config`.
* `client_cert` - (Optional) The path of client certificate, like `~/.kube/client-cert.pem`.
* `client_key` - (Optional) The path of client key, like `~/.kube/client-key.pem`.
* `cluster_ca_cert` - (Optional) The path of cluster ca certificate, like `~/.kube/cluster-ca-cert.pem`
* `kube_config` - (Optional, Deprecated from v1.187.0) The path of kube config, like ~/.kube/config. Please use the attribute [output_file](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/data-sources/cs_cluster_credential#output_file) of new DataSource `alicloud_cs_cluster_credential` to replace it.
* `client_cert` - (Optional, Deprecated from v1.243.0) From version 1.187.0, new DataSource `alicloud_cs_cluster_credential` is recommended to manage cluster's kubeconfig, you can also save the [certificate_authority.client_cert](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/data-sources/cs_cluster_credential#client_cert) attribute content of new DataSource `alicloud_cs_cluster_credential` to an appropriate path(like ~/.kube/client-cert.pem) for replace it.
* `client_key` - (Optional, Deprecated from v1.243.0) From version 1.187.0, new DataSource `alicloud_cs_cluster_credential` is recommended to manage cluster's kubeconfig, you can also save the [certificate_authority.client_key](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/data-sources/cs_cluster_credential#client_key) attribute content of new DataSource `alicloud_cs_cluster_credential` to an appropriate path(like ~/.kube/client-key.pem) for replace it.
* `cluster_ca_cert` - (Optional, Deprecated from v1.243.0) From version 1.187.0, new DataSource `alicloud_cs_cluster_credential` is recommended to manage cluster's kubeconfig, you can also save the [certificate_authority.cluster_cert](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/data-sources/cs_cluster_credential#cluster_cert) attribute content of new DataSource `alicloud_cs_cluster_credential` to an appropriate path(like ~/.kube/cluster-ca-cert.pem) for replace it.

*Removed params*

Expand Down Expand Up @@ -282,7 +282,7 @@ The following attributes are exported:
* `api_server_intranet` - API Server Intranet endpoint.
* `master_public_ip` - Master node SSH IP address.
* `service_domain` - Service Access Domain.
* `certificate_authority` - (Map, Available since v1.105.0) Nested attribute containing certificate authority data for your cluster.
* `certificate_authority` - (Map, Deprecated from v1.243.0) Nested attribute containing certificate authority data for your cluster. Please use the attribute [certificate_authority](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/data-sources/cs_cluster_credential#certificate_authority) of new DataSource `alicloud_cs_cluster_credential` to replace it.
* `cluster_cert` - The base64 encoded cluster certificate data required to communicate with your cluster. Add this to the certificate-authority-data section of the kubeconfig file for your cluster.
* `client_cert` - The base64 encoded client certificate data required to communicate with your cluster. Add this to the client-certificate-data section of the kubeconfig file for your cluster.
* `client_key` - The base64 encoded client key data required to communicate with your cluster. Add this to the client-key-data section of the kubeconfig file for your cluster.
Expand Down
10 changes: 5 additions & 5 deletions website/docs/r/cs_kubernetes.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,9 @@ If you want to use `Flannel` as CNI network plugin, You need to specify the `pod

*Computed params*

* `client_cert` - (Optional) The path of client certificate, like `~/.kube/client-cert.pem`.
* `client_key` - (Optional) The path of client key, like `~/.kube/client-key.pem`.
* `cluster_ca_cert` - (Optional) The path of cluster ca certificate, like `~/.kube/cluster-ca-cert.pem`
* `client_cert` - (Optional, Deprecated from v1.243.0) From version 1.187.0, new DataSource `alicloud_cs_cluster_credential` is recommended to manage cluster's kubeconfig, you can also save the [certificate_authority.client_cert](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/data-sources/cs_cluster_credential#client_cert) attribute content of new DataSource `alicloud_cs_cluster_credential` to an appropriate path(like ~/.kube/client-cert.pem) for replace it.
* `client_key` - (Optional, Deprecated from v1.243.0) From version 1.187.0, new DataSource `alicloud_cs_cluster_credential` is recommended to manage cluster's kubeconfig, you can also save the [certificate_authority.client_key](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/data-sources/cs_cluster_credential#client_key) attribute content of new DataSource `alicloud_cs_cluster_credential` to an appropriate path(like ~/.kube/client-key.pem) for replace it.
* `cluster_ca_cert` - (Optional, Deprecated from v1.243.0) From version 1.187.0, new DataSource `alicloud_cs_cluster_credential` is recommended to manage cluster's kubeconfig, you can also save the [certificate_authority.cluster_cert](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/data-sources/cs_cluster_credential#cluster_cert) attribute content of new DataSource `alicloud_cs_cluster_credential` to an appropriate path(like ~/.kube/cluster-ca-cert.pem) for replace it.

*Removed params*

Expand All @@ -284,7 +284,7 @@ If you want to use `Flannel` as CNI network plugin, You need to specify the `pod
* `worker_numbers` - (Removed) The number of workers, use `worker_number` to instead it.
* `nodes` - (Removed) The master nodes, use `master_nodes` to instead it.
* `exclude_autoscaler_nodes` - (Removed since v1.212.0) Exclude autoscaler nodes from `worker_nodes`. Default to `false`.
* `kube_config` - (Removed since v1.212.0) The path of kube config, like `~/.kube/config`. You can set some file paths to save kube_config information, but this way is cumbersome. Since version 1.105.0, we've written it to tf state file. About its use,see export attribute certificate_authority. From version 1.187.0+, new DataSource `alicloud_cs_cluster_credential` is recommended to manage cluster's kube_config.
* `kube_config` - (Removed since v1.212.0) The path of kube config, like ~/.kube/config. Please use the attribute [output_file](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/data-sources/cs_cluster_credential#output_file) of new DataSource `alicloud_cs_cluster_credential` to replace it.
* `availability_zone` - (Removed since v1.212.0) The Zone where new kubernetes cluster will be located. If it is not be specified, the `vswitch_ids` should be set, its value will be vswitch's zone.
* `worker_number` - (Removed since v1.212.0) The worker node number of the kubernetes cluster. Default to 3. It is limited up to 50 and if you want to enlarge it, please apply white list or contact with us.
* `worker_vswitch_ids` - (Removed since v1.212.0) The vswitches used by workers.
Expand Down Expand Up @@ -421,7 +421,7 @@ The following attributes are exported:
* `api_server_intranet` - API Server Intranet endpoint.
* `master_public_ip` - Master node SSH IP address.
* `service_domain` - Service Access Domain.
* `certificate_authority` - (Map, Available since v1.105.0) Nested attribute containing certificate authority data for your cluster.
* `certificate_authority` - (Map, Deprecated from v1.243.0) Nested attribute containing certificate authority data for your cluster. Please use the attribute [certificate_authority](https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/data-sources/cs_cluster_credential#certificate_authority) of new DataSource `alicloud_cs_cluster_credential` to replace it.
* `cluster_cert` - The base64 encoded cluster certificate data required to communicate with your cluster. Add this to the certificate-authority-data section of the kubeconfig file for your cluster.
* `client_cert` - The base64 encoded client certificate data required to communicate with your cluster. Add this to the client-certificate-data section of the kubeconfig file for your cluster.
* `client_key` - The base64 encoded client key data required to communicate with your cluster. Add this to the client-key-data section of the kubeconfig file for your cluster.
Expand Down
Loading

0 comments on commit bc5b714

Please sign in to comment.