Changed bastion to use the cloudposse module instead of own module
This commit is contained in:
parent
03751ced44
commit
843d920775
41
main.tf
41
main.tf
@ -81,22 +81,37 @@ module "subnets" {
|
|||||||
# #tags = local.tags
|
# #tags = local.tags
|
||||||
#}
|
#}
|
||||||
|
|
||||||
module "bastion" {
|
|
||||||
source = "git@github.com:webuildyourcloud/terraform-aws-bastion.git?ref=tags/0.0.7"
|
|
||||||
enable_bastion = true
|
|
||||||
environment = var.stage
|
|
||||||
project = var.prefix
|
|
||||||
aws_region = var.region
|
|
||||||
key_name = var.keyname
|
|
||||||
instance_type = var.bastion_instance_type
|
|
||||||
subnet_id = element(module.subnets.public_subnet_ids, 0)
|
|
||||||
vpc_id = module.vpc.vpc_id
|
|
||||||
|
|
||||||
tags = {
|
|
||||||
Name = "${var.prefix}-${var.stage}-bastion"
|
module "ec2-bastion-server" {
|
||||||
}
|
source = "cloudposse/ec2-bastion-server/aws"
|
||||||
|
version = "0.28.0"
|
||||||
|
instance_type = var.bastion_instance_type
|
||||||
|
security_groups = compact(concat([module.vpc.vpc_default_security_group_id], var.security_groups))
|
||||||
|
subnets = module.subnets.public_subnet_ids
|
||||||
|
key_name = var.keyname
|
||||||
|
user_data = var.user_data
|
||||||
|
vpc_id = module.vpc.vpc_id
|
||||||
|
associate_public_ip_address = true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#module "bastion" {
|
||||||
|
# source = "git@github.com:webuildyourcloud/terraform-aws-bastion.git?ref=tags/0.0.7"
|
||||||
|
# enable_bastion = true
|
||||||
|
# environment = var.stage
|
||||||
|
# project = var.prefix
|
||||||
|
# aws_region = var.region
|
||||||
|
# key_name = var.keyname
|
||||||
|
# instance_type = var.bastion_instance_type
|
||||||
|
# subnet_id = element(module.subnets.public_subnet_ids, 0)
|
||||||
|
# vpc_id = module.vpc.vpc_id
|
||||||
|
#
|
||||||
|
# tags = {
|
||||||
|
# Name = "${var.prefix}-${var.stage}-bastion"
|
||||||
|
# }
|
||||||
|
#}
|
||||||
|
|
||||||
module "eks_cluster" {
|
module "eks_cluster" {
|
||||||
source = "git@github.com:webuildyourcloud/terraform-aws-eks-cluster.git?ref=tags/0.0.3"
|
source = "git@github.com:webuildyourcloud/terraform-aws-eks-cluster.git?ref=tags/0.0.3"
|
||||||
stage = var.stage
|
stage = var.stage
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user