hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.83k stars 9.18k forks source link

[Enhancement]: Add `AWS_ROLE_SESSION_NAME` Environment Variable Option to `assume_role` block for `session_name` argument #40030

Open zisom-hc opened 1 week ago

zisom-hc commented 1 week ago

Description

When the AWS SDK permits it, please add the ability for users of Terraform and the AWS provider to be able to use a AWS_ROLE_SESSION_NAME environment variable to supply a Session Name instead of having to use the session_name argument in assume_role blocks that are within aws provider blocks.

Per the AWS docs, they would need to add the ability of configuring this environment variable first within the SDK for Terraform to take advantage of, but i'm still creating this FR so that a count can be collected for the amount of other folks that would desire this to be made available.

Affected Resource(s) and/or Data Source(s)

Potential Terraform Configuration

Configuring an `AWS_ROLE_SESSION_NAME` environment variable within the run environment of Terraform.

References

AWS provider doc: image

Would you like to implement a fix?

None

github-actions[bot] commented 1 week ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue