Skip to content

Commit

Permalink
Merge pull request #153 from ministryofjustice/feature/4173-aws-provi…
Browse files Browse the repository at this point in the history
…der-v5

AWS Provider 5.0 upgrade
  • Loading branch information
dms1981 authored Jun 16, 2023
2 parents dfa1261 + 81b1ec9 commit 11112df
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.DS_Store
.env
.idea
.terraform
.terraform.lock.hcl
10 changes: 1 addition & 9 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -403,12 +403,4 @@ resource "aws_vpc_endpoint" "ssm_s3" {
Name = "${var.tags_prefix}-com.amazonaws.eu-west-2.s3"
}
)
}

output "private_route_tables" {
value = {
for key, value in local.all_distinct_route_tables_with_keys :
key => aws_route_table.route_tables[key].id
if substr(key, length(key) - 6, length(key)) != "public"
}
}
}
10 changes: 9 additions & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,12 @@ output "public_subnet_ids" {

output "protected_subnet_ids" {
value = [for v in aws_subnet.protected : v.id if(length(regexall("(?:protected)", v.tags.Name)) > 0)]
}
}

output "private_route_tables" {
value = {
for key, value in local.all_distinct_route_tables_with_keys :
key => aws_route_table.route_tables[key].id
if substr(key, length(key) - 6, length(key)) != "public"
}
}
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
aws = {
version = "~> 4.0"
version = "~> 5.0"
source = "hashicorp/aws"
}
random = {
Expand Down

0 comments on commit 11112df

Please sign in to comment.