Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better support for omitting role_arn #105

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NathanBaulch
Copy link

what

I recently started getting warnings about a missing aws provider role_arn value.

╷
│ Warning: Missing required argument
│
│   with provider["registry.opentofu.org/hashicorp/aws"],
│   on main.tf line 46, in provider "aws":
│   46: provider "aws" {
│
│ The argument "role_arn" is required, but no definition was found.
│
│ This will be an error in a future release.
╵

This seems to be because the accepter_aws_assume_role_arn variable has a default of null but is checked against empty string, meaning the assume_role block is incorrectly included with null role_arn when the variable is omitted.

Also, I'm not using an explicit requester_aws_assume_role_arn either so it would be nice if that variable had an empty default value just like accepter_aws_assume_role_arn.

why

The warning creates unnecessary noise and will be escalated to an error in future apparently.

@NathanBaulch NathanBaulch requested review from a team as code owners November 26, 2024 23:13
@mergify mergify bot added the triage Needs triage label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant