Sunday, June 23, 2024
No menu items!
HomeDatabase ManagementProvision and manage Amazon RDS for Oracle using Terraform

Provision and manage Amazon RDS for Oracle using Terraform

This the first post in a multi-part series where we discuss how you can set up Amazon Relational Database Service (Amazon RDS) for Oracle with Terraform. Terraform by HashiCorp allows you to define the instructions for setting up the infrastructure as a code, simplifying and automating the process instead of doing everything manually.

Overview of solution

When it comes to provisioning an RDS for Oracle instance, Terraform can make the process efficient and reproducible. We walk you through the steps to provision an RDS for Oracle instance, modify the instance, and remove the instance.

Prerequisites

This post assumes that you’re familiar with Terraform, GitHub, and Git commands.

For this walkthrough, you need the following:

An active AWS account. If you don’t have an account, sign up for one.
The AWS Command Line Interface (AWS CLI) installed and configured. For more information, see Installing, updating, and uninstalling the AWS CLI.
Terraform installed on your local machine. For more information, see Install Terraform.
The necessary AWS Identity and Access Management (IAM) permissions required to create the AWS resources using Terraform.

Set up your resources

Complete the following steps to set up your resources:

Install git on your workstation.
Clone the GitHub repo rds-oracle-terraform to your workstation by running the following command in your terminal window:

git clone https://github.com/aws-samples/rds-oracle-terraform

This command creates a directory named rds-oracle-terraform under your current directory. You can modify the variables as per your use case to deploy the modules.

Export the AWS environment:

export AWS_ACCESS_KEY_ID=<access_key>
export AWS_SECRET_ACCESS_KEY=<secret_key>
export AWS_DEFAULT_REGION=<aws_region>

Build the database instance

Your directory contains the following files:

main.tf – Main terraform code
variables.tf – Variables for the code
test.tfvars – Variables for your specific file
versions.tf – The version support for Terraform
outputs.tf – Information about your infrastructure

Initialize the Terraform module:

[ec2-user@ip-xx-xx-xx-xx rds-oracle-terraform]$ ls
main.tf test.tfvars variables.tf versions.tf outputs.tf

The file test.tfvars holds the values of the RDS database identifier and database admin password.

[ec2-user@ip-xx-xx-xx-xx rds-oracle-terraform] $ terraform init -var-file=”test.tfvars”

Initializing the backend…

Initializing provider plugins…
– Finding latest version of hashicorp/aws…
– Installing hashicorp/aws v5.32.0…
– Installed hashicorp/aws v5.32.0 (signed by HashiCorp)

Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run “terraform init” in the future.

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running “terraform plan” to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

Run a plan to confirm what is to be built:

[ec2-user@ip-xx-xx-xx-xx rds-oracle-terraform]$ terraform plan -var-file=”test.tfvars”

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create

Terraform will perform the following actions:

# aws_db_instance.rds will be created
+ resource “aws_db_instance” “rds” {
+ address = (known after apply)
+ allocated_storage = 200
+ allow_major_version_upgrade = true
+ apply_immediately = true
+ arn = (known after apply)
+ auto_minor_version_upgrade = false
+ availability_zone = (known after apply)
+ backup_retention_period = 1
+ backup_target = (known after apply)
+ backup_window = “22:00-23:59”
+ ca_cert_identifier = (known after apply)
+ character_set_name = (known after apply)
+ copy_tags_to_snapshot = true
+ db_name = (known after apply)
+ db_subnet_group_name = (known after apply)
+ delete_automated_backups = false
+ deletion_protection = false
+ endpoint = (known after apply)
+ engine = “oracle-se2”
+ engine_version = “19.0.0.0.ru-2022-10.rur-2022-10.r1”
+ engine_version_actual = (known after apply)
+ hosted_zone_id = (known after apply)
+ id = (known after apply)
+ identifier = “rdsoracle-terraform”
+ identifier_prefix = (known after apply)
+ instance_class = “db.t3.medium”
+ iops = (known after apply)
+ kms_key_id = (known after apply)
+ latest_restorable_time = (known after apply)
+ license_model = “license-included”
+ listener_endpoint = (known after apply)
+ maintenance_window = “thu:00:00-thu:04:00”
+ manage_master_user_password = true
+ master_user_secret = (known after apply)
+ master_user_secret_kms_key_id = (known after apply)
+ max_allocated_storage = 0
+ monitoring_interval = 0
+ monitoring_role_arn = (known after apply)
+ multi_az = false
+ nchar_character_set_name = (known after apply)
+ network_type = (known after apply)
+ option_group_name = (known after apply)
+ parameter_group_name = (known after apply)
+ performance_insights_enabled = true
+ performance_insights_kms_key_id = (known after apply)
+ performance_insights_retention_period = 7
+ port = 1521
+ publicly_accessible = false
+ replica_mode = (known after apply)
+ replicas = (known after apply)
+ resource_id = (known after apply)
+ skip_final_snapshot = true
+ snapshot_identifier = (known after apply)
+ status = (known after apply)
+ storage_throughput = (known after apply)
+ storage_type = “gp3”
+ tags_all = (known after apply)
+ timezone = (known after apply)
+ username = “admin”
+ vpc_security_group_ids = [
+ “sg-xxxxxx”,
]
}

Plan: 1 to add, 0 to change, 0 to destroy.

Changes to Outputs:
+ rds_allocated_storage = 200
+ rds_backup_retention_period = 1
+ rds_backup_window = “22:00-23:59”
+ rds_db_name = (known after apply)
+ rds_deletion_protection = false
+ rds_endpoint = (known after apply)
+ rds_engine = “oracle-se2”
+ rds_engine_version = “19.0.0.0.ru-2022-10.rur-2022-10.r1”
+ rds_id = (known after apply)
+ rds_instance_class = “db.t3.medium”
+ rds_kms_key_id = (known after apply)
+ rds_maintenance_window = “thu:00:00-thu:04:00”
+ rds_multi_az = false
+ rds_option_group_name = (known after apply)
+ rds_parameter_group_name = (known after apply)
+ rds_port = 1521
+ rds_security_group_ids = [
+ “sg-xxxxxx”,
]
+ rds_storage_type = “gp3”
+ rds_subnet_group_name = (known after apply)
+ rds_username = “admin”

──────────────────────────────────────────────────────────────────────────────────────
Note: You didn’t use the -out option to save this plan, so Terraform can’t guarantee to take exactly these actions if you run “terraform apply” now.

Apply the code and build the database:

[ec2-user@ip-xx-xx-xx-xx rds-oracle-terraform]$ terraform apply -var-file=”test.tfvars”

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create

Terraform will perform the following actions:

# aws_db_instance.rds will be created
+ resource “aws_db_instance” “rds” {
+ address = (known after apply)
+ allocated_storage = 200
+ allow_major_version_upgrade = true
+ apply_immediately = true
+ arn = (known after apply)
+ auto_minor_version_upgrade = false
+ availability_zone = (known after apply)
+ backup_retention_period = 1
+ backup_target = (known after apply)
+ backup_window = “22:00-23:59”
+ ca_cert_identifier = (known after apply)
+ character_set_name = (known after apply)
+ copy_tags_to_snapshot = true
+ db_name = (known after apply)
+ db_subnet_group_name = (known after apply)
+ delete_automated_backups = false
+ deletion_protection = false
+ endpoint = (known after apply)
+ engine = “oracle-se2”
+ engine_version = “19.0.0.0.ru-2022-10.rur-2022-10.r1”
+ engine_version_actual = (known after apply)
+ hosted_zone_id = (known after apply)
+ id = (known after apply)
+ identifier = “rdsoracle-terraform”
+ identifier_prefix = (known after apply)
+ instance_class = “db.t3.medium”
+ iops = (known after apply)
+ kms_key_id = (known after apply)
+ latest_restorable_time = (known after apply)
+ license_model = “license-included”
+ listener_endpoint = (known after apply)
+ maintenance_window = “thu:00:00-thu:04:00”
+ manage_master_user_password = true
+ master_user_secret = (known after apply)
+ master_user_secret_kms_key_id = (known after apply)
+ max_allocated_storage = 0
+ monitoring_interval = 0
+ monitoring_role_arn = (known after apply)
+ multi_az = false
+ nchar_character_set_name = (known after apply)
+ network_type = (known after apply)
+ option_group_name = (known after apply)
+ parameter_group_name = (known after apply)
+ performance_insights_enabled = true
+ performance_insights_kms_key_id = (known after apply)
+ performance_insights_retention_period = 7
+ port = 1521
+ publicly_accessible = false
+ replica_mode = (known after apply)
+ replicas = (known after apply)
+ resource_id = (known after apply)
+ skip_final_snapshot = true
+ snapshot_identifier = (known after apply)
+ status = (known after apply)
+ storage_throughput = (known after apply)
+ storage_type = “gp3”
+ tags_all = (known after apply)
+ timezone = (known after apply)
+ username = “admin”
+ vpc_security_group_ids = [
+ “sg-xxxxxx”,
]
}

Plan: 1 to add, 0 to change, 0 to destroy.

Changes to Outputs:
+ rds_allocated_storage = 200
+ rds_backup_retention_period = 1
+ rds_backup_window = “22:00-23:59”
+ rds_db_name = (known after apply)
+ rds_deletion_protection = false
+ rds_endpoint = (known after apply)
+ rds_engine = “oracle-se2”
+ rds_engine_version = “19.0.0.0.ru-2022-10.rur-2022-10.r1”
+ rds_id = (known after apply)
+ rds_instance_class = “db.t3.medium”
+ rds_kms_key_id = (known after apply)
+ rds_maintenance_window = “thu:00:00-thu:04:00”
+ rds_multi_az = false
+ rds_option_group_name = (known after apply)
+ rds_parameter_group_name = (known after apply)
+ rds_port = 1521
+ rds_security_group_ids = [
+ “sg-xxxxxx”,
]
+ rds_storage_type = “gp3”
+ rds_subnet_group_name = (known after apply)
+ rds_username = “admin”

Do you want to perform these actions?
Terraform will perform the actions described above.
Only ‘yes’ will be accepted to approve.

Enter a value: yes

aws_db_instance.rds: Creating…
aws_db_instance.rds: Still creating… [10s elapsed]
aws_db_instance.rds: Still creating… [20s elapsed]
aws_db_instance.rds: Still creating… [30s elapsed]
aws_db_instance.rds: Still creating… [40s elapsed]
aws_db_instance.rds: Still creating… [50s elapsed]
aws_db_instance.rds: Still creating… [1m0s elapsed]
aws_db_instance.rds: Still creating… [1m10s elapsed]
aws_db_instance.rds: Still creating… [1m20s elapsed]
aws_db_instance.rds: Still creating… [1m30s elapsed]
aws_db_instance.rds: Still creating… [1m40s elapsed]
aws_db_instance.rds: Still creating… [1m50s elapsed]
aws_db_instance.rds: Still creating… [2m0s elapsed]
aws_db_instance.rds: Still creating… [2m10s elapsed]
aws_db_instance.rds: Still creating… [2m20s elapsed]
aws_db_instance.rds: Still creating… [2m30s elapsed]
aws_db_instance.rds: Still creating… [2m40s elapsed]
aws_db_instance.rds: Still creating… [2m50s elapsed]
aws_db_instance.rds: Still creating… [3m0s elapsed]
aws_db_instance.rds: Still creating… [3m10s elapsed]
aws_db_instance.rds: Still creating… [3m20s elapsed]
aws_db_instance.rds: Still creating… [3m30s elapsed]
aws_db_instance.rds: Still creating… [3m40s elapsed]
aws_db_instance.rds: Still creating… [3m50s elapsed]
aws_db_instance.rds: Still creating… [4m0s elapsed]
aws_db_instance.rds: Still creating… [4m10s elapsed]
aws_db_instance.rds: Still creating… [4m20s elapsed]
aws_db_instance.rds: Still creating… [4m30s elapsed]
aws_db_instance.rds: Still creating… [4m40s elapsed]
aws_db_instance.rds: Still creating… [4m50s elapsed]
aws_db_instance.rds: Still creating… [5m0s elapsed]
aws_db_instance.rds: Still creating… [5m10s elapsed]
aws_db_instance.rds: Still creating… [5m20s elapsed]
aws_db_instance.rds: Still creating… [5m30s elapsed]
aws_db_instance.rds: Still creating… [5m40s elapsed]
aws_db_instance.rds: Still creating… [5m50s elapsed]
aws_db_instance.rds: Still creating… [6m0s elapsed]
aws_db_instance.rds: Still creating… [6m10s elapsed]
aws_db_instance.rds: Still creating… [6m20s elapsed]
aws_db_instance.rds: Still creating… [6m30s elapsed]
aws_db_instance.rds: Still creating… [6m40s elapsed]
aws_db_instance.rds: Still creating… [6m50s elapsed]
aws_db_instance.rds: Still creating… [7m0s elapsed]
aws_db_instance.rds: Still creating… [7m10s elapsed]
aws_db_instance.rds: Still creating… [7m20s elapsed]
aws_db_instance.rds: Still creating… [7m30s elapsed]
aws_db_instance.rds: Still creating… [7m40s elapsed]
aws_db_instance.rds: Still creating… [7m50s elapsed]
aws_db_instance.rds: Still creating… [8m0s elapsed]
aws_db_instance.rds: Still creating… [8m10s elapsed]
aws_db_instance.rds: Still creating… [8m20s elapsed]
aws_db_instance.rds: Still creating… [8m30s elapsed]
aws_db_instance.rds: Still creating… [8m40s elapsed]
aws_db_instance.rds: Still creating… [8m50s elapsed]
aws_db_instance.rds: Still creating… [9m0s elapsed]
aws_db_instance.rds: Still creating… [9m10s elapsed]
aws_db_instance.rds: Still creating… [9m20s elapsed]
aws_db_instance.rds: Still creating… [9m30s elapsed]
aws_db_instance.rds: Still creating… [9m40s elapsed]
aws_db_instance.rds: Still creating… [9m50s elapsed]
aws_db_instance.rds: Still creating… [10m0s elapsed]
aws_db_instance.rds: Still creating… [10m10s elapsed]
aws_db_instance.rds: Still creating… [10m20s elapsed]
aws_db_instance.rds: Still creating… [10m30s elapsed]
aws_db_instance.rds: Still creating… [10m40s elapsed]
aws_db_instance.rds: Still creating… [10m50s elapsed]
aws_db_instance.rds: Still creating… [11m0s elapsed]
aws_db_instance.rds: Still creating… [11m10s elapsed]
aws_db_instance.rds: Still creating… [11m20s elapsed]
aws_db_instance.rds: Still creating… [11m30s elapsed]
aws_db_instance.rds: Still creating… [11m40s elapsed]
aws_db_instance.rds: Still creating… [11m50s elapsed]
aws_db_instance.rds: Still creating… [12m0s elapsed]
aws_db_instance.rds: Still creating… [12m10s elapsed]
aws_db_instance.rds: Still creating… [12m20s elapsed]
aws_db_instance.rds: Still creating… [12m30s elapsed]
aws_db_instance.rds: Still creating… [12m40s elapsed]
aws_db_instance.rds: Still creating… [12m50s elapsed]
aws_db_instance.rds: Still creating… [13m0s elapsed]
aws_db_instance.rds: Still creating… [13m10s elapsed]
aws_db_instance.rds: Still creating… [13m20s elapsed]
aws_db_instance.rds: Still creating… [13m30s elapsed]
aws_db_instance.rds: Still creating… [13m40s elapsed]
aws_db_instance.rds: Still creating… [13m50s elapsed]
aws_db_instance.rds: Creation complete after 14m0s [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

rds_allocated_storage = 200
rds_backup_retention_period = 1
rds_backup_window = “22:00-23:59”
rds_db_name = “ORCL”
rds_deletion_protection = false
rds_endpoint = “rdsoracle-terraform.xxxxxxxxx.eu-central-1.rds.amazonaws.com:1521”
rds_engine = “oracle-se2”
rds_engine_version = “19.0.0.0.ru-2022-10.rur-2022-10.r1”
rds_id = “db-LTLWJCEYJ4VWOWBHE6VCI4667Y”
rds_instance_class = “db.t3.medium”
rds_kms_key_id = “”
rds_maintenance_window = “thu:00:00-thu:04:00”
rds_multi_az = false
rds_option_group_name = “default:oracle-se2-19”
rds_parameter_group_name = “default.oracle-se2-19”
rds_port = 1521
rds_security_group_ids = toset([
“sg-xxxxxxx”,
])
rds_storage_type = “gp3”
rds_subnet_group_name = “default”
rds_username = “admin”

While it’s building, you will see the resource on the Amazon RDS console.

After 10–20 minutes, you will see a Creation Complete message when the instance is built.

The following screenshot shows the instance with the status Available on the Amazon RDS console.

Modify database settings using Terraform

To modify the RDS for Oracle database settings using Terraform, you can update the values in the variables.tf file, as shown in the following screenshot. In this example, we increase the DB storage to 400 GiB and modify the database backup retention to 7 days. This allows you to customize the database configuration according to your requirements. Please note that the maximum allocated storage must be increased by at least 10 percent.

Then run terraform plan -var-file=test.tfvars

To apply the changes listed in the preceding screenshot, run terraform apply -var-file=test.tfvars

You can monitor the instance status on the Amazon RDS console.

Clean up

AWS resources created by the Terraform RDS for Oracle instance incur costs as long as they are in use. When you no longer need the resources, clean them up by deleting the RDS for Oracle instance.

Run the following commands in your terminal window to remove the resource with a terraform destroy command:

[ec2-user@ip-xx-xx-xx-xx rds-oracle-terraform]$ terraform destroy -var-file=”test.tfvars”
aws_db_instance.rds: Refreshing state… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y]

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
– destroy

Terraform will perform the following actions:

# aws_db_instance.rds will be destroyed
– resource “aws_db_instance” “rds” {
– address = “rdsoracle-terraform.xxxxxxx.eu-central-1.rds.amazonaws.com” -> null
– allocated_storage = 400 -> null
– allow_major_version_upgrade = true -> null
– apply_immediately = true -> null
– arn = “arn:aws:rds:eu-central-1:<account-id>:db:rdsoracle-terraform” -> null
– auto_minor_version_upgrade = false -> null
– availability_zone = “eu-central-1a” -> null
– backup_retention_period = 7 -> null
– backup_target = “region” -> null
– backup_window = “22:00-23:59” -> null
– ca_cert_identifier = “rds-ca-2019” -> null
– character_set_name = “AL32UTF8” -> null
– copy_tags_to_snapshot = true -> null
– customer_owned_ip_enabled = false -> null
– db_name = “ORCL” -> null
– db_subnet_group_name = “default” -> null
– delete_automated_backups = false -> null
– deletion_protection = false -> null
– enabled_cloudwatch_logs_exports = [] -> null
– endpoint = “rdsoracle-terraform.xxxxxxx.eu-central-1.rds.amazonaws.com:1521” -> null
– engine = “oracle-se2” -> null
– engine_version = “19.0.0.0.ru-2022-10.rur-2022-10.r1” -> null
– engine_version_actual = “19.0.0.0.ru-2022-10.rur-2022-10.r1” -> null
– hosted_zone_id = “Z1RLNUO7B9Q6NB” -> null
– iam_database_authentication_enabled = false -> null
– id = “db-LTLWJCEYJ4VWOWBHE6VCI4667Y” -> null
– identifier = “rdsoracle-terraform” -> null
– instance_class = “db.t3.medium” -> null
– iops = 12000 -> null
– latest_restorable_time = “2023-12-19T13:01:12Z” -> null
– license_model = “license-included” -> null
– listener_endpoint = [] -> null
– maintenance_window = “thu:00:00-thu:04:00” -> null
– manage_master_user_password = true -> null
– master_user_secret = [
– {
– kms_key_id = “arn:aws:kms:eu-central-1:<account-id>:key/668a7d6d-6107-4022-abee-d7ee5c1ce749”
– secret_arn = “arn:aws:secretsmanager:eu-central-1:<account-id>:secret:rds!db-76edf067-66ab-4240-a92a-526253974271-rtXhwY”
– secret_status = “active”
},
] -> null
– max_allocated_storage = 0 -> null
– monitoring_interval = 0 -> null
– multi_az = false -> null
– nchar_character_set_name = “AL16UTF16” -> null
– network_type = “IPV4” -> null
– option_group_name = “default:oracle-se2-19” -> null
– parameter_group_name = “default.oracle-se2-19” -> null
– performance_insights_enabled = true -> null
– performance_insights_kms_key_id = “arn:aws:kms:eu-central-1:<account-id>:key/26368ab9-e1e3-4feb-95ed-134be0a3b09b” -> null
– performance_insights_retention_period = 7 -> null
– port = 1521 -> null
– publicly_accessible = false -> null
– replicas = [] -> null
– resource_id = “db-LTLWJCEYJ4VWOWBHE6VCI4667Y” -> null
– skip_final_snapshot = true -> null
– status = “storage-optimization” -> null
– storage_encrypted = false -> null
– storage_throughput = 500 -> null
– storage_type = “gp3” -> null
– tags = {} -> null
– tags_all = {} -> null
– username = “admin” -> null
– vpc_security_group_ids = [
– “sg-xxxxx”,
] -> null
}

Plan: 0 to add, 0 to change, 1 to destroy.

Changes to Outputs:
– rds_allocated_storage = 400 -> null
– rds_backup_retention_period = 7 -> null
– rds_backup_window = “22:00-23:59” -> null
– rds_db_name = “ORCL” -> null
– rds_deletion_protection = false -> null
– rds_endpoint = “rdsoracle-terraform.xxxxxxx.eu-central-1.rds.amazonaws.com:1521” -> null
– rds_engine = “oracle-se2” -> null
– rds_engine_version = “19.0.0.0.ru-2022-10.rur-2022-10.r1” -> null
– rds_id = “db-LTLWJCEYJ4VWOWBHE6VCI4667Y” -> null
– rds_instance_class = “db.t3.medium” -> null
– rds_kms_key_id = “” -> null
– rds_maintenance_window = “thu:00:00-thu:04:00” -> null
– rds_multi_az = false -> null
– rds_option_group_name = “default:oracle-se2-19” -> null
– rds_parameter_group_name = “default.oracle-se2-19” -> null
– rds_port = 1521 -> null
– rds_security_group_ids = [
– “sg-xxxxxx”,
] -> null
– rds_storage_type = “gp3” -> null
– rds_subnet_group_name = “default” -> null
– rds_username = “admin” -> null

Do you really want to destroy all resources?
Terraform will destroy all your managed infrastructure, as shown above.
There is no undo. Only ‘yes’ will be accepted to confirm.

Enter a value: yes

aws_db_instance.rds: Destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 10s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 20s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 30s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 40s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 50s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 1m0s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 1m10s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 1m20s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 1m30s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 1m40s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 1m50s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 2m0s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 2m10s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 2m20s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 2m30s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 2m40s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 2m50s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 3m0s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 3m10s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 3m20s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 3m30s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 3m40s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 3m50s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 4m0s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 4m10s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 4m20s elapsed]
aws_db_instance.rds: Still destroying… [id=db-LTLWJCEYJ4VWOWBHE6VCI4667Y, 4m30s elapsed]
aws_db_instance.rds: Destruction complete after 4m30s

Destroy complete! Resources: 1 destroyed.

On the Amazon RDS console, you will see the instance deletion in progress.

Conclusion

As cloud infrastructures continue to evolve and expand, automation becomes a necessity. In this first part of our series, we established a solid understanding of how to use Terraform to deploy, modify, and clean up an RDS for Oracle instance.

In the next part of this series, we delve into the management aspect, including scaling, monitoring, and maintenance, to comprehensively address the management of Amazon RDS for Oracle using Terraform.

About the Authors

Tony Mullen is a Senior Database Specialist Solutions Architect based in Manchester. With a focus on relational database engines, he assists customers in migrating and modernizing their database workloads to AWS.

Vetrivel is a Senior Cloud Support Database Engineer at Amazon Web Services, specialized in Databases, Storage and Oracle workloads in the AWS cloud. He leverages his IT expertise to offer technical support to customers, empowering them to build well architected solutions within the AWS Cloud. Beyond his professional life, Vetrivel’s passions include traveling, discovering new destinations, relishing diverse cuisines, and participating in adventure activities.

Sharath Chandra Kampili is a Database Specialist Solutions Architect with Amazon Web Services. He works with AWS RDS team, focusing on commercial database engines like Oracle. Sharath works directly with AWS customers to provide guidance and technical assistance on the database projects, helping them improve the value of their solutions when using AWS.

Read MoreAWS Database Blog

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments