Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

random error when enabling apis #461

Closed
antoinecastex opened this issue Sep 28, 2020 · 7 comments
Closed

random error when enabling apis #461

antoinecastex opened this issue Sep 28, 2020 · 7 comments

Comments

@antoinecastex
Copy link

Hello

Just want to enable couple of apis with this sample code

resource "google_project_service" "service" {
provider = google-beta
for_each = toset(var.APIS)
service = each.key
project = var.PROJECT_ID
disable_on_destroy = false
depends_on = [
google_project_service.service_default
]
}

But randomly got an error for some apis (not the same every time so it's not related to specific api) like this

Step #1: Error: Request "Enable Project Service "cloudscheduler.googleapis.com" for project "itg-hip-emea-ww-pd"" returned error: failed to send enable services request: googleapi: Error 400: Another activation or deactivation is in progress for the following service(s): cloudscheduler.googleapis.com and project itg-hip-emea-ww-pd., failedPrecondition

Step #1: Error: Request "Enable Project Service "redis.googleapis.com" for project "itg-hip-emea-ww-dv"" returned error: failed to send enable services request: googleapi: Error 400: Another activation or deactivation is in progress for the following service(s): redis.googleapis.com and project itg-hip-emea-ww-dv., failedPrecondition

Step #1: Error: Request "Enable Project Service "endpoints.googleapis.com" for project "it-selloutacd-fr-emea-dv"" returned error: failed to send enable services request: googleapi: Error 400: Another activation or deactivation is in progress for the following service(s): endpoints.googleapis.com and project it-selloutacd-fr-emea-dv., failedPrecondition

Step #1: Error: Request "Enable Project Service "dataflow.googleapis.com" for project "it-selloutacd-fr-emea-dv"" returned error: failed to send enable services request: googleapi: Error 400: Another activation or deactivation is in progress for the following service(s): dataflow.googleapis.com and project it-selloutacd-fr-emea-dv., failedPrecondition

Step #1: Error: Request "Enable Project Service "dataflow.googleapis.com" for project "it-selloutacd-fr-emea-dv"" returned error: failed to send enable services request: googleapi: Error 400: Another activation or deactivation is in progress for the following service(s): dataflow.googleapis.com and project it-selloutacd-fr-emea-dv., failedPrecondition

Step #1: Error: Request "Enable Project Service "stackdriver.googleapis.com" for project "it-onereporting-fr-emea-dv"" returned error: failed to send enable services request: googleapi: Error 400: Another activation or deactivation is in progress for the following service(s): stackdriver.googleapis.com and project it-onereporting-fr-emea-dv., failedPrecondition

Step #1: Error: Request "Enable Project Service "run.googleapis.com" for project "it-selloutdpl-fr-emea-dv"" returned error: failed to send enable services request: googleapi: Error 400: Another activation or deactivation is in progress for the following service(s): run.googleapis.com and project it-selloutdpl-fr-emea-dv., failedPrecondition

If apis in error change every time i create a new project, that mean it's not specific api dependencies , i think it's latency general api but not sure , and how to solve that ?

thanks

@morgante
Copy link
Contributor

What version of Terraform, the module, and the provider are you using? terraform version

@bharathkkb
Copy link
Member

bharathkkb commented Sep 28, 2020

@antoinecastex Could you provide the full list of APIs you are trying to enable and provider version?
@morgante I think this is an upstream issue; ref: hashicorp/terraform-provider-google#7103

@antoinecastex
Copy link
Author

What version of Terraform, the module, and the provider are you using? terraform version

@morgante i'm using beta the last one because cloud build manage everything for me : * hashicorp/google-beta: version = "~> 3.40.0"

@antoinecastex
Copy link
Author

@antoinecastex Could you provide the full list of APIs you are trying to enable and provider version?
@morgante I think this is an upstream issue; ref: hashicorp/terraform-provider-google#7103

@bharathkkb here is my apis

bigquery.googleapis.com

storage-component.googleapis.com
cloudfunctions.googleapis.com
run.googleapis.com
datastore.googleapis.com
endpointsportal.googleapis.com
dataflow.googleapis.com
apigateway.googleapis.com
appengine.googleapis.com
sql-component.googleapis.com
redis.googleapis.com
storagetransfer.googleapis.com
iap.googleapis.com
dlp.googleapis.com
workflows.googleapis.com
sqladmin.googleapis.com
endpoints.googleapis.com
bigquerystorage.googleapis.com
storage-api.googleapis.com
sqladmin.googleapis.com
datacatalog.googleapis.com
serviceusage.googleapis.com
iamcredentials.googleapis.com
pubsub.googleapis.com
storage-component.googleapis.com
cloudbuild.googleapis.com
monitoring.googleapis.com
cloudresourcemanager.googleapis.com
clouddebugger.googleapis.com
logging.googleapis.com
monitoring.googleapis.com
cloudtrace.googleapis.com
cloudtasks.googleapis.com
cloudscheduler.googleapis.com
sourcerepo.googleapis.com
cloudkms.googleapis.com
networkmanagement.googleapis.com
iam.googleapis.com
oslogin.googleapis.com
resourceviews.googleapis.com
servicemanagement.googleapis.com
stackdriver.googleapis.com
vpcaccess.googleapis.com
container.googleapis.com
compute.googleapis.com

@antoinecastex
Copy link
Author

@bharathkkb any help on that please ?

@bharathkkb
Copy link
Member

@antoinecastex Apologies for the late reply but this does seem like a provider issue. I would suggest bumping to 3.42.0 and failing that opening an issue like this hashicorp/terraform-provider-google#7103

@antoinecastex
Copy link
Author

hashicorp/google-beta: version = "~> 3.42.0". problem is still here @bharathkkb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants