1

I want to create similar configuration as described here: https://cloud.google.com/compute/docs/vpc/special-configurations#natgateway

with Terraform but "no-ip" instances are in Kubernetes cluster. Problem is such when you do it manually with command simmilar to:

gcloud container clusters create container-name --tags=sometag

You can set up tags for whole instances started in this cluster but i can't see such possibility when im trying to do that same with Terraform: https://www.terraform.io/docs/providers/google/r/container_cluster.html

Is there posibility to set tags with Terraform config? I was trying too to find out how to update them manually after all with "gcloud" command but i can't find such possibility too.

user3069488
  • 169
  • 2
  • 4
  • 19

1 Answers1

1

It looks like it's (mistakenly) not documented at the moment, but you should be able to use the tags field in the node_config field to achieve this.

It'd look something like this

resource "google_container_cluster" "my_cluster" {
  // other config goes here
  node_config {
    tags = [ "no-ip"]
  }
}

[EDIT]: Oops, my mistake, this is a recent feature and won't be available until the 0.10 beta releases. Good news is that should be very, very soon. And, even better, docs will be available as soon as 0.10 is released.

Paddy
  • 136
  • 5
  • Thank you for reply. This is great news and hope it will be really very soon. They could add scopes to node configuration too (those are two things which are missing for my application - except whole deployments and whole ingress Kubernetes resources). – user3069488 Jun 22 '17 at 13:39
  • Those options still are not available in node_pool configuration https://github.com/terraform-providers/terraform-provider-google/blob/a25461f2cc6f2a58c58b43b67a55c14a5af8b055/google/resource_container_node_pool.go so it won't help me. – user3069488 Jun 23 '17 at 13:19
  • If you open an issue at https://github.com/terraform-providers/terraform-provider-google/issues/new we can get support added for it! – Paddy Jun 23 '17 at 20:00
  • Also, 0.10beta1 is out, so tags on entire cluster instances is out. :) – Paddy Jun 23 '17 at 20:01
  • According to your advice i added new tickets: https://github.com/terraform-providers/terraform-provider-google/issues/162 – user3069488 Jun 28 '17 at 13:45