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

App Engine API is required for creating a new project #389

Closed
dooman87 opened this issue Mar 3, 2020 · 4 comments · Fixed by #390
Closed

App Engine API is required for creating a new project #389

dooman87 opened this issue Mar 3, 2020 · 4 comments · Fixed by #390

Comments

@dooman87
Copy link

dooman87 commented Mar 3, 2020

Hi there,

I'm not sure if it's a bug, but I would like to know why appengine.googleapis.com is listed as required API for creating a new project? I believe it's coming from modules/core_project_factory/scripts/preconditions/preconditions.py (line 242):

    REQUIRED_APIS = [
        "admin.googleapis.com",
        "appengine.googleapis.com",
        "iam.googleapis.com",
        "cloudbilling.googleapis.com",
        "cloudresourcemanager.googleapis.com",
    ]

We've just started a new project and using terraform-google-modules to create our infra. And I got questions from colleagues about App Engine API is being enabled on all projects that creating other projects (we have a deep hierarchy of projects and pipelines running)

Btw, thanks a lot for creating and supporting these modules. They are very handy!

@morgante
Copy link
Contributor

morgante commented Mar 3, 2020

App Engine is not required, but optional. The reason is because App Engine is a project-level resource so it can be created through Project Factory: https://github.com/terraform-google-modules/terraform-google-project-factory/blob/master/docs/TROUBLESHOOTING.md#missing-api-appenginegoogleapiscom

If you're not using Project Factory to manage App Engine, there is no need to activate it.

@dooman87
Copy link
Author

dooman87 commented Mar 3, 2020

Thanks @morgante for a quick response. So, given I have terraform like that:

module "tools-project" {
  source  = "terraform-google-modules/project-factory/google"
  version = "~> 6.0"

  random_project_id = true
  name              = "tools"
  org_id            = var.org_id
  billing_account   = var.billing_account_id
  folder_id = var.folder_id

  activate_apis = [
    "cloudbuild.googleapis.com",
    "sourcerepo.googleapis.com"
  ]
}

If appengine API is not enabled on seed project then precondition check is failing when running code above and appengine.googleapis.com is listed as unsatisfied condition.

@morgante
Copy link
Contributor

morgante commented Mar 3, 2020

Got it, opened #390 to remove that precondition check.

@dooman87
Copy link
Author

dooman87 commented Mar 4, 2020

Awesome! Thanks a lot for such a quick turnaround @morgante !

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