xOpsDemo/terraform.tf

53 lines
1012 B
HCL

# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
data "aws_eks_cluster" "xOps" {
name = "xOps"
}
terraform {
backend "s3" {
bucket = "terraform-xops-demos"
key = "demo"
region = "us-west-2"
dynamodb_table = "terraform-xops-lock-state"
encrypt = true
}
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.7.0"
}
helm = {
version = "2.11.0"
}
}
required_version = "~> 1.3"
}
provider "aws" {
region = "us-west-2"
}
provider "helm" {
# kubernetes {
# host = data.aws_eks_cluster.xOps.endpoint
# cluster_ca_certificate = base64decode(data.aws_eks_cluster.xOps.certificate_authority[0].data)
# exec {
# api_version = "client.authentication.k8s.io/v1beta1"
# args = ["eks", "get-token", "--cluster-name", data.aws_eks_cluster.xOps.name]
# command = "aws"
# }
# }
}