Skip to content

Commit

Permalink
enhancement: add create timeout configuration for aws_inspector2_enab…
Browse files Browse the repository at this point in the history
…ler resource
  • Loading branch information
skesarkar-schubergphilis committed Aug 1, 2024
1 parent d249079 commit dc2332e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inspector.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ resource "aws_inspector2_enabler" "member_accounts" {
account_ids = toset(local.inspector_members_account_ids)
resource_types = local.inspector_enabled_resource_types

timeouts {
create = var.aws_inspector.resource_create_timeout
}

depends_on = [aws_inspector2_member_association.default]
}

Expand Down
2 changes: 2 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,15 @@ variable "aws_inspector" {
enable_scan_ecr = optional(bool, true)
enable_scan_lambda = optional(bool, true)
enable_scan_lambda_code = optional(bool, true)
resource_create_timeout = optional(string, "15m")
})
default = {
enabled = false
enable_scan_ec2 = true
enable_scan_ecr = true
enable_scan_lambda = true
enable_scan_lambda_code = true
resource_create_timeout = "15m"
}
description = "AWS Inspector settings, at least one of the scan options must be enabled"
}
Expand Down

0 comments on commit dc2332e

Please sign in to comment.