How to fix Error creating service account googleapi Error 403 Identity and Access Management (IAM) API has not been used in project before or it is disabled
In this article we are going to see - How to fix the issue - Error creating service account googleapi Error 403 Identity and Access Management (IAM) API has not been used in project 4686446XXXX before or it is disabled
(In case you need help with setting GCP Compute instance here is the guide)
Issue
I also faced this issue when I was trying to create my first GCP Compute Instance using terraform.
Here are my assumption on the steps you might have already done -
- You have already installed Terraform on your system (Click here for installation guide)
- You are able to run
terraform init
command successfully - You are able to run
terraform plan
also. - But when you ran
terraform apply
you saw the error
1google_service_account.default: Creating...
2google_compute_instance.default: Creating...
3
4Error: Error creating service account: googleapi: Error 403: Identity and Access Management (IAM) API has not been
5used in project 46864460xxxx before or it is disabled. Enable it by visiting https://console.developers.google.
6com/apis/api/iam.googleapis.com/overview?project=46864460xxxx then retry. If you enabled this API recently, wait a
7few minutes for the action to propagate to our systems and retry., accessNotConfigured
How to fix the issue
To fix this issue you need to ENABLE to enable the project.
How to enable the project
From the error log you need to copy the URL .i.e. -
1https://console.developers.google.com/apis/api/iam.googleapis.com/overview?project=46864460xxxx
Open this URL into the browser -
Once you enable the project and re-run terraform apply
then your error should be gone.
Read More -
- Install terraform on Ubuntu 20.04, CentOS 8, MacOS, Windows 10, Fedora 33, Red hat 8 and Solaris 11
- How to setup Virtual machine on Google Cloud Platform using terraform
- Create EC2 Instance on AWS using terraform
- How to use Terraform Input Variables
- What is variable.tf and terraform.tfvars?
- How to use Terraform locals?
- How to use Terraform output values?
- Understanding terraform count, for_each and for loop?
- Cloud-nuke : How to nuke AWS resources and save additional AWS infrastructure cost?
- How to use Terraform Dynamic blocks?
- How to use Terraform resource meta arguments?
- How to use Terraform Data sources?
- What is terraform provisioner?
- Terraform how to do SSH in AWS EC2 instance?
- How Terraform modules works?
- How to run specific terraform resource?
- How to use Workspaces in Terraform?
- Securing AWS secrets using HashiCorp Vault with Terraform?
- Managing Terraform states?
- Terraform state locking using DynamoDB (aws_dynamodb_table)
- Terraform and AWS credentials handling?
- Terraform and AWS Multi account Setup?
Terragrunt -
Posts in this Series
- How to use Terragrunt?
- Terraform and AWS Multi account Setup?
- Terraform and AWS credentials handling?
- How to fix-error configuring S3 Backend no valid credential sources for S3 Backend found?
- Terraform state locking using DynamoDB (aws_dynamodb_table)?
- Managing Terraform states?
- Securing AWS secrets using HashiCorp Vault with Terraform?
- How to use Workspaces in Terraform?
- How to run specific terraform resource, module, target?
- How Terraform modules works?
- Terraform how to do SSH in AWS EC2 instance?
- What is terraform provisioner?
- Is terraform destroy needed before terraform apply?
- How to fix terraform error Your query returned no results. Please change your search criteria and try again?
- How to use Terraform Data sources?
- How to use Terraform resource meta arguments?
- How to use Terraform Dynamic blocks?
- Terraform - How to nuke AWS resources and save additional AWS infrastructure cost?
- Understanding terraform count, for_each and for loop?
- How to use Terraform output values?
- How to use Terraform locals?
- How to fix error configuring Terraform AWS Provider error validating provider credentials error calling sts GetCallerIdentity SignatureDoesNotMatch?
- How to fix Invalid function argument on line in provider credentials file google Invalid value for path parameter no file exists
- How to fix error value for undeclared variable a variable named was assigned on the command line?
- What is variable.tf and terraform.tfvars?
- How to use Terraform Input Variables
- Terraform create EC2 Instance on AWS
- How to fix Error creating service account googleapi Error 403 Identity and Access Management (IAM) API has not been used in project before or it is disabled
- How to setup Virtual machine on Google Cloud Platform
- Install terraform on Ubuntu 20.04, CentOS 8, MacOS, Windows 10, Fedora 33, Red hat 8 and Solaris 11