terraform.aws-baseline-infra/modules/security_identity_compliance/inspector2/main.tf

11 lines
346 B
Terraform
Raw Normal View History

2022-08-29 10:58:50 +08:00
resource "null_resource" "cli-inspector2" {
provisioner "local-exec" {
when = create
command = "/bin/bash -c 'aws inspector2 enable --resource-types \"ECR\"'"
}
provisioner "local-exec" {
when = destroy
2022-08-29 11:10:00 +08:00
command = "/bin/bash -c 'aws inspector2 disable --resource-types \"ECR\"; sleep 30; aws inspector2 disable'"
2022-08-29 10:58:50 +08:00
}
}