Open
Description
Describe the bug
There are a few resources that don't have the project
argument set. They are:
google_pubsub_topic.feed_output
google_service_account.service_account
google_project_iam_custom_role.enrichment_project_role
If you are not setting a provider block, ie
provider "google" {
project = "example-project-id"
}
Then the module will fail. All other resources make use of the var.project_id
.
Reproducing the Bug
Steps to reproduce the behavior:
- Do not set a Google provider block with a project defined
- Try to apply the code
Expected Behavior
Resources created even without a provider block with a project defined.
Screenshots
Output from a run before adding a provider block with a project:
Error: Failed to retrieve project, pid: , err: project: required field is not set
with module.enrichment.google_pubsub_topic.feed_output,
on .terraform/modules/enrichment/terraform-gcp-enrichment/pubsub.tf line 18, in resource "google_pubsub_topic" "feed_output":
18: resource "google_pubsub_topic" "feed_output" {
Error: Failed to retrieve project, pid: , err: project: required field is not set
with module.enrichment.google_service_account.service_account,
on .terraform/modules/enrichment/terraform-gcp-enrichment/service_account.tf line 1, in resource "google_service_account" "service_account":
1: resource "google_service_account" "service_account" {
Error: Failed to retrieve project, pid: , err: project: required field is not set
with module.enrichment.google_project_iam_custom_role.enrichment_project_role,
on .terraform/modules/enrichment/terraform-gcp-enrichment/service_account.tf line 18, in resource "google_project_iam_custom_role" "enrichment_project_role":
18: resource "google_project_iam_custom_role" "enrichment_project_role" {
Metadata
Metadata
Assignees
Labels
No labels