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

fix: Include cloudkms.googleapis.com API to activate when encrypt_gcs_bucket_tfstate set to true #302

Merged
merged 3 commits into from
Aug 8, 2024

Conversation

lpezet
Copy link
Contributor

@lpezet lpezet commented Jul 13, 2024

… set to true.

@lpezet lpezet requested a review from a team as a code owner July 13, 2024 20:28
@lpezet
Copy link
Contributor Author

lpezet commented Jul 13, 2024

I tried running make docker_test_lint and make docker_test_prepare (before my changes and even after my changes) but I got some errors (same errors) both times.
The make docker_test_lint gave me (again, using pristine version from main):

...
terraform_validate ./test/integration/im_cloudbuild_workspace_github/files
Success! The configuration is valid.

terraform_validate ./test/integration/im_cloudbuild_workspace_gitlab/files
Success! The configuration is valid.

terraform_validate ./test/setup
Success! The configuration is valid.

ENABLE_BPMETADATA not set to 1. Skipping metadata validation.
Error: The following tests have failed: check_whitespace
make: *** [Makefile:74: docker_test_lint] Error 1

And make docker_test_prepare gave me:

...
module.project.module.project-factory.module.project_services.google_project_service.project_services["cloudresourcemanager.googleapis.com"]: Creation complete after 1m0s [id=ci-bootstrap-6374/cloudresourcemanager.googleapis.com]
module.project.module.project-factory.module.project_services.google_project_service.project_services["secretmanager.googleapis.com"]: Still creating... [1m10s elapsed]
module.project.module.project-factory.module.project_services.google_project_service.project_services["secretmanager.googleapis.com"]: Creation complete after 1m12s [id=ci-bootstrap-6374/secretmanager.googleapis.com]
╷
│ Error: Request `Enable Project Service "sourcerepo.googleapis.com" for project "ci-bootstrap-6374"` returned error: Batch request and retried single request "Enable Project Service \"sourcerepo.googleapis.com\" for project \"ci-bootstrap-6374\"" both failed. Final error: failed to enable services: failed on request preconditions: googleapi: Error 403: Permission denied to enable service [sourcerepo.googleapis.com]
│ Help Token: ARZIt86OfxpUmldE3sg5_iLxJEi3g6JgEuWBCIbM4I-GEassILjROvY2vbKXjjbACWHeL5BzZFnDhFtYP5jglA6_aGnQneZv52GXGQ4Bv6RXquTN
│ Details:
│ [
│   {
│     "@type": "type.googleapis.com/google.rpc.PreconditionFailure",
│     "violations": [
│       {
│         "subject": "?error_code=110002\u0026service=servicemanagement.googleapis.com\u0026permission=servicemanagement.services.bind\u0026resource=ci-bootstrap-6374",
│         "type": "googleapis.com"
│       }
│     ]
│   },
│   {
│     "@type": "type.googleapis.com/google.rpc.ErrorInfo",
│     "domain": "serviceusage.googleapis.com",
│     "metadata": {
│       "permission": "servicemanagement.services.bind",
│       "resource": "ci-bootstrap-6374",
│       "service": "servicemanagement.googleapis.com"
│     },
│     "reason": "AUTH_PERMISSION_DENIED"
│   }
│ ]
│ , forbidden
│ 
│   with module.project.module.project-factory.module.project_services.google_project_service.project_services["sourcerepo.googleapis.com"],
│   on .terraform/modules/project/modules/project_services/main.tf line 31, in resource "google_project_service" "project_services":
│   31: resource "google_project_service" "project_services" {
│ 
╵
make: *** [Makefile:37: docker_test_prepare] Error 1

@apeabody
Copy link
Contributor

apeabody commented Aug 7, 2024

/gcbrun

Copy link
Contributor

@apeabody apeabody left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @lpezet!

@apeabody apeabody merged commit 1121fa2 into terraform-google-modules:master Aug 8, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants