Private GKE endpoint support with Terraform Agents #95
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Issues Closed
Brief Summary
Add private GKE endpoint configuration and Terraform Cloud Agent support for GCP.
Detailed Summary
This PR adds support for running Terraform Cloud agents on GCP bastion hosts and enables configuration of private GKE endpoints. The Terraform Cloud agent is now conditionally installed when
tfc_agent_tokenis provided, allowing Terraform runs to execute from the bastion. Additionally, the GKE cluster configuration has been updated to support disabling the public endpoint and using only private endpoints for enhanced security. The PR also includes fixes for deprecated Kubernetes resources and improvements to bastion instance template management.Changes
tfc_agent_tokenis providedprivate-clustersubmodule (v41.0.0)disable_public_endpointvariable to control GKE public/private endpoint configurationkubernetes_namespace,kubernetes_config_map,kubernetes_secret) to v1 versionsgoogle-betaprovider for compatibility with private-cluster submoduleUnrelated Changes
Future Work
Steps to Test
Terraform Cloud Agent:
tfc_agent_tokeninvar.auto.tfvarsdocker ps | grep tfc-agentdocker logs tfc-agentPrivate GKE Endpoint:
disable_public_endpoint = truein cluster variablesterraform planto verify cluster replacement is plannedgcp_public_cidrs_access_enabled = falsein cluster configKubernetes Resources:
QA Notes
disable_public_endpointfromfalsetotrue(or vice versa) will trigger a full cluster replacement. This is destructive and will require downtime unless workloads are manually migrated first.Deployment Notes
terraform init -upgradebefore applying.private-clustersubmodule. Existing clusters will need to be migrated or recreated.disable_public_endpointdefaults tofalse(maintains current behavior). Set totrueto enable private-only endpoint.tfc_agent_tokento be set invar.auto.tfvarsfor the agent to be installed. If not provided, Docker and agent installation is skipped.Screenshots