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

Additional EBS volumes are re-attached when an instance is recreated #119

Closed
wants to merge 1 commit into from

Conversation

BernhardBerbuir
Copy link

@BernhardBerbuir BernhardBerbuir commented Jul 30, 2019

  • support use case where #instances > #subnets
  • add variable attached_block_device for configuring attached EBS volumes
  • document conflict between inline and separate created EBS volumes
  • inline ebs_block_device: use lookup for all attributes
  • use Terraform 0.12 syntax everywhere

Description

This PR solves #116

For the implementation some design decisions have been required:

  1. retrieving the correct AZ of an EBS volume.
    The implementation uses the subnets to determine the AZ instead of using calculated az information from aws_instance. This is necessary in order to prevent that the attached EBS volumes are destroyed and recreated when an EC2 instance is recreated.
  2. sequence of creating EBS volumes: there are two possible strategies:
    1. support adding / removing instances
    2. support adding / removing attached EBS volumes
      I have decided to use the first solution because scaling the number of instances was more important for my use case. Adding additional attached EBS volumes might be possible when moving stuff in the statefile around (I did not test this)

- support use case where #instances > #subnets
- add variable attached_block_device for configuring attached EBS volumes
- document conflict between inline and separate created EBS volumes
- ebs_block_device: use lookup for all attributes
- use Terraform 0.12 syntax everywhere
@BernhardBerbuir
Copy link
Author

OffTopic: would it be possible to use multi-line comments for variables and outputs? Especially for variables of type list(map(string)) a detailed description would be useful. Also using markdown could improve the documentation a lot.
Unfortunately I do not know if the generator would support this.

@bryantbiggs
Copy link
Member

hi @BernhardBerbuir, thanks for the PR! I am a little confused by the pull request so please bare with me! what use case are you trying to solve with this pull request - right now, based on the comments it seems like we might be trying to solve too much in one change set

@BernhardBerbuir
Copy link
Author

@bryantbiggs : this PR is no longer relevant for me, as I have created a permanent fork.
The idea of this PR was to solve several bugs and add features at once. It would have been better to create a separate PR for each problem.
If you have a question about a specific error / bug, then I'm happy to answer it.

@bryantbiggs
Copy link
Member

thank you for the response @BernhardBerbuir - @antonbabenko we can close

@github-actions
Copy link

github-actions bot commented Nov 9, 2022

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 Nov 9, 2022
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.

3 participants