squareops / terraform-kubernetes-mongodb

Terraform module for MongoDB for easy provisioning and management in Kubernetes.
https://squareops.com
Apache License 2.0
16 stars 11 forks source link

AWS example data "aws_eks_cluster" #12

Open OscarGarciaF opened 10 months ago

OscarGarciaF commented 10 months ago

I am sorry but I am having trouble understanding what am I supposed to do on the AWS example providers file

data "aws_eks_cluster" "cluster" {
  name = ""
}

data "aws_eks_cluster_auth" "cluster" {
  name = ""
}

Why can't the provisioning of this cluster be part of the example? What is the expected configuration of this cluster? How does the code change if I provision the cluster in the same script instead of it already existing?

Furthermore, the example page states "Requirements No requirements."

ShibraAmin18 commented 7 months ago
data "aws_eks_cluster" "cluster" {
  name = "cluster-name"
}

data "aws_eks_cluster_auth" "cluster" {
  name = "cluster-name"
}

Hi @OscarGarciaF , You need to provide the name of your kubernetes cluster in the providers file which will enable the terraform provider to authenticate with Kubernetes cluster.

Why can't the provisioning of this cluster be part of the example?

You can provision cluster in the same terraform code of the example directory. This module is specific to provisioning mongodb in kubernetes. For cluster provisioning we have different modules like: https://github.com/squareops/terraform-aws-eks.

Refer to examples for more detailed configuration.

Check more such modules at https://github.com/squareops

Furthermore, the example page states "Requirements No requirements."

This is related to terraform requirements.