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

Add the ability to optionally create the role in iam.tf #26

Open
meundies-automation opened this issue Dec 1, 2023 · 1 comment
Open

Comments

@meundies-automation
Copy link

Describe the Feature

The role created in iam.tf is needed when ECS has self-managed hosts, but it is not needed when all containers are running on fargate. It is not currently possible to disable creation of the role as the creation is tied to the creation of the cluster, with local.enabled = true. I think the simplest way to do it, and maintain backward compatability is to add a new variable

varaible "create_role" { type = bool default = true }

and then in iam.tf, change the creation check to be
count = local.enabled && create_role ? 1 : 0

Expected Behavior

Role for EC2 hosts is NOT created when no EC2 hosts are expected to be provisioned for the cluster, because all containers are running on fargate.

Use Case

I would like to not create iam roles and instance profiles that will never be used.

Describe Ideal Solution

Iam roles and instance profiles are only created for use by the ECS cluster when EC2 hosts are provisioned

Alternatives Considered

No response

Additional Context

No response

@riccardomassullo
Copy link

Any news on this issue?

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

No branches or pull requests

2 participants