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

Check length of assume role arns #219

Merged
merged 2 commits into from
Aug 14, 2024
Merged

Check length of assume role arns #219

merged 2 commits into from
Aug 14, 2024

Conversation

smohiudd
Copy link
Contributor

@smohiudd smohiudd commented Aug 13, 2024

In MCP environments we aren't passing assuming role arns so this PR checks if assume_role_arns is empty before passing values to assume_role_read_arn and assume_role_write_arn

assume_role_read_arn = var.assume_role_arns[0]
assume_role_write_arn = var.assume_role_arns[0]
assume_role_read_arn = length(var.assume_role_arns) > 0 ? var.assume_role_arns[0] : ""
assume_role_write_arn = length(var.assume_role_arns) > 0 ? var.assume_role_arns[0] : ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so not [0] and [1] both [0]? just making sure

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're using the same role for both read and right. But I think I should make it [1]. Let me push a change

Copy link
Contributor

@ranchodeluxe ranchodeluxe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a simple question but looks good

@smohiudd smohiudd merged commit f252f3d into dev Aug 14, 2024
3 checks passed
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