terraform.aws-baseline-infra/modules/security_identity_compliance/inspector2/main.tf
2022-08-29 11:10:00 +08:00

11 lines
346 B
HCL

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
command = "/bin/bash -c 'aws inspector2 disable --resource-types \"ECR\"; sleep 30; aws inspector2 disable'"
}
}