Cloud SQL supported engines (MySQL, PostgreSQL, SQL Server)
📖 Scenario: You are setting up a Cloud SQL instance on Google Cloud Platform. Cloud SQL supports three main database engines: MySQL, PostgreSQL, and SQL Server. You want to create a configuration dictionary that lists these supported engines and their default versions.
🎯 Goal: Create a Python dictionary that holds the supported Cloud SQL engines as keys and their default versions as values. Then, add a configuration variable to select the default engine. Next, write code to extract the version of the selected engine. Finally, complete the configuration by adding a key for the region where the Cloud SQL instance will be deployed.
📋 What You'll Learn
Create a dictionary called
cloud_sql_engines with keys 'MySQL', 'PostgreSQL', and 'SQL Server' and their default versions as values.Create a variable called
default_engine and set it to 'PostgreSQL'.Write code to get the version of the
default_engine from cloud_sql_engines and store it in selected_version.Add a key
'region' with value 'us-central1' to the cloud_sql_engines dictionary.💡 Why This Matters
🌍 Real World
Cloud SQL is a managed database service on Google Cloud Platform that supports popular database engines. Knowing how to configure supported engines and their versions is essential when setting up databases for applications.
💼 Career
Cloud engineers and developers often need to configure and manage Cloud SQL instances. Understanding how to represent and manipulate configuration data programmatically helps automate deployments and maintain infrastructure.
Progress0 / 4 steps