Skip to content

Commit

Permalink
Fix injection of subnet
Browse files Browse the repository at this point in the history
  • Loading branch information
hellais committed Jul 2, 2024
1 parent 7560724 commit 96378a5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions tf/environments/prod/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ module "ansible_controller" {
source = "../../modules/ansible_controller"

vpc_id = module.network.vpc_id
subnet_id = module.network.vpc_subnet_public[0].id
key_name = module.adm_iam_roles.oonidevops_key_name

dns_zone_ooni_io = local.dns_zone_ooni_io
Expand Down
2 changes: 2 additions & 0 deletions tf/modules/ansible_controller/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ resource "aws_instance" "ansible_controller" {
instance_type = var.instance_type
key_name = var.key_name

subnet_id = var.subnet_id

user_data = <<-EOF
#!/bin/bash
apt-get update
Expand Down
5 changes: 5 additions & 0 deletions tf/modules/ansible_controller/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ variable "vpc_id" {
description = "the id of the VPC to deploy the instance into"
}

variable "subnet_id" {
description = "the id of the subnet to deploy the instance into"
}


variable "tags" {
description = "tags to apply to the resources"
default = {}
Expand Down

0 comments on commit 96378a5

Please sign in to comment.