Skip to content

Commit

Permalink
add ui into wg
Browse files Browse the repository at this point in the history
  • Loading branch information
dfry committed Aug 29, 2021
1 parent 9d265d3 commit dbd966f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
12 changes: 6 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ locals {
}

module "ubuntu-bionic-ami" {
source = "git::https://github.com/mojaloop/iac-shared-modules.git//aws/ami-ubuntu?ref=v1.0.7"
source = "git::https://github.com/mojaloop/iac-shared-modules.git//aws/ami-ubuntu?ref=v1.0.8"
release = "18.04"
}

module "ubuntu-focal-ami" {
source = "git::https://github.com/mojaloop/iac-shared-modules.git//aws/ami-ubuntu?ref=v1.0.7"
source = "git::https://github.com/mojaloop/iac-shared-modules.git//aws/ami-ubuntu?ref=v1.0.8"
release = "20.04"
}

Expand All @@ -26,7 +26,7 @@ data "aws_availability_zones" "available" {
}

module "public_subnets" {
source = "git::https://github.com/mojaloop/iac-shared-modules.git//aws/named-subnets?ref=v1.0.7"
source = "git::https://github.com/mojaloop/iac-shared-modules.git//aws/named-subnets?ref=v1.0.8"
namespace = var.tenant
name = var.tenant
subnet_names = local.all_pub_subnets
Expand All @@ -40,7 +40,7 @@ module "public_subnets" {
}

module "private_subnets" {
source = "git::https://github.com/mojaloop/iac-shared-modules.git//aws/named-subnets?ref=v1.0.7"
source = "git::https://github.com/mojaloop/iac-shared-modules.git//aws/named-subnets?ref=v1.0.8"
namespace = var.tenant
name = var.tenant
subnet_names = local.all_priv_subnets
Expand All @@ -54,7 +54,7 @@ module "private_subnets" {
}

module "gitlab" {
source = "git::https://github.com/mojaloop/iac-shared-modules.git//aws/gitlab?ref=v1.0.7"
source = "git::https://github.com/mojaloop/iac-shared-modules.git//aws/gitlab?ref=v1.0.8"
ami = var.use_latest_ami ? module.ubuntu-focal-ami.id : var.gitlab_ami_list[var.region]
instance_type = "t2.large"
gitlab_runner_size = "c5.2xlarge"
Expand All @@ -70,7 +70,7 @@ module "gitlab" {
}

module "nexus" {
source = "git::https://github.com/mojaloop/iac-shared-modules.git//aws/nexus?ref=v1.0.7"
source = "git::https://github.com/mojaloop/iac-shared-modules.git//aws/nexus?ref=v1.0.8"
ami = var.use_latest_ami ? module.ubuntu-focal-ami.id : var.nexus_ami_list[var.region]
instance_type = var.nexus_instance_type
domain = var.domain
Expand Down
15 changes: 10 additions & 5 deletions wireguard.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,13 @@ resource "aws_security_group" "vpn_sg" {
tags = merge({}, var.tags)
}

resource "random_password" "wireguard_password" {
length = 16
special = true
}

module "wireguard" {
source = "git::https://github.com/mojaloop/iac-shared-modules.git//aws/wg?ref=v1.0.7"
source = "git::https://github.com/mojaloop/iac-shared-modules.git//aws/wg?ref=v1.0.8"

ami_id = var.use_latest_ami ? module.ubuntu-focal-ami.id : var.vpn_ami_list[var.region]
instance_type = var.vpn_instance_type
Expand All @@ -64,14 +69,14 @@ module "wireguard" {
subnet_id = module.public_subnets.named_subnet_ids["management"]["id"]
tags = merge({ Tenant = var.tenant }, var.tags)
ssh_key = tls_private_key.wireguard_provisioner_key.private_key_pem

ui_admin_pw = random_password.wireguard_password.result
}

module "wireguard_users" {
source = "git::https://github.com/mojaloop/iac-shared-modules.git//aws/wg_user?ref=v1.0.7"
/* module "wireguard_users" {
source = "git::https://github.com/mojaloop/iac-shared-modules.git//aws/wg_user?ref=v1.0.8"
dns_server = "10.25.0.2"
wireguard_address = module.wireguard.public_ip
ssh_key = tls_private_key.wireguard_provisioner_key.private_key_pem
id = 4
}
} */

0 comments on commit dbd966f

Please sign in to comment.