⁘ Observability Real Application Clusters ⁘ Data Guard ⁘ Sharding Containerization ⁘ Terraform ⁘ Ansible Exadata & Engineered Systems AHF ⁘ TFA ⁘ GIMR ⁘ CHA Sean Scott Oracle ACE Director Data on Kubernetes Community Ambassador Managing Principal Consultant Viscosity North America @ViscosityNA www.viscosityna.com
Imperative languages scale poorly: • Changing the tank size redefines the assets • Resources may have dependencies • Change requires domain expertise • Should heater capacity change linearly or exponentially to water volume? • Will a tall, skinny tank have different requirements than a short, wide one? • Does surface area affect monitoring and maintenance schedules? • Which intermediate values should round up or down? • Are salinity ratios fixed for all water volumes?
= var.region user_ocid = var.user_ocid fingerprint = var.fingerprint private_key_path = var.private_key_path } Resource variables Value assignments Value assignments could go here
variable "region" {} variable "user_ocid" {} variable "fingerprint" {} variable "private_key_path" {} Variable declarations Value assignment could go here
Your tenancy_ocid region = Your region identifier user_ocid = Your user_ocid fingerprint = Your fingerprint private_key_path = Your private_key_path Same variables as defined in variables.tf Hard-coded variable assignments Limiting hard-coded assignments to terraform.tfvars means no changes are needed elsewhere to run the same configuration on different tenancies, scale, etc.!
Initializing provider plugins... - Finding latest version of hashicorp/oci... - Installing hashicorp/oci v4.76.0... - Installed hashicorp/oci v4.76.0 (signed by HashiCorp) 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.
infrastructure matches the configuration. Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.
infrastructure matches the configuration. Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed. Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
variable values db_name = "ADB21C" display_name = "ADB21C" admin_password = "XXXXXXXXXXXXXXXXXXXXXX" # Default overrides #db_version = #db_workload = #cpu_core_count = #data_storage_size_in_tbs = #is_free_tier = #license_model = ADB values likely to change for each DB To override defaults, un-comment the line and set a value
selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # oci_database_autonomous_database.autonomous_db will be created + resource "oci_database_autonomous_database" "autonomous_db" { + actual_used_data_storage_size_in_tbs = (known after apply) + admin_password = (sensitive value) ...
0 to change, 0 to destroy. Changes to Outputs: + db_name = "ADB21C" + db_state = (known after apply) ──────────────────────────────────────────────────────────────────────────── 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.
to add, 0 to change, 0 to destroy. Changes to Outputs: + db_name = "ADB21C" + db_state = (known after apply) 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