-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
google_project_service fails to produce consistent results. #6182
Comments
@mikhail-khodorovskiy I noticed that "}" is missing before |
I made a mistake copying the snippet of the code. I tried to only give you relevant parts where locally I have the API being enabled as part of an internal module. I tried destroying and recreating the API enablement a dozen of times and it always fails with the error I posted on the first apply. Did you try the exact versions of terraform and provider combination? I even tried with the google-beta provider and still got the same error. |
@mikhail-khodorovskiy your versions should be fine. I noticed your code are in modules. Can you test by putting your above code in a single |
I briefly moved the enabling of the service to my main and I still get the same error.
|
I think I need to explain a little more of what's going on: variable "activate_apis" {
type = list(string)
default = [
"cloudbuild.googleapis.com",
"cloudresourcemanager.googleapis.com",
"iamcredentials.googleapis.com",
]
}
module "project" {
source = "terraform-google-modules/project-factory/google"
version = "~> 8.0"
random_project_id = true
name = local.environment_name_with_suffix
billing_account = var.billing_account
auto_create_network = true
org_id = var.organization_id
folder_id = module.environment.environment_folder_id
lien = true
activate_apis = var.activate_apis
# the account should be deleted when the issue is resolved https://github.com/terraform-google-modules/terraform-google-project-factory/issues/243
default_service_account = "keep"
labels = local.common_labels
disable_services_on_destroy = false
skip_gcloud_download = true
} then in a different repo this time using the project editor terraform service account I want to add the enabled service list with the code from the issue above and this is when I get the problem. I know the service list is additive but some services may turn other ones on as well if the depend on them - not sure if this is the problem. I tried to find the ones that are enabled currently with the project factory setup and added the one in using the project services resource that's not on the currently enabled list and I still get that problem. Really hope to get some help here. |
@mikhail-khodorovskiy I am not sure how many projects are involved. Where do you run the terraform? What credential does it use? Does the credential has the required permissions in the projects where these services are intended to be enabled? Please double check if you have proper settings for the terraform runner. https://www.terraform.io/docs/providers/google/guides/getting_started.html#adding-credentials |
Would I not be getting the authentication error if the credentials were not specified or not privileged enough? As you can see in the logs above I am getting a number of HTTP responses with 404 errors codes while getting the services enabled. Does this look something that should be happening in the provider to you? |
@mikhail-khodorovskiy How are you managing the dependency ordering between project creation and API activation? This could also be happening if API activation is attempted before project creation is finished. |
@mikhail-khodorovskiy |
@mikhail-khodorovskiy I think it all depends. It sounds like a bug as you said |
@c2thorn is absolutely correct on this. We could mitigate this in the provider by accepting both values ( |
Thank you so much for all your help!!! It turns out all I had to do while looking up the project id is to change: data "google_projects" "tools_projects" {
filter = "labels.environment-name:${var.environment_name} AND labels.purpose:tools"
}
data "google_project" "tools_project" {
project_id = data.google_projects.tools_projects.projects[0].project_id # used to be id
} and it worked. The only feedback I have is I wish the provider gave me a better error to figure this out without your help. Close the issue please! |
@mikhail-khodorovskiy Thank for using the product and your feedback |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Terraform v0.12.23
Affected Resource(s)
Terraform v0.12.23
Terraform Configuration Files
Debug Output
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[16],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[22],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[23],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[24],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[7],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[13],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[12],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[9],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[26],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[10],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[1],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[2],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[30],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[4],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[25],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[28],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[5],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[19],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[17],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[21],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[15],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[20],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[8],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[0],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[3],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[29],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[27],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[14],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[11],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[6],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent result after apply
When applying changes to
module.chcs-dev.module.tools_project_setup.google_project_service.tools_project_apis[18],
provider "registry.terraform.io/-/google" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Error reading Google Cloud Storage Transfer service account not found: googleapi: Error 403: Storage Transfer API has not been used in project 644911759278 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/storagetransfer.googleapis.com/overview?project=644911759278 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry., accessNotConfigured
on ../../modules/data_transfer_project/main.tf line 40, in data "google_storage_transfer_project_service_account" "storage_transfer_sa":
40: data "google_storage_transfer_project_service_account" "storage_transfer_sa" {
Error: Error reading Google Cloud Storage Transfer service account not found: googleapi: Error 403: Storage Transfer API has not been used in project 644911759278 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/storagetransfer.googleapis.com/overview?project=644911759278 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry., accessNotConfigured
on ../../modules/logging/main.tf line 42, in data "google_storage_transfer_project_service_account" "org_logs":
42: data "google_storage_transfer_project_service_account" "org_logs" {
Panic Output
Expected Behavior
Actual Behavior
Steps to Reproduce
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: