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

feat: add confidential nodes example #2227

Conversation

arthurlapertosa
Copy link
Contributor

No description provided.

@arthurlapertosa arthurlapertosa marked this pull request as ready for review December 31, 2024 21:06
@arthurlapertosa arthurlapertosa requested review from apeabody, ericyz and a team as code owners December 31, 2024 21:06
@arthurlapertosa
Copy link
Contributor Author

cc @erlanderlo

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

A few initial notes to get the tests ready.

@apeabody apeabody self-assigned this Jan 2, 2025
@apeabody
Copy link
Collaborator

apeabody commented Feb 3, 2025

Hi @arthurlapertosa - Checking if you are still working on this PR. Thanks!

@arthurlapertosa arthurlapertosa force-pushed the confidential-nodes-example branch 3 times, most recently from 566db85 to 01c38e2 Compare February 6, 2025 16:49
@arthurlapertosa arthurlapertosa force-pushed the confidential-nodes-example branch from 01c38e2 to 0f7a5f9 Compare February 6, 2025 16:50
build/int.cloudbuild.yaml Outdated Show resolved Hide resolved
@apeabody
Copy link
Collaborator

Hi @arthurlapertosa - Looks like we are getting a perma-drift during the new test:

Step #88 - "verify test-confidential-safer-cluster": TestConfidentialSaferCluster 2025-02-10T19:23:45Z command.go:185: Terraform used the selected providers to generate the following execution
Step #88 - "verify test-confidential-safer-cluster": TestConfidentialSaferCluster 2025-02-10T19:23:45Z command.go:185: plan. Resource actions are indicated with the following symbols:
Step #88 - "verify test-confidential-safer-cluster": TestConfidentialSaferCluster 2025-02-10T19:23:45Z command.go:185:   ~ update in-place
Step #88 - "verify test-confidential-safer-cluster": TestConfidentialSaferCluster 2025-02-10T19:23:45Z command.go:185: 
Step #88 - "verify test-confidential-safer-cluster": TestConfidentialSaferCluster 2025-02-10T19:23:45Z command.go:185: Terraform will perform the following actions:
Step #88 - "verify test-confidential-safer-cluster": TestConfidentialSaferCluster 2025-02-10T19:23:45Z command.go:185: 
Step #88 - "verify test-confidential-safer-cluster": TestConfidentialSaferCluster 2025-02-10T19:23:45Z command.go:185:   # module.example.module.gcp-network.module.subnets.google_compute_subnetwork.subnetwork["us-central1/confidential-safer-subnet"] will be updated in-place
Step #88 - "verify test-confidential-safer-cluster": TestConfidentialSaferCluster 2025-02-10T19:23:45Z command.go:185:   ~ resource "google_compute_subnetwork" "subnetwork" {
Step #88 - "verify test-confidential-safer-cluster": TestConfidentialSaferCluster 2025-02-10T19:23:45Z command.go:185:         id                         = "projects/ci-gke-3c5ba238-672b/regions/us-central1/subnetworks/confidential-safer-subnet"
Step #88 - "verify test-confidential-safer-cluster": TestConfidentialSaferCluster 2025-02-10T19:23:45Z command.go:185:         name                       = "confidential-safer-subnet"
Step #88 - "verify test-confidential-safer-cluster": TestConfidentialSaferCluster 2025-02-10T19:23:45Z command.go:185:       ~ private_ip_google_access   = true -> false
Step #88 - "verify test-confidential-safer-cluster": TestConfidentialSaferCluster 2025-02-10T19:23:45Z command.go:185:         # (18 unchanged attributes hidden)
Step #88 - "verify test-confidential-safer-cluster": TestConfidentialSaferCluster 2025-02-10T19:23:45Z command.go:185: 
Step #88 - "verify test-confidential-safer-cluster": TestConfidentialSaferCluster 2025-02-10T19:23:45Z command.go:185:         # (2 unchanged blocks hidden)
Step #88 - "verify test-confidential-safer-cluster": TestConfidentialSaferCluster 2025-02-10T19:23:45Z command.go:185:     }
Step #88 - "verify test-confidential-safer-cluster": TestConfidentialSaferCluster 2025-02-10T19:23:45Z command.go:185: 
Step #88 - "verify test-confidential-safer-cluster": TestConfidentialSaferCluster 2025-02-10T19:23:45Z command.go:185: Plan: 0 to add, 1 to change, 0 to destroy.

Perhaps add subnet_private_access = true to your new test subnet.

@arthurlapertosa
Copy link
Contributor Author

@apeabody Thanks for the help!!
Looks like TestPrivateZonalWithNetworking is failing now? The output is too large, it's kinda difficult to know exactly what is going on...

@apeabody
Copy link
Collaborator

Hmm - Looks like a new resourceLabels was automatically added to the cluster, once confirmed, we'll need to adjust the test:

Step #76 - "verify private-zonal-with-networking":         	            	Diff:
Step #76 - "verify private-zonal-with-networking":         	            	--- Expected
Step #76 - "verify private-zonal-with-networking":         	            	+++ Actual
Step #76 - "verify private-zonal-with-networking":         	            	@@ -1,2 +1,2 @@
Step #76 - "verify private-zonal-with-networking":         	            	-(map[string]interface {}) (len=15) {
Step #76 - "verify private-zonal-with-networking":         	            	+(map[string]interface {}) (len=16) {
Step #76 - "verify private-zonal-with-networking":         	            	  (string) (len=10) "diskSizeGb": (float64) 100,
Step #76 - "verify private-zonal-with-networking":         	            	@@ -26,2 +26,5 @@
Step #76 - "verify private-zonal-with-networking":         	            	  },
Step #76 - "verify private-zonal-with-networking":         	            	+ (string) (len=14) "resourceLabels": (map[string]interface {}) (len=1) {
Step #76 - "verify private-zonal-with-networking":         	            	+  (string) (len=37) "goog-gke-node-pool-provisioning-model": (string) (len=9) "on-demand"
Step #76 - "verify private-zonal-with-networking":         	            	+ },
Step #76 - "verify private-zonal-with-networking":         	            	  (string) (len=14) "serviceAccount": (string) (len=15) "SERVICE_ACCOUNT",
Step #76 - "verify private-zonal-with-networking":         	Test:       	TestPrivateZonalWithNetworking

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.

@apeabody
Copy link
Collaborator

Leave as feat as it makes minor changes to safer_cluster modules.

@apeabody apeabody merged commit 2ae739b into terraform-google-modules:main Feb 12, 2025
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