I'm trying to setup the google cloud IoT core api in my project so that i can create an MQTT broker for a raspberry pi 4 to connect to my VM instance/server, but when it's time to setup the Cloud IoT core i keep on getting the same error over & over.
I was running through a tutorial on creating a device registry under the google cloud IoT core, the tutorial told me to create a device registry using this code
gcloud iot registries create
my-registry
--project=eegr-4pf-390-project
--region=us-central1
--event-notification-config=topic=projects/eegr-4pf-390-project/topics/my-topic
Then i get met with this request from the cloud shell:
API [cloudiot.googleapis.com] not enabled on project [295150708670]. Would you like to enable and retry (this will take a few
minutes)? (y/N)?
I hit the Y to attempt to enable the necessary API, but then i get hit with this response after a few seconds:
Enabling service [cloudiot.googleapis.com] on project [295150708670]... ERROR: (gcloud.iot.registries.create) PERMISSION_DENIED: Permission denied to enable service [cloudiot.googleapis.com] Help Token: Af4HWuKfO9fwsO14O_Ls0u10TTmMeGYSHXeWcSjBEt-Y448YJT0gBt0Z8vz03m5j78V4kUagafizS9PnyoPrtGSl50jrGgJvMSEyBHjZ6aN-GeFp
- '@type': type.googleapis.com/google.rpc.PreconditionFailure
violations:
- subject: ?error_code=110002&service=servicemanagement.googleapis.com&permission=servicemanagement.services.bind&resource=295150708670 type: googleapis.com
- '@type': type.googleapis.com/google.rpc.ErrorInfo domain: serviceusage.googleapis.com metadata: permission: servicemanagement.services.bind resource: '295150708670' service: servicemanagement.googleapis.com reason: AUTH_PERMISSION_DENIED
I got this error and i started looking around as to why, one site said to check if your project is under your billing, i made sure check that & i was still getting the error, another site said to check if your project ID is being set under the gcloud commands, i made sure to check that, i'm still getting the same error and now i'm out of ideas for possible fixes, i'm not sure where to try or to go to, though i will say when i looked up the API through the google cloud platofrm API libaries it wasn't showing up, maybe it's under a new name? i'm not sure, but i desprately need help on trying to install the Cloud IoT core API.
My IAM roles applied to my personal email:Editor, Owner, Cloud IoT Admin, API gateway admin