diff --git a/.github/workflows/github_networks.tf b/.github/workflows/github_networks.tf index d5a0db0..4db9025 100644 --- a/.github/workflows/github_networks.tf +++ b/.github/workflows/github_networks.tf @@ -1,11 +1,11 @@ resource "aws_vpc" "Main" { cidr_block = var.main_vpc_cidr - tags = var.instance_tags + tags = var.instance_tags } resource "aws_internet_gateway" "IGW" { vpc_id = aws_vpc.Main.id tags = { - Name = "${var.namespace}-IGW" + Name = "${var.namespace}-IGW" } } diff --git a/.github/workflows/github_vars.tfvars b/.github/workflows/github_vars.tfvars index 38be3ed..4d40f72 100644 --- a/.github/workflows/github_vars.tfvars +++ b/.github/workflows/github_vars.tfvars @@ -3,7 +3,7 @@ // Declared in variables.tf // -namespace = "github_actions" +namespace = "github_actions" // Matching pair name found in AWS for keypairs PEM key ami_key_pair_name = "github_actions" diff --git a/.github/workflows/main.tf b/.github/workflows/main.tf index 9ad9240..29fd6f3 100644 --- a/.github/workflows/main.tf +++ b/.github/workflows/main.tf @@ -28,7 +28,7 @@ resource "aws_security_group" "github_actions" { protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] } - + ingress { from_port = 80 to_port = 80 @@ -44,7 +44,7 @@ resource "aws_security_group" "github_actions" { } tags = { Name = "${var.namespace}-SG" - } + } } // instance setup @@ -57,16 +57,16 @@ resource "aws_instance" "testing_vm" { tags = var.instance_tags vpc_security_group_ids = [aws_security_group.github_actions.id] root_block_device { - delete_on_termination = true + delete_on_termination = true } } // generate inventory file resource "local_file" "inventory" { - filename = "./hosts.yml" + filename = "./hosts.yml" directory_permission = "0755" file_permission = "0644" - content = <