data "google_project" "project" {}
output "test" {
value = data.google_project.project.org_id
}
This will get you the numeric org ID.
You can also pass that to an org data resource, but the human readable value will likely be there as domain vs name; the “name” attribute will be organizations/NNNNNNNNNNN when NNNNNNNNNNN is the numeric ID.
data "google_project" "project" {}
data "google_organization" "org" {
organization = data.google_project.project.org_id
}
output "org_id" {
value = data.google_project.project.org_id
}
output "org_name" {
value = data.google_organization.org
}