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: Disable gcp_public_cidrs_access_enabled by default #62

Merged
merged 3 commits into from
Jan 16, 2025

Conversation

ciiiii
Copy link
Member

@ciiiii ciiiii commented Jan 16, 2025

Disable this flag to block access from random GCP VM when master_authorized_networks is configured

Google Cloud external IP addresses:
External IP addresses assigned to any VM used by any customer hosted on Google Cloud. Google Cloud owns these IP addresses. To learn more, see Where can I find Compute Engine IP ranges?
External IP addresses used by Google Cloud products such as Cloud Run or Cloud Run functions. Any client hosted on Google Cloud can instantiate these IP addresses. Google Cloud owns these IP addresses.
ref: https://cloud.google.com/kubernetes-engine/docs/concepts/network-isolation#ip-based_endpoints

TF plan changes

Terraform will perform the following actions:

  # module.sn_cluster.module.gke[0].google_container_cluster.primary will be updated in-place
  ~ resource "google_container_cluster" "primary" {
        id                                       = "projects/gcp-byoc-test/locations/us-west1/clusters/gcp-usw1-snc"
        name                                     = "gcp-usw1-snc"
        # (30 unchanged attributes hidden)

      ~ master_authorized_networks_config {
          ~ gcp_public_cidrs_access_enabled = true -> false

            # (2 unchanged blocks hidden)
        }

        # (24 unchanged blocks hidden)
    }

  # module.sn_cluster.module.gke[0].google_project_iam_member.cluster_service_account-metric_writer[0] will be created
  + resource "google_project_iam_member" "cluster_service_account-metric_writer" {
      + etag    = (known after apply)
      + id      = (known after apply)
      + member  = "serviceAccount:[email protected]"
      + project = "gcp-byoc-test"
      + role    = "roles/monitoring.metricWriter"
    }

  # module.sn_cluster.module.gke[0].google_project_iam_member.cluster_service_account-resourceMetadata-writer[0] will be created
  + resource "google_project_iam_member" "cluster_service_account-resourceMetadata-writer" {
      + etag    = (known after apply)
      + id      = (known after apply)
      + member  = "serviceAccount:[email protected]"
      + project = "gcp-byoc-test"
      + role    = "roles/stackdriver.resourceMetadata.writer"
    }

  # module.sn_cluster.module.gke[0].random_string.cluster_service_account_suffix has moved to module.sn_cluster.module.gke[0].random_string.cluster_service_account_suffix[0]
    resource "random_string" "cluster_service_account_suffix" {
        id          = "qimo"
        # (11 unchanged attributes hidden)
    }

@ciiiii ciiiii requested a review from a team as a code owner January 16, 2025 09:07
Copy link
Member

@maxsxu maxsxu left a comment

Choose a reason for hiding this comment

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

You may want to update the docs within this PR or using seperate docs PR, via the command terraform-docs markdown table --output-file README.md .

variables.tf Outdated Show resolved Hide resolved
@ciiiii ciiiii merged commit a772102 into master Jan 16, 2025
4 checks passed
@ciiiii ciiiii deleted the yscai/expose-options branch January 16, 2025 09:57
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