PaloAltoNetworks / terraform-provider-prismacloudcompute

Terraform provider for Prisma Cloud Compute
https://registry.terraform.io/providers/PaloAltoNetworks/prismacloudcompute/latest
Mozilla Public License 2.0
24 stars 27 forks source link

Support for Managing Tenant Consoles using prismacloudcompute provider #34

Closed jhabikal21 closed 2 years ago

jhabikal21 commented 2 years ago

Is your feature request related to a problem?

It is difficult to manage individual Tenant consoles (projects) in a single terraform project as we use self-hosted consoles on Kubernetes and not each TL Project has its URL instead uses internal k8 URLs.

Describe the solution you'd like

We would like to manage individual Tenant consoles (projects) in a single terraform project by using an alias in provider.

Describe alternatives you've considered

For now, the alternative would be to use the URL of each TL Tenant project and create a provider however this doesn't work for our requirement as we use an internal k8 URL instead of a public domain.

welcome-to-palo-alto-networks[bot] commented 2 years ago

:tada: Thanks for opening your first issue here! Welcome to the community!

hi-artem commented 2 years ago

Just want to make sure I am getting this issue correctly, so you are saying the following doesn't currently work/satisfies your needs:


provider "prismacloudcompute" {
  alias  = "foo_console"
  config_file = "creds_0.json"
}

provider "prismacloudcompute" {
  alias  = "bar_console"
  config_file = "creds_1.json"
}

resource "prismacloudcompute_collection" "foo" {
  provider = prismacloudcompute.foo_console
}

resource "prismacloudcompute_collection" "bar" {
  provider = prismacloudcompute.bar_console
}
jhabikal21 commented 2 years ago

If you see, you mentioned 2 providers however I can't add my project name in creds_0.json.

{
  "console_url": "https://foo.bar.com",
  **"tenant_project": "ABC",**
  "username": "myUsername",
  "password": "myPassword"
}

image We would like to manage these all projects from our single terraform projects using multiple aliases.

Please let me know if the above information is still not clear. Thanks

wfg commented 2 years ago

Thanks for the feedback @jhabikal21. I'm working on this one now. Hope to have something by the end of the week.

wfg commented 2 years ago

Added in v0.3.0. Please open a new issue if you have any problems with it @jhabikal21