Skip to content

Commit

Permalink
Updates from GitHub Actions Format Code workflow (#4675)
Browse files Browse the repository at this point in the history
Co-authored-by: modernisation-platform-ci <[email protected]>
  • Loading branch information
1 parent f0ae112 commit 0d5f8da
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions terraform/environments/core-network-services/route53.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ locals {
tipstaff = "tipstaff.service.justice.gov.uk"
}

private-application-zones = {
private-application-zones = {
portal-development = "aws.dev.legalservices.gov.uk"
}
}

resource "aws_route53_zone" "private_application_zones" {

for_each = local.private-application-zones
name = each.value
name = each.value

vpc {
vpc_id = module.vpc_inspection["live_data"].vpc_id
Expand Down
14 changes: 7 additions & 7 deletions terraform/environments/core-vpc/vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -192,20 +192,20 @@ locals {
private-application-zones = {
laa-development = "aws.dev.legalservices.gov.uk"
laa-production = "aws.prd.legalservices.gov.uk"
}
}
}


module "private_dns_zone_extend" {
providers = {
providers = {
aws.core-network-services = aws.core-network-services
aws.core-vpc = aws
aws.core-vpc = aws
}

for_each = local.vpcs[terraform.workspace]
source = "../../modules/private-dns-zone-extend"
business_unit_name = local.private-application-zones[each.key]
vpc_id = module.vpc[each.key].vpc_id
for_each = local.vpcs[terraform.workspace]
source = "../../modules/private-dns-zone-extend"
business_unit_name = local.private-application-zones[each.key]
vpc_id = module.vpc[each.key].vpc_id

}

Expand Down
22 changes: 11 additions & 11 deletions terraform/modules/private-dns-zone-extend/main.tf
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
data "aws_route53_zone" "private" {
provider = aws.core-network-services
name = var.business_unit_name
private_zone = true
provider = aws.core-network-services
name = var.business_unit_name
private_zone = true
}

resource "aws_route53_vpc_association_authorization" "private_zone_vpc_auth" {
provider = aws.core-network-services
vpc_id = var.vpc_id
zone_id = data.aws_route53_zone.private.zone_id
provider = aws.core-network-services
vpc_id = var.vpc_id
zone_id = data.aws_route53_zone.private.zone_id
}

resource "aws_route53_zone_association" "private_zone_assoc" {
vpc_id = aws_route53_vpc_association_authorization.private_zone_vpc_auth.zone_id
zone_id = aws_route53_vpc_association_authorization.private_zone_vpc_auth.vpc_id
resource "aws_route53_zone_association" "private_zone_assoc" {
vpc_id = aws_route53_vpc_association_authorization.private_zone_vpc_auth.zone_id
zone_id = aws_route53_vpc_association_authorization.private_zone_vpc_auth.vpc_id
}

output "zonenametest" {
value = data.aws_route53_zone.private.zone_id
value = data.aws_route53_zone.private.zone_id

}
4 changes: 2 additions & 2 deletions terraform/modules/private-dns-zone-extend/variables.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
variable "business_unit_name" {
description = "Variable for passing account name to module for dns lookup"
type = string
type = string
}

variable "vpc_id" {
description = "Variable for the vpc id to be passed to the module"
type = string
type = string
}
4 changes: 2 additions & 2 deletions terraform/modules/private-dns-zone-extend/versions.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
terraform {
required_providers {
aws = {
version = "~> 5.0"
source = "hashicorp/aws"
version = "~> 5.0"
source = "hashicorp/aws"
configuration_aliases = [aws.core-network-services, aws.core-vpc]
}
}
Expand Down

0 comments on commit 0d5f8da

Please sign in to comment.