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

Add docs for beta custom routes in google_compute_network_peering #4097

Closed
rileykarson opened this issue Jul 24, 2019 · 9 comments · Fixed by GoogleCloudPlatform/magic-modules#2745
Assignees

Comments

@rileykarson
Copy link
Collaborator

Looks like this got missed as part of GoogleCloudPlatform/magic-modules#1695

@ocervell
Copy link

@rileykarson can we please add the docs ? Lots of customers are wondering why this is not documented so far.

@rileykarson rileykarson self-assigned this Nov 13, 2019
@rileykarson
Copy link
Collaborator Author

I can get to it next week, probably landing for 3.1.0 on ~12/3

@mllu
Copy link

mllu commented Nov 22, 2019

@rileykarson Do you by any chance know if this'll work for gke-managed peerings as mentioned in https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#master-on-prem-routing?

@rileykarson
Copy link
Collaborator Author

rileykarson commented Nov 22, 2019

Yes, they'd work. You'd need to read the values of the peering resource manually and write it out right now, then run terraform import so Terraform knows to manage it.

We could improve that by exporting the peeringName from google_container_cluster and adding a datasource for peerings; then, the only manual step would be import. It could be fully automatic provided we added a fine-grained resource for just the --export-custom-routes part of a peering. If either of those changes would help you, please file an issue!

@mllu
Copy link

mllu commented Nov 22, 2019

I see, thanks for the info, but I just tried to

  1. use data source to reference gke-managed network with the following data source
data "google_compute_network" "gke_master" {
  name    = "GKE-MANAGED-NETWORK"
  project = "GKE-MANAGED-PROJECT-ID"
}

It failed with 403 with error messages like Required 'compute.networks.get' permission.... I guess it's expected I don't have permission to read gke-managed network.

  1. import google_compute_network_peering with the following resource
resource "google_compute_network_peering" "gke_managed_peering" {
  provider             = google-beta
  name                 = "GEK-MANAGED-PEERING"
  network              = data.google_compute_network.gke.self_link
  peer_network         = "https://www.googleapis.com/compute/v1/projects/GKE-MANAGED-PROJECT-ID/global/networks/GKE-MANAGED-NETWORK"
  export_custom_routes = true
}

via the following command
terraform import -provider=google-beta google_compute_network_peering.gke_managed_peering MY_NETWORK_ID/MY_PEERING

it showed me the following error messages, wondering if it's expected?

Error: resource google_compute_network_peering doesn't support import

Not sure if this is a good place to iterate this question, let me know if it's not and what the process I should adopt. Thank you.

@rileykarson
Copy link
Collaborator Author

  1. You should have permission to read the network, I think? GKE should put the nodes in an existing network you control.

  2. Ah, import used to be somewhat uncommon in this provider but nearly all newer resources now support it. I'd assumed google_compute_network_peering did, but I guess not. It's an older one. Mind filing an issue asking for import support on it, so that we can track that separately?

@mllu
Copy link

mllu commented Nov 25, 2019

will do, realized someone already created such issue #4793 and PR implementation #4291

@rileykarson
Copy link
Collaborator Author

Ah, great. Looks like the PR got dropped- I'll get the reviewer looking at it again.

@ghost
Copy link

ghost commented Mar 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants