diff --git a/modules/main.tf b/modules/main.tf index e8613459..00a4de85 100644 --- a/modules/main.tf +++ b/modules/main.tf @@ -81,3 +81,24 @@ resource "spacelift_version" "spacelift-private-workerpool-version" { module_id = spacelift_module.spacelift-private-workerpool.id version_number = "0.2.0" } + +resource "spacelift_module" "spacelift-private-workerpool" { + github_enterprise { + namespace = "Sage-Bionetworks-Workflows" + id = "sage-bionetworks-workflows-gh" + } + + name = "spacelift-private-workerpool" + terraform_provider = "aws" + administrative = false + branch = "ibcdpe-935-vpc-updates" + description = "Module for the spacelift private workerpool helm chart which deploys the K8s operator" + repository = "eks-stack" + project_root = "modules/spacelift-private-worker" + space_id = "root" +} + +resource "spacelift_version" "spacelift-private-workerpool-version" { + module_id = spacelift_module.spacelift-private-workerpool.id + version_number = "0.1.3" +} diff --git a/modules/spacelift-private-worker/provider.tf b/modules/spacelift-private-worker/provider.tf new file mode 100644 index 00000000..b6449817 --- /dev/null +++ b/modules/spacelift-private-worker/provider.tf @@ -0,0 +1,16 @@ +provider "aws" { + region = var.region +} + +provider "kubernetes" { + config_path = var.kube_config_path + host = data.aws_eks_cluster.cluster.endpoint + cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority[0].data) + token = data.aws_eks_cluster_auth.cluster.token +} + +provider "helm" { + kubernetes { + config_path = var.kube_config_path + } +}