Cox-Automotive / terraform-provider-alks

Terraform Provider for ALKS
MIT License
37 stars 23 forks source link

Add alks_session data source #195

Closed jcarlson closed 1 year ago

jcarlson commented 1 year ago

Change Log Items

Description

The new data source, alks_session, surfaces the AWS STS credentials that the alks provider is configured with

stephenleemcfarland commented 1 year ago

This approach is much more in-line with how I would expect a datasource to behave. Maybe we should mark the other one as deprecated? Thanks for this contribution @jcarlson ! We should also add a doc here so that when published as an official tf provider people will get some documentation to go with it.

jcarlson commented 1 year ago

@stephenleemcfarland Documentation added.

DevOpsDave commented 1 year ago

@jcarlson This is under review. We will get back to you asap with a merge or comments.

jcarlson commented 1 year ago

@DevOpsDave Thanks. Here is an example of how this new data source would be used, but substituting the data "alks_keys" "session" with data "alks_session" "current".

It's worth noting that, like all data objects, all of the output attributes from this data object are stored in Terraform state.

DevOpsDave commented 1 year ago

Still under review but I am actively getting this branch prepared for merge when/if we get the go ahead.

DevOpsDave commented 1 year ago

@DevOpsDave Thanks. Here is an example of how this new data source would be used, but substituting the data "alks_keys" "session" with data "alks_session" "current".

It's worth noting that, like all data objects, all of the output attributes from this data object are stored in Terraform state.

I believe my update designates the secret key and session key as sensitive so their plain text values might not show up there. Gonna verify.

DevOpsDave commented 1 year ago

@DevOpsDave Thanks. Here is an example of how this new data source would be used, but substituting the data "alks_keys" "session" with data "alks_session" "current". It's worth noting that, like all data objects, all of the output attributes from this data object are stored in Terraform state.

I believe my update designates the secret key and session key as sensitive so their plain text values might not show up there. Gonna verify.

No that is not the case. Just verified.

DevOpsDave commented 1 year ago

@jcarlson , closing this PR out. Ping me on slack if I can help with creating a new tfp that will fit for you.