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

fix: Not is possible create iam_role_statements with awsvpc or without load balancer #139

Closed
wants to merge 1 commit into from

Conversation

leandrozimmer
Copy link
Contributor

Description

Is not possible create iam_role_statements with awsvpc or without load balancer

Motivation and Context

Create iam_role_statements with network_mode = awsvpc and no load balancer

Breaking Changes

No

How Has This Been Tested?

Yes

…tatements with awsvpc or without load balancer main.tf
@bryantbiggs
Copy link
Member

What are you trying to do, and what challenges or errors are you running into?

@leandrozimmer
Copy link
Contributor Author

Pre-Commit / Max TF pre-commit (pull_request) Failing after 1m

Captura de Tela 2023-11-17 às 21 33 38

@bryantbiggs
Copy link
Member

Lets not worry about the CI checks right now - What are you trying to do, and what challenges or errors are you running into?

@leandrozimmer
Copy link
Contributor Author

leandrozimmer commented Nov 18, 2023

I would like add role permissions, via iam_role_statements, but I'm using network_mode=awsvpc and haven't load balancer, in this case I'm using namespace and VPCLink via ApiGateway.
Because the the line
needs_iam_role = var.network_mode != "awsvpc" && length(var.load_balancer) > 0
never create. Then I added the OR condition and check iam_role_statements to no create empty role policy.
create_iam_role = var.create && ( var.create_iam_role && var.iam_role_statements != {} || local.needs_iam_role )

@bryantbiggs
Copy link
Member

What permissions are you trying to add, and what are they needed for?

@leandrozimmer
Copy link
Contributor Author

You're correct. I was confused, I need to use task_iam_role_statements. I'll pay more attention to input variables documentation. Sorry and thank you.

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants