Unable to view organizational policies of GCP organization I own - google-cloud-platform

Within an organization of which I am the sole admin, I am unable to enumerate and therefore manage the organizational policies from within the GCP console. Does anyone know why this might be and/or how I'd go about fixing it? Any guidance as to documentation that was perhaps missed during setup, etc. would be appreciated.

Organization Administrator includes the missing permissions resourcemanager.organizations.get along with orgpolicy.constraints.list and orgpolicy.policies.list.
Do note that this role is not automatically granted for being the sole user on the account, this has to be assigned via the IAM menu.
The Owner role does not have these permissions as the Owner is only limited on a Project level.

Related

Google Cloud: Why am I not an organization administrator?

I am attempting to expand my usage of Google Cloud and running into issues. When I go to IAM & Admin -> IAM and select my organization, I get an error: "You do not have sufficient permissions to view this page". A bit lower: "You are missing the following required permissions: resourcemanager.organizations.getIamPolicy".
I'm confused by this because if I select a project IN the organization I see I have the "Organization Administrator" role which has that exact permission assigned. I also have "Owner" role.
I also cannot upgrade from Basic support to any paid support due to this issue, so I literally cannot get any help from anyone at Google.
I created this org! Do I need to delete everything and start over? (ugh)
Based on what #JohnHanley's shared on the comments:
Organization Admin must be applied (bound) at the organization level. If you created the organization, then you have a Workspace or Identity account. Use that account to login. The problem should be easy to solve once you are using the correct account to authenticate.
In addittion to that;
To administer a particular project or product on GCP, you must ask your organization or the team managing your Google Workspace Admin to increase your role and authorization to a higher hierarchy.

Organization Admin somehow doesn't have access to create a folder in GCP?

I'm pretty sure this is an actual bug with GCP at the moment. I'm the Organization Admin for the GCP organization (I've quadruple checked this, and that I'm signed in with the correct account).
But when I go to Manage Resources, And try to create a new folder, it doesn't let me select the organization as the location, because I "don't have the required resourcemanager.folders.create permission". If I try to create the folder in a project that's in the organization, I get "Unknown error".
I'm the user who created the organization and all projects in the first place, and the only G-Suite user that even exists on this domain.
If you review the permissions that Organization Administrator has, resourcemanager.folders.create is not one of them.
IAM Roles
Org Admin by itself has almost infinite power because it can set IAM policies. This means the Org Admin can grant any IAM permission to any identity.
Grant yourself the required role such as roles/resourcemanager.folderAdmin.
Note: I recommend keeping the Org Admin as a separate identity that you lock away and only use to manage the organization. Create separate identities for day-to-day operations, development, and deployment.

Can't enable Cloud Build API (or any other) due missing permission. But what role contains the needed permission?

I want to create my Cloud Build API but I have not the proper permission. I know how to add permissions and am able to add roles to my IAM however the error message leaves me clueless in what permission I actually need or what role holds that permission.
These are my current roles:
Service Account Key Admin
Organization Administrator
Project IAM Admin
Can someone give me the role or permission name so I can look it up?
Following the official IAM documentation on Cloud Build, I think that the role of roles/cloudbuild.builds.editor could serve you well, since it grants full control of Cloud Build resources. Even though you have set the correct IAM permissions, you need to specify an specific role for this API. Please, tell me if this has helped you.
The Editor role seems to contain the needed permission. However it has a lot of excess permissions so it's not the perfect solution

Terraform GCP service_account vs project vs org

i am picking up terraform for GCP and i came across these three resources:
google_service_account_iam_member
google_project_iam_member
google_organization_iam_member
They sound very similar to each other but certainly with some key differences.
I went through their docs but their differences were not absolutely clear to me. Is there any easy way to illustrate the difference between these?
Thanks
Within GCP, there is a hierarchy: Organization, Project, Resource
The IAM policies you mentioned behaves the same; however, works on different levels based on the hierarchy.
For example, the google_project_iam_member will update the IAM policy to grant a role to a new member on the project level.
The google_organization_iam_member will do the same thing, but on the Organization level (which is a level higher than the project).
Update:
The google_service_account_iam_member will work on every level depending on what you would like the service account to do. You can either have the service account act as an identity or just have it run a certain resouce. A service account can be added on all three levels.
As described before the google_project_iam_member and google_organization_iam_member, are used to manager IAM permission in the project or organization level. You can also manage permission on the folder level.
When, IAM is granted on the org level all folders and projects inherit that permission. When granted in the folder, alll projects and sub folders under that folder will inherit that permission.
Permissions can also be managed at resource level, the google_service_account_iam_member allow to grant permission to manage the service account and use the service account in the service account level. That helpful when you want to grant more restricted permissions and grant access to a single service account instead of all service accounts from the project.
Thanks,
Eduardo Ruela

Several missing permissions on GCP Console after account signup

Yesterday, I signed up for a Google Cloud Account. Since I want to link the user access with our own identity platform, I followed the instructions from this article:
https://cloud.google.com/blog/products/identity-security/using-your-existing-identity-management-system-with-google-cloud-platform
I got as far as the account is created but in the GCP Console, on several screens, I get errors of missing permissions to view things, let alone change things. Here is an example:
I was the one who created the account and in IAM I am listed as the Organization Administrator. How come I am missing so much permissions? Who within Google Cloud Support is listening/reading this and is able to help me?
This is not a bug that needs to be fixed. As the Owner, you can add any roles that you need to your account. Neither the Owner nor the Organization Administrator have all roles assigned. You can, however, add desired roles to grant your identity more permissions. Consult the documentation for permissions assigned to each role. Then add the required roles to your identity (email address).
However, I recommend that you do not use an account with Owner or Organization Admin roles. Lock that identity in your safe after creating several new identities that use the principles of least privilege and have MFA enabled.