netskopeoss / terraform-provider-netskope

Apache License 2.0
6 stars 5 forks source link

Assigning multiple publishers to a private app w/o dynamic block #16

Closed nwhobart closed 1 year ago

nwhobart commented 1 year ago

Do you have any suggestions for assigning a privateapp n-number of publishers w/o having to resort to a dynamic block? While this technically works I guess it's not super ideal for a number of reasons. In the event of autoscaling I don't really want to have to run terraform for n-number of private apps.

I'm also very new to Netskope so I may be thinking about this completely wrong.

resource "netskope_privateapps" "default" {
  app_name = "[test-hobart]"
  host     = "test.mctest.com"

  protocols {
    type = "tcp"
    port = "80, 443"
  }

  protocols {
    type = "udp"
    port = "80, 443"
  }

  dynamic "publisher" {
    for_each = range(length(data.netskope_publishers.default.publishers))

    content {
      publisher_id   = data.netskope_publishers.default.publishers[publisher.key].publisher_id
      publisher_name = data.netskope_publishers.default.publishers[publisher.key].publisher_name
    }
  }

}

data "netskope_publishers" "default" {}
kraduk commented 1 year ago

there was talk of publisher tags, and referencing them in private apps, no feedback since the new year though..... Have a look at the rest api, iirc there is some partial exposure

ns-sbrown commented 1 year ago

Yes we have roadmap for publisher tags that would be the best option for this. I think for now a dynamic block may be the best option but I will take a look to see if there is anything else we can do until we get publisher tags.

kraduk commented 1 year ago

Any update on these features

ns-sbrown commented 1 year ago

Clossing this as it will be resolved with https://github.com/netskopeoss/terraform-provider-netskope/issues/5