Skip to content

Commit

Permalink
adding the variables back
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarsilva948 committed May 30, 2024
1 parent 9540cd3 commit 88980dc
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bootstrap/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@ data "aws_caller_identity" "current" {}
data "aws_availability_zones" "available" {}

locals {
name = "crossplane-blueprints"
region = "us-east-1"
name = var.name
region = var.region

cluster_version = "1.30"
capacity_type = "SPOT"
cluster_version = var.cluster_version
cluster_name = local.name

vpc_name = local.name
Expand Down Expand Up @@ -122,7 +121,7 @@ module "eks" {
eks_managed_node_groups = {
initial = {
instance_types = ["m6i.large", "m5.large", "m5n.large", "m5zn.large"]
capacity_type = local.capacity_type # defaults to SPOT
capacity_type = var.capacity_type # defaults to SPOT
min_size = 1
max_size = 5
desired_size = 3
Expand Down
24 changes: 24 additions & 0 deletions bootstrap/terraform/variables.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

variable "region" {
description = "AWS region"
type = string
default = "us-east-1"
}

variable "name" {
description = "EKS Cluster Name and the VPC name"
type = string
default = "crossplane-blueprints"
}

variable "cluster_version" {
type = string
description = "Kubernetes Version"
default = "1.30"
}

variable "capacity_type" {
type = string
description = "Capacity SPOT or ON_DEMAND"
default = "SPOT"
}

variable "enable_upjet_aws_provider" {
type = bool
description = "Installs the upjet aws provider"
Expand Down
7 changes: 7 additions & 0 deletions bootstrap/terraform/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,11 @@ terraform {
version = ">= 2.13"
}
}

# ## Used for end-to-end testing on project; update to suit your needs
# backend "s3" {
# bucket = "terraform-crossplane-on-eks-github-actions-state"
# region = "us-east-1"
# key = "e2e/bootstrap/terraform/terraform.tfstate"
# }
}

0 comments on commit 88980dc

Please sign in to comment.