Mrk
Mrk

Reputation: 555

how to terminate al the resources in oci in one go through a script

i could see my trial credits coming down on a daily basis, how to terminate all the resources that are being charged through a script in OCI

Upvotes: 0

Views: 1166

Answers (3)

Badscrew
Badscrew

Reputation: 59

Take a look at this python script, it includes many of the frequently used resource types AnykeyNL / OCI-SuperDelete

It's open source, so if you find there are resources missing, you can ask (create an issue) or contribute it yourself!

Upvotes: 1

bmuthuv
bmuthuv

Reputation: 326

Provision the resources using Terraform. So you can provision any number of resources using one command (Terraform apply) and remove them completely using Terraform destroy.

You also have Resource Manager service in OCI that helps you manage these scripts without additional cost.

Regards, Muthu

Upvotes: 2

Joe
Joe

Reputation: 2540

You would call the delete API for each resource type you want to delete, passing in the resource ID of each resource you want to delete.

Upvotes: 1

Related Questions