Skip to content

Commit

Permalink
feat: add configurable AWS route creation and deletion timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
morremeyer committed Dec 13, 2021
1 parent 0cad62a commit cd5ea30
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions accepter.tf
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ resource "aws_route" "accepter" {
aws_vpc_peering_connection_accepter.accepter,
aws_vpc_peering_connection.requester
]

timeouts {
create = var.aws_route_create_timeout
delete = var.aws_route_delete_timeout
}
}

# Accepter's side of the connection.
Expand Down
5 changes: 5 additions & 0 deletions requester.tf
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ resource "aws_route" "requester" {
aws_vpc_peering_connection.requester,
aws_vpc_peering_connection_accepter.accepter
]

timeouts {
create = var.aws_route_create_timeout
delete = var.aws_route_delete_timeout
}
}

output "requester_connection_id" {
Expand Down
12 changes: 12 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,15 @@ variable "add_attribute_tag" {
default = true
description = "If `true` will add additional attribute tag to the requester and accceptor resources"
}

variable "aws_route_create_timeout" {
type = string
default = "2m"
description = "Time to wait for AWS route creation specifed as a Go Duration, e.g. `2m`"
}

variable "aws_route_delete_timeout" {
type = string
default = "5m"
description = "Time to wait for AWS route deletion specifed as a Go Duration, e.g. `5m`"
}

0 comments on commit cd5ea30

Please sign in to comment.