Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
Labs

Understanding Service Accounts on Google Compute Engine

In this lab, we create a custom service account with granular IAM permissions, then use the service account when creating a Compute Engine instance that will run the WordPress blogging software connected to a Cloud SQL database.

Lab platform
Lab Info
Level
Beginner
Last updated
Apr 06, 2025
Duration
30m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Create a Cloud SQL Instance
    1. Create a new Cloud SQL MySQL instance with the name wordpress-db.
    2. Generate a root password and note it for later.
    3. Make sure you have the Region set as us-central1 and the Zone as Any.
    4. Under Connectivity, tick Private IP.
    5. Enable Service Networking API.
    6. Under Associated networking, select the default Network.
    7. Choose to use an automatically allocated IP range.
    8. Untick Public IP to remove public IP connections from this instance.
    9. Change the machine type to Shared Core, 1 vCPU, 1.7 GB..
  2. Challenge

    Create a Custom Service Account
    1. Create a new service account named wordpress-app.
    2. When prompted to Grant this service account access to project, type SQL in the Select a role box to search roles, then select Cloud SQL Client.
  3. Challenge

    Create the WordPress Instance on Compute Engine
    1. Create a new instance named wordpress.
    2. Set the Region to us-central1 (the console will choose a zone for you).
    3. Change the Machine type to e2-small.
    4. Have the instance deploy a container to the VM instance, and use the container wordpress.
    5. For our service account, make sure to select wordpress-app.
    6. Allow all HTTP traffic on the instance.
    7. Use the VM's External IP link to see the WordPress language selection screen.
  4. Challenge

    Set Up WordPress and the Database

    Before we configure WordPress, we must first create the database inside our new Cloud SQL instance.

    1. Take note of the private IP for our wordpress-db instance.
    2. Create a new database with the name wordpress.

    Complete the rest of these steps in WordPress:

    1. Choose your preferred language, then on the next screen click Let's go!.
    2. Update the connection details to match the following:
      • Database name: wordpress
      • Username: root
      • Password: The root password you noted earlier.
      • Database Host: The private IP you noted earlier.
      • Table Prefix: wp_
    3. Run the installation.
About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight