This example creates an Oracle MySQL Cloud Service instance on Oracle Cloud Infrastructure Classic.
- creates the IP Network the instance will be connected to
- creates the MySQL Cloud Service instance
- creates an Access Rule to allow access to the Database
- creates an Access Rule to allow access to the EM Console
Create a local terraform.tfvars
with your account credentials, e.g.
identity_domain="mydomain"
service_id="590595900"
identity_service_id="idcs-5bb188b5460045f3943c57b783db7ffa"
user="[email protected]"
password="Pa55_Word"
endpoint="https://compute.uscom-central-1.oraclecloud.com/"
region="uscom-central-1"
source_ip="59.59.59.59"
Set the source_ip
to the IP address, or list of IP Addresses or CIDR ranges to allow access to the MySQL instance and EM console.
To create the MySQL Cloud Service database instance
$ terraform init
$ terraform apply
To delete the database instance
$ terraform destroy