Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Hervé Le Meur <[email protected]>
  • Loading branch information
dduportal and lemeurherve authored Aug 8, 2023
1 parent 7c34208 commit 9749472
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions doks-cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ resource "digitalocean_kubernetes_node_pool" "autoscaled-pool" {
}
}

# Data source required as per https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/kubernetes_cluster#kubernetes-terraform-provider-example
# To configure the kuberenetes provider
# Data source required to configure the kubernetes provider as per https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/kubernetes_cluster#kubernetes-terraform-provider-example
data "digitalocean_kubernetes_cluster" "doks" {
name = local.cluster_name
depends_on = [digitalocean_kubernetes_cluster.doks_cluster]
Expand All @@ -63,7 +62,7 @@ provider "kubernetes" {
alias = "doks"
host = data.digitalocean_kubernetes_cluster.doks.kube_config.0.host
cluster_ca_certificate = base64decode(data.digitalocean_kubernetes_cluster.doks.kube_config.0.cluster_ca_certificate)
# Bootstrap requires to use the Digital Ocean API user as no service account or technical user are created in the cluster
# Bootstrap requires to use the DigitalOcean API user as no service account or technical user are created in the cluster
exec {
api_version = "client.authentication.k8s.io/v1beta1"
command = "doctl"
Expand Down
5 changes: 2 additions & 3 deletions doks-public-cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ resource "digitalocean_kubernetes_cluster" "doks_public_cluster" {
}
}

# Data source required as per https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/kubernetes_cluster#kubernetes-terraform-provider-example
# To configure the kuberenetes provider
# Data source required to configure the kubernetes provider as per https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs/resources/kubernetes_cluster#kubernetes-terraform-provider-example
data "digitalocean_kubernetes_cluster" "doks_public" {
name = local.public_cluster_name
depends_on = [digitalocean_kubernetes_cluster.doks_public_cluster]
Expand All @@ -43,7 +42,7 @@ provider "kubernetes" {
alias = "doks_public"
host = data.digitalocean_kubernetes_cluster.doks_public.kube_config.0.host
cluster_ca_certificate = base64decode(data.digitalocean_kubernetes_cluster.doks_public.kube_config.0.cluster_ca_certificate)
# Bootstrap requires to use the Digital Ocean API user as no service account or technical user are created in the cluster
# Bootstrap requires to use the DigitalOcean API user as no service account or technical user are created in the cluster
exec {
api_version = "client.authentication.k8s.io/v1beta1"
command = "doctl"
Expand Down

0 comments on commit 9749472

Please sign in to comment.