Getting a genesyscloud_oauth_client as a Data Source by ID
pflugs30 opened this issue · 4 comments
While reviewing this page about getting an OAuth Client as a Data Source, I see that the only way to do that is to refer to it by name
. I cannot refer to it by id
.
I find this limitation confusing. The name
is variable and subject to change while the id
is static. Also, when running a CX as Code script from a CLI, I'm usually passing in the OAuth client's id
to configure the Provider. While I can also pass in the name
, I'd prefer to reference an OAuth Client by id
rather than name
. Is this possible in a future version? Thanks!
A datasource is meant to look up a value by an id so that you can reference the name. Whats your use case for looking up by ID. If you already know the ID you can always hard code it or put it a local variable.
I understand that a lookup by name is the most common use case. But with many other providers, such as azurerm, I often use Data Sources to access resources defined in other templates and access properties on them other than id
or name
.
In this situation, I do have the id
of the OAuth Client, that's true. I wanted to refer to the clientId
of an OAuth client which is not defined in my Terraform templates and then reference other properties of it. It's not urgent, and I even went another direction with what I started. However, I hope that helps set the stage.
Ahhh. I got you and understand now. I will add it to our backlog. TBH if its not high priority, I am going to give it our new intern who starts in Jan. Tickets like this are a great first ticket.
DEVTOOLING-885 is out internal ticket for tracking. I am going to lose this ticket in the meantime