Added vpc endpoints module to base_infra module

This commit is contained in:
Patrick de Ruiter 2020-08-05 12:59:24 +02:00
parent ba3d8c6458
commit 8449125237
3 changed files with 23 additions and 11 deletions

18
main.tf
View File

@ -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

View File

@ -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 ####

View File

@ -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" {
@ -119,7 +119,7 @@ variable "kubernetes_namespace" {
} }
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"
} }