0
0
GCPcloud~10 mins

Organization node in GCP - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the root node type for a GCP Organization.

GCP
resource "google_folder" "example" {
  display_name = "My Folder"
  parent       = "[1]/123456789"
}
Drag options to blanks, or click blank then click option'
Aorganizations
Bprojects
CbillingAccounts
Dfolders
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'projects' or 'billingAccounts' as the parent node, which are not valid for folders.
Using 'folders' as the parent when creating a top-level folder under the organization.
2fill in blank
medium

Complete the code to define the organization ID in a Terraform variable.

GCP
variable "org_id" {
  type        = string
  description = "The GCP Organization ID"
  default     = "[1]"
}
Drag options to blanks, or click blank then click option'
Amy-project-123
Bbilling-123456
Cfolder-123456
D123456789012
Attempts:
3 left
💡 Hint
Common Mistakes
Using project or folder names instead of the numeric organization ID.
Using billing account IDs which are unrelated.
3fill in blank
hard

Fix the error in the resource parent reference to correctly link to the organization node.

GCP
resource "google_project" "my_project" {
  name       = "My Project"
  project_id = "my-project-123"
  organization_id     = "[1]"
  parent     = "organizations/123456789012"
}
Drag options to blanks, or click blank then click option'
Aparent
Borg_id
Corganization_id
Dorganization
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'org_id' or 'organization' which are not recognized attributes.
Confusing 'parent' with the organization ID attribute.
4fill in blank
hard

Fill both blanks to create a folder under the organization node with the correct parent path and display name.

GCP
resource "google_folder" "my_folder" {
  display_name = "[1]"
  parent       = "[2]/123456789012"
}
Drag options to blanks, or click blank then click option'
AEngineering
Bprojects
Corganizations
DBilling
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'projects' as the parent node which is invalid for folders.
Using unrelated display names that do not describe the folder purpose.
5fill in blank
hard

Fill all three blanks to define a project with the correct name, parent type, and parent ID under the organization node.

GCP
resource "google_project" "my_project" {
  name       = "[1]"
  project_id = "my-project-123"
  parent {
    type = "[2]"
    id   = "[3]"
  }
}
Drag options to blanks, or click blank then click option'
AMy Project
Borganization
C123456789012
Dfolder
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'folder' as parent type when the project is under an organization.
Using incorrect or missing parent ID.