From b5600d231ec0910b97134a241d52e9ee2bad6bd7 Mon Sep 17 00:00:00 2001 From: WeRockStar Date: Thu, 16 May 2024 21:03:01 +0700 Subject: [PATCH] passing zone id into sonarqube --- .gitignore | 2 ++ infra/iac/main.tf | 1 + infra/iac/provides.tf | 2 +- infra/iac/sonarqube/main.tf | 5 +++-- infra/iac/sonarqube/variables.tf | 1 - 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index ec2de56..3c26b6e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ infra/iac/sonarqube/ansible/creds/* **/inventories/sonarqube.ini **/.infracost .env +**/plan.json +**/tfplan.binary diff --git a/infra/iac/main.tf b/infra/iac/main.tf index c97e079..3650c2b 100644 --- a/infra/iac/main.tf +++ b/infra/iac/main.tf @@ -47,5 +47,6 @@ module "rds" { module "sonarqube" { source = "./sonarqube" cloudflare_api_token = var.cf_api_token + zone_id = var.cf_zone_id instance_type = "t3.medium" } diff --git a/infra/iac/provides.tf b/infra/iac/provides.tf index 104ed4a..546ce9f 100644 --- a/infra/iac/provides.tf +++ b/infra/iac/provides.tf @@ -1,3 +1,3 @@ terraform { - required_version = "~> 1.8.0" + required_version = "~> 1.8.0" } diff --git a/infra/iac/sonarqube/main.tf b/infra/iac/sonarqube/main.tf index f59a2ef..721f575 100644 --- a/infra/iac/sonarqube/main.tf +++ b/infra/iac/sonarqube/main.tf @@ -50,8 +50,9 @@ resource "aws_internet_gateway" "sonarqube-igw" { } resource "aws_security_group" "sonarqube-sg" { - vpc_id = aws_vpc.sonarqube-vpc.id - name = "${var.instance_name}-sg" + vpc_id = aws_vpc.sonarqube-vpc.id + name = "${var.instance_name}-sg" + description = "Allow all traffic to and from the instance" tags = { Name = "${var.instance_name}-sg" } diff --git a/infra/iac/sonarqube/variables.tf b/infra/iac/sonarqube/variables.tf index dc1d343..6a9fefa 100644 --- a/infra/iac/sonarqube/variables.tf +++ b/infra/iac/sonarqube/variables.tf @@ -1,7 +1,6 @@ variable "zone_id" { type = string description = "Cloudflare Zone ID" - default = "460c65b55ec2a251ab45cf8eedac4734" } variable "cloudflare_api_token" {