Added vpc endpoints module to base_infra module
This commit is contained in:
parent
ba3d8c6458
commit
8449125237
18
main.tf
18
main.tf
@ -52,6 +52,18 @@ module "subnets" {
|
|||||||
tags = local.tags
|
tags = local.tags
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module "vpc_endpoints" {
|
||||||
|
#count = var.enable_s3_endpoint ? 1 : 0
|
||||||
|
#source = "git@github.com:webuildyourcloud/terraform-aws-vpc_endpoints.git?ref=tags/0.18.1"
|
||||||
|
source = "git@github.com:webuildyourcloud/terraform-aws-vpc_endpoints.git"
|
||||||
|
#region = var.region
|
||||||
|
#name = var.name
|
||||||
|
vpc_id = module.vpc.vpc_id
|
||||||
|
private_route_table_id = module.subnets.private_route_table_ids
|
||||||
|
public_route_table_id = module.subnets.public_route_table_ids
|
||||||
|
#tags = local.tags
|
||||||
|
}
|
||||||
|
|
||||||
module "bastion" {
|
module "bastion" {
|
||||||
source = "git@github.com:webuildyourcloud/terraform-aws-bastion.git"
|
source = "git@github.com:webuildyourcloud/terraform-aws-bastion.git"
|
||||||
enable_bastion = true
|
enable_bastion = true
|
||||||
@ -81,13 +93,13 @@ module "eks_cluster" {
|
|||||||
kubeconfig_path = var.kubeconfig_path
|
kubeconfig_path = var.kubeconfig_path
|
||||||
oidc_provider_enabled = var.oidc_provider_enabled
|
oidc_provider_enabled = var.oidc_provider_enabled
|
||||||
|
|
||||||
workers_role_arns = [module.eks_node_group.eks_node_group_role_arn]
|
workers_role_arns = [module.eks_node_group.eks_node_group_role_arn]
|
||||||
workers_security_group_ids = [module.eks_cluster.workers_security_group_ids]
|
workers_security_group_ids = [module.eks_cluster.workers_security_group_ids]
|
||||||
aws_eks_update_kubeconfig_additional_arguments = var.aws_eks_update_kubeconfig_additional_arguments
|
aws_eks_update_kubeconfig_additional_arguments = var.aws_eks_update_kubeconfig_additional_arguments
|
||||||
}
|
}
|
||||||
|
|
||||||
module "eks_node_group" {
|
module "eks_node_group" {
|
||||||
source = "git@github.com:webuildyourcloud/terraform-aws-eks_node_group.git"
|
source = "git@github.com:webuildyourcloud/terraform-aws-eks_node_group.git"
|
||||||
stage = var.stage
|
stage = var.stage
|
||||||
name = var.name
|
name = var.name
|
||||||
attributes = var.attributes
|
attributes = var.attributes
|
||||||
|
|||||||
@ -10,11 +10,11 @@ output "private_subnet_cidrs" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
output "public_subnet_ids" {
|
output "public_subnet_ids" {
|
||||||
value = module.subnets.public_subnet_ids
|
value = module.subnets.public_subnet_ids
|
||||||
}
|
}
|
||||||
|
|
||||||
output "private_subnet_ids" {
|
output "private_subnet_ids" {
|
||||||
value = module.subnets.private_subnet_ids
|
value = module.subnets.private_subnet_ids
|
||||||
}
|
}
|
||||||
|
|
||||||
#### vpc module outputs ####
|
#### vpc module outputs ####
|
||||||
@ -26,7 +26,7 @@ output "vpc_cidr_block" {
|
|||||||
output "vpc_id" {
|
output "vpc_id" {
|
||||||
value = module.vpc.vpc_id
|
value = module.vpc.vpc_id
|
||||||
description = "VPC ID Main VPC"
|
description = "VPC ID Main VPC"
|
||||||
}
|
}
|
||||||
|
|
||||||
#### eks_cluster outputs ####
|
#### eks_cluster outputs ####
|
||||||
output "eks_cluster_id" {
|
output "eks_cluster_id" {
|
||||||
|
|||||||
10
variables.tf
10
variables.tf
@ -4,7 +4,7 @@ variable "region" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
variable "availability_zones" {
|
variable "availability_zones" {
|
||||||
type = list(string)
|
type = list(string)
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "vpc_cidr_block" {
|
variable "vpc_cidr_block" {
|
||||||
@ -47,12 +47,12 @@ variable "tags" {
|
|||||||
|
|
||||||
### Bastion Server Settings ###
|
### Bastion Server Settings ###
|
||||||
variable "bastion_instance_type" {
|
variable "bastion_instance_type" {
|
||||||
type = string
|
type = string
|
||||||
description = "EC2 type for bastion"
|
description = "EC2 type for bastion"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "bastion_ami" {
|
variable "bastion_ami" {
|
||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "keyname" {
|
variable "keyname" {
|
||||||
@ -116,10 +116,10 @@ variable "kubernetes_namespace" {
|
|||||||
type = string
|
type = string
|
||||||
default = "kube-apps"
|
default = "kube-apps"
|
||||||
description = "Kubernetes namespace to run your fargate workloads on"
|
description = "Kubernetes namespace to run your fargate workloads on"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "aws_eks_update_kubeconfig_additional_arguments" {
|
variable "aws_eks_update_kubeconfig_additional_arguments" {
|
||||||
type = string
|
type = string
|
||||||
default = null
|
default = null
|
||||||
description = "Additional arguments for `aws eks update-kubeconfig` command, e.g. `--role-arn xxxxxxxxx`. For more info, see https://docs.aws.amazon.com/cli/latest/reference/eks/update-kubeconfig.html"
|
description = "Additional arguments for `aws eks update-kubeconfig` command, e.g. `--role-arn xxxxxxxxx`. For more info, see https://docs.aws.amazon.com/cli/latest/reference/eks/update-kubeconfig.html"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user