thousands-knife-3009
03/11/2024, 3:49 AMgcp_oslogin_api = pulumi_gcp.projects.Service(
f"oslogin_service_api",
service="oslogin.googleapis.com",
project=gcp_project.project_id,
disable_dependent_services=True,
disable_on_destroy=True,
opts=pulumi.ResourceOptions(
parent=gcp_project,
depends_on=[gcp_resource_manager_api]
)
)
my_name_my_co_ssh_key = pulumi_gcp.oslogin.SshPublicKey(
'my_name_public_key',
key='my-key',
user='my email',
project=gcp_project.project_id,
opts=pulumi.ResourceOptions(
parent=gcp_project,
depends_on=[
gcp_project,
gcp_oslogin_api
],
),
)
Here's the error I'm getting:
gcp:oslogin:SshPublicKey (my_name_public_key):
error: 1 error occurred:
* Error creating SSHPublicKey: googleapi: Error 403: Cloud OS Login API has not been used in project project_id_pulumi before or it is disabled. Enable it by visiting <https://console.developers.google.com/apis/api/oslogin.googleapis.com/overview?project=project_id_pulumi> then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
Details:
[
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developers console API activation",
"url": "<https://console.developers.google.com/apis/api/oslogin.googleapis.com/overview?project=project_id_pulumi>"
}
]
},
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"domain": "googleapis.com",
"metadata": {
"consumer": "projects/project_id_pulumi",
"service": "oslogin.googleapis.com"
},
"reason": "SERVICE_DISABLED"
}
]
I have confirmed that oslogin is enabled in the project referenced by gcp_project.project_id
Clicking the link for <https://console.developers.google.com/apis/api/oslogin.googleapis.com/overview?project=project_id_pulumi>
takes me to a GCP page to enable the API in the project that is used to house the GCP storage bucket and the GCP service account that has privs to create and manage gcp_project.project_id
dry-keyboard-94795
03/11/2024, 10:56 AMdry-keyboard-94795
03/11/2024, 10:58 AMthousands-knife-3009
03/11/2024, 1:22 PMdry-keyboard-94795
03/11/2024, 1:23 PMthousands-knife-3009
03/11/2024, 1:25 PMdry-keyboard-94795
03/11/2024, 1:26 PMthousands-knife-3009
03/11/2024, 1:26 PM