Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i in $(oci search resource structured-search --query-text "QUERY instance resources where lifeCycleState = 'RUNNING' && displayName =~ 'test' && compartmentId = '$COMPARTMENT_ID' " --query 'data.items[*].identifier' --raw-output|sed 's/\"//g;s/,//g'|egrep -v -e "\[" -e "\]")
- do
- time oci compute instance terminate --instance-id "$i" --force
- ##echo "$i"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement