GoogleCloudPlatform / GoogleCloudPlatform/pubsec-declarative-toolkit

Triage: 2nd/recreation KCC GKE cluster creation fails on the new constraints/compute.restrictVpcPeering policy because the VPC of the GKE cluster is outside our approved org - it fails at the Terraform layer as a result - this org policy must be off in dev mode

Open
#588 4 comments 0 reactions 1 assignee Claimed by @fmichaelobrien View on GitHub
developer-experience regression
Dominant language
Shell
Stars
36
Forks
26
PR merge metrics
No merged PRs in 30d

Description

By setting the org constraint for our workloads we end up restricting ourselves from ever recreating our own config controller based GKE cluster.
The org policy must be off for cluster recreation - usually for devs.

The VPC in question is outside our org in the project gke-prod-na-ne1-1499
```
projects/gke-prod-na-ne1-1499/global/networks/gke-nafbf6c6d3a01a64d0f3-1e3e-834c-net
```
We have seen this before - last year. I will put in a patch to make some of the org policies in core-landing-zone optional
#344
#132

supports developer worklflow https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/issues/550
for
#446
```

Creating Anthos KCC autopilot cluster kcc-oi4 in region northamerica-northeast1 in subnet kcc-ls-sn off VPC kcc-ls-vpc
Create request issued for: [kcc-oi4]
Waiting for operation [projects/kcc-oi-1258/locations/northamerica-northeast1/operations/operation-1697929279835-60841f7940c7c-f4a32353-e8bff0fd] to complete...working..
Waiting for operation [projects/kcc-oi-1258/locations/northamerica-northeast1/operations/operation-1697929279835-60841f7940c7c-f4a32353-e8bff0fd] to complete...working..
Waiting for operation [projects/kcc-oi-1258/locations/northamerica-northeast1/operations/operation-1697929279835-60841f7940c7c-f4a32353-e8bff0fd] to complete...failed.
ERROR: (gcloud.anthos.config.controller.create) unexpected error occurred while waiting for SLM operation [projects/krmapihosting-slm/locations/northamerica-northeast1/operations/operation-1697929287981-60841f8105a64-ba10e3d7-2c7471cb]: errored while waiting for operation: projects/krmapihosting-slm/locations/northamerica-northeast1/operations/operation-1697929287981-60841f8105a64-ba10e3d7-2c7471cb: Operation failed with error:

generic::invalid_argument: terraform apply failed, error: exit status 1, stderr:

Error: Error waiting for creating GKE cluster: Constraint constraints/compute.restrictVpcPeering violated for project 86427388501. Peering the network projects/gke-prod-na-ne1-1499/global/networks/gke-nafbf6c6d3a01a64d0f3-1e3e-834c-net is not allowed.

on main_autopilot.tf line 32, in resource "google_container_cluster" "acp_cluster":
32: resource "google_container_cluster" "acp_cluster" {

, stdout:
google_container_cluster.acp_cluster: Creating...
google_container_cluster.acp_cluster: Still creating... [10s elapsed]
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.