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: Give Atlantis write permission to EFS #376

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

showwin
Copy link
Contributor

@showwin showwin commented Nov 30, 2023

Description

Add elasticfilesystem:ClientWrite permission to the EFS file system policy.

Motivation and Context

Currently, we give only the mounting permission, so Atlantis ECS container can mount/read EFS, but cannot write anything under /home/atlantis/* directory. Due to this problem, Atlantis container cannot start with enable_efs = true option.
This is the error message I saw in the Atlantis log.

Error: initializing server: unable to create dir "/home/atlantis/.atlantis/bin": mkdir /home/atlantis/.atlantis: read-only file system

The error was solved when I added the elasticfilesystem:ClientWrite permission.

The current workaround is to configure efs parameter as follows:

enable_efs = true
efs = {
  mount_targets = {
    "eu-west-1a" = {
      subnet_id = module.vpc.private_subnets[0]
    }
    ...
  }
  attach_policy = false # <= Here
}

Breaking Changes

N/A

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

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

I'm surprised this wasn't caught before, thank you!

@bryantbiggs bryantbiggs merged commit 1db4a44 into terraform-aws-modules:master Nov 30, 2023
10 checks passed
antonbabenko pushed a commit that referenced this pull request Nov 30, 2023
### [4.0.4](v4.0.3...v4.0.4) (2023-11-30)

### Bug Fixes

* Give Atlantis write permission to EFS ([#376](#376)) ([1db4a44](1db4a44))
@antonbabenko
Copy link
Member

This PR is included in version 4.0.4 🎉

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 31, 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.

None yet

3 participants