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
|
|
|
}
|
|
|
|
}
|