Skip to content

aws: ensure role assumption is done after other options are parsed#3732

Merged
vangent merged 1 commit into
google:masterfrom
troyready:fix_aws_role_assumption_parm_order
Jun 16, 2026
Merged

aws: ensure role assumption is done after other options are parsed#3732
vangent merged 1 commit into
google:masterfrom
troyready:fix_aws_role_assumption_parm_order

Conversation

@troyready

Copy link
Copy Markdown
Contributor

This fixes an issue introduced with the new feature in #3716 . Without this change, the options map is iterated over in a random order, which will cause issues if another parameter (e.g. region) is provided and needed.

Current tests don't catch this, but this part of the PR:

			if baseConfig.Region == "" {
				return aws.Config{}, fmt.Errorf("STS client created with empty region: all other parameters must be collected before assuming role")
			}

does exercise the tests -- if that same check was added to the current code, the current tests will fail sporadically.

Comment thread aws/aws.go Outdated
Without this change, the map is iterated over in a random order, which
will cause issues if another paramter (e.g. region) is provided and
needed.
@troyready troyready force-pushed the fix_aws_role_assumption_parm_order branch from 1bcb9bb to c671099 Compare June 16, 2026 18:23
@troyready

Copy link
Copy Markdown
Contributor Author

Good thought, I agree -- @vangent ; updated.

@vangent vangent merged commit 2023272 into google:master Jun 16, 2026
9 checks passed
@troyready troyready deleted the fix_aws_role_assumption_parm_order branch June 16, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants