feat: better kubeconfig managment

This commit is contained in:
2025-10-30 17:52:26 -03:00
parent eeb3c1c916
commit 2ae1ffd0c3
6 changed files with 42 additions and 36 deletions

View File

@@ -2,7 +2,6 @@
variable "project_name" {
type = string
default = "hideyoshi-portifolio"
}
variable "project_domain" {
@@ -20,17 +19,18 @@ variable "number_of_workers" {
variable "aws_region" {
type = string
default = "sa-east-1"
}
variable "aws_instance_type" {
variable "aws_main_instance_type" {
type = string
}
variable "aws_worker_instance_type" {
type = string
default = "t4g.micro"
}
variable "aws_ami" {
type = string
default = "ami-06a17a87e19be286a"
}
variable "aws_spot_price" {

View File

@@ -72,7 +72,7 @@ resource "aws_security_group" "project_pool" {
resource "aws_instance" "main" {
ami = var.aws_ami
instance_type = var.aws_instance_type
instance_type = var.aws_main_instance_type
vpc_security_group_ids = [aws_security_group.project_pool.id]
key_name = aws_key_pair.ssh_key_main.key_name
@@ -112,7 +112,7 @@ resource "aws_instance" "main" {
resource "aws_instance" "worker" {
ami = var.aws_ami
instance_type = var.aws_instance_type
instance_type = var.aws_worker_instance_type
vpc_security_group_ids = [aws_security_group.project_pool.id]
count = var.number_of_workers