Skip to content

Commit

Permalink
passing zone id into sonarqube
Browse files Browse the repository at this point in the history
  • Loading branch information
WeRockStar committed May 16, 2024
1 parent 6a545e0 commit b5600d2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ infra/iac/sonarqube/ansible/creds/*
**/inventories/sonarqube.ini
**/.infracost
.env
**/plan.json
**/tfplan.binary
1 change: 1 addition & 0 deletions infra/iac/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
2 changes: 1 addition & 1 deletion infra/iac/provides.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
terraform {
required_version = "~> 1.8.0"
required_version = "~> 1.8.0"
}
5 changes: 3 additions & 2 deletions infra/iac/sonarqube/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
1 change: 0 additions & 1 deletion infra/iac/sonarqube/variables.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
variable "zone_id" {
type = string
description = "Cloudflare Zone ID"
default = "460c65b55ec2a251ab45cf8eedac4734"
}

variable "cloudflare_api_token" {
Expand Down

0 comments on commit b5600d2

Please sign in to comment.