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: Add project ID to the fleet feature membership for ASM #1832

Merged
merged 3 commits into from
Jan 11, 2024

Conversation

legal90
Copy link
Contributor

@legal90 legal90 commented Dec 28, 2023

That resource was added recently in #1702

Bit I get this error when I try to apply it with my config:

# module "gke" { ... }

module "asm" {
  source = "[email protected]:terraform-google-modules/terraform-google-kubernetes-engine.git//modules/asm?ref=3c9a634ceef3fe8fc073de161f17f0064f424c04"

  project_id                = var.project_id
  cluster_name              = module.gke.name
  cluster_location          = module.gke.location
  mesh_management           = "MANAGEMENT_AUTOMATIC"
  multicluster_mode         = "connected"
  enable_cni                = true
  enable_fleet_registration = true
  enable_mesh_feature       = true
}
$ terraform plan
 <...>
╷
│ Error: 1 error occurred:
│ 	* Failed to retrieve project, pid: , err: project: required field is not set
│
│
│
│   with module.asm.google_gke_hub_feature_membership.mesh_feature_membership[0],
│   on .terraform/modules/asm/modules/asm/hub.tf line 37, in resource "google_gke_hub_feature_membership" "mesh_feature_membership":
│   37: resource "google_gke_hub_feature_membership" "mesh_feature_membership" {
│
╵

I fix it in this PR just by adding project argument explicitly.
After that fix it works as expected.

cc @ferrarimarco

@legal90 legal90 requested review from ericyz and a team as code owners December 28, 2023 08:11
@legal90 legal90 changed the title fix: Add project_id to fleet feature membership for ASM fix: Add project ID to the fleet feature membership for ASM Dec 28, 2023
@apeabody
Copy link
Collaborator

Thanks @legal90! @ferrarimarco would you be able to review?

/gcbrun

@legal90 legal90 force-pushed the fix-asm-project-id branch from 58b0783 to 2ef7031 Compare January 3, 2024 16:33
It fixes this error:
> * Failed to retrieve project, pid: , err: project: required field is not set
@legal90 legal90 force-pushed the fix-asm-project-id branch from 2ef7031 to f878b05 Compare January 4, 2024 08:34
@ferrarimarco
Copy link
Contributor

Hi! I'll have a look!

Copy link
Contributor

@ferrarimarco ferrarimarco left a comment

Choose a reason for hiding this comment

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

@apeabody LGTM.

/cc @jbrook

@apeabody
Copy link
Collaborator

apeabody commented Jan 8, 2024

/gcbrun

@apeabody apeabody self-assigned this Jan 8, 2024
@apeabody
Copy link
Collaborator

apeabody commented Jan 9, 2024

/gcbrun

@apeabody
Copy link
Collaborator

/gcbrun

Copy link
Collaborator

@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 @legal90!

Thanks for the review @ferrarimarco!

@apeabody apeabody merged commit 1835f80 into terraform-google-modules:master Jan 11, 2024
4 checks passed
CPL-markus pushed a commit to WALTER-GROUP/terraform-google-kubernetes-engine that referenced this pull request Jul 15, 2024
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.

3 participants