Skip to content

Commit

Permalink
Merge branch 'main' into renovate/aws-actions-configure-aws-credentia…
Browse files Browse the repository at this point in the history
…ls-4.x
  • Loading branch information
laurentb4 committed Jul 1, 2024
2 parents 789bc52 + 24339d4 commit 75aa7e4
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/label-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
issues: write
steps:
- name: Label issues
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
uses: andymckay/labeler@3a4296e9dcdf9576b0456050db78cfd34853f260
with:
add-labels: "network-access-control"
repo-token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/terraform-apply.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:

# Install the specified version of Terraform CLI
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
uses: hashicorp/setup-terraform@v3
with:
terraform_version: ${{ env.TFVERSION }}

Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ refresh: ## terraform refresh
output: ## terraform output (make output OUTPUT_ARGUMENT='--raw dns_dhcp_vpc_id')
$(DOCKER_RUN) /bin/bash -c "terraform output -no-color ${OUTPUT_ARGUMENT}"
.PHONY: output-bastion-rds-admin
output-bastion-rds-admin: ## terraform output (make output-bastion-rds-admin)
$(DOCKER_RUN) /bin/bash -c "terraform output -no-color -json rds_bastion | jq -r .admin[][]"
.PHONY: output-bastion-rds-server
output-bastion-rds-server: ## terraform output (make output-bastion-rds-server)
$(DOCKER_RUN) /bin/bash -c "terraform output -no-color -json rds_bastion | jq -r .server[][]"
.PHONY: apply
apply: ## terraform apply
$(DOCKER_RUN) /bin/bash -c "terraform apply"
Expand Down
1 change: 0 additions & 1 deletion bastion-rds-admin.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module "rds_admin_bastion" {
vpc_cidr_block = module.admin_vpc.vpc.vpc_cidr_block
private_subnets = module.admin_vpc.public_subnets
security_group_ids = [module.admin.security_group_ids.admin_ecs]
ami_name = "diso-devops/bastion/rds-admin/ubuntu-jammy-22.04-amd64-server-1.0.1"
number_of_bastions = 1
assume_role = local.s3-mojo_file_transfer_assume_role_arn
associate_public_ip_address = false
Expand Down
1 change: 0 additions & 1 deletion bastion-rds-servers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module "rds_servers_bastion" {
vpc_cidr_block = module.radius_vpc.vpc.vpc_cidr_block
private_subnets = module.radius_vpc.private_subnets
security_group_ids = [module.radius.security_group_ids.radius_server]
ami_name = "diso-devops/bastion/rds-admin/ubuntu-jammy-22.04-amd64-server-1.0.1"
number_of_bastions = 1
assume_role = local.s3-mojo_file_transfer_assume_role_arn
associate_public_ip_address = false
Expand Down
12 changes: 3 additions & 9 deletions modules/bastion/bastion.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,9 @@ data "aws_ami" "ubuntu" {
values = ["${var.ami_name}"]
}

filter {
name = "virtualization-type"
values = ["hvm"]
tags = {
deploy_to_all_environments = "True"
}

# filter {
# name = "tag:env_${terraform.workspace}"
# values = ["true"]
# }

owners = ["683290208331"] # shared services accunt
owners = ["683290208331"] # shared services account
}
3 changes: 3 additions & 0 deletions modules/bastion/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
output "bastion" {
value = aws_instance.bastion[*].id
}
2 changes: 1 addition & 1 deletion modules/bastion/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ variable "security_group_ids" {
variable "ami_name" {
type = string
description = "The ami name"
default = "diso-devops/bastion/rds-admin/ubuntu-jammy-22.04-amd64-server-1.0.1"
default = "diso-devops/bastion/ubuntu-jammy-22.04-amd64-server-generic-*"
}

variable "assume_role" {
Expand Down
7 changes: 7 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,10 @@ output "terraform_outputs" {
}
}
}

output "rds_bastion" {
value = {
admin = module.rds_admin_bastion[*].bastion
server = module.rds_servers_bastion[*].bastion
}
}

0 comments on commit 75aa7e4

Please sign in to comment.