terraform-aws-ec2-instance icon indicating copy to clipboard operation
terraform-aws-ec2-instance copied to clipboard

feat: Added parameter to attach aws_eip

Open tokarev-artem opened this issue 1 year ago β€’ 5 comments

Description

Added parameter to create an attach aws_eip resource to ec2 instance

Motivation and Context

It allows to attach public static IP address which will not be changed after ec2 instance stop/start

Breaking Changes

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

tokarev-artem avatar May 04 '24 09:05 tokarev-artem

Hi @antonbabenko is there anything else required to add/change/edit?

tokarev-artem avatar May 28 '24 09:05 tokarev-artem

looks good to me - although, I am curious why you are using an EIP on a standalone instance in 2024 πŸ˜…

@bryantbiggs @antonbabenko I'd like this feature for a bastion server for a reporting tool that doesn't need high availability.

mikecook avatar Jun 05 '24 17:06 mikecook

I'd like this feature for a bastion server for a reporting tool that doesn't need high availability.

And SSM session manager doesn't work for that? (I've approved the PR from my end, more of a pet peeve of this behavior over more modern practices really)

bryantbiggs avatar Jun 05 '24 21:06 bryantbiggs

I'd like this feature for a bastion server for a reporting tool that doesn't need high availability.

And SSM session manager doesn't work for that? (I've approved the PR from my end, more of a pet peeve of this behavior over more modern practices really)

I understand. No way to use SSM in this case, to my knowledge. I'm limited by 3rd party configuration options. The reporting tool is 3rd party automation that uses ssh-key to pass through bastion via SSH tunnel. It doesn't do anything on the ec2 instance.

mikecook avatar Jun 05 '24 22:06 mikecook

@antonbabenko Heads up, this PR is approved but is blocked by your acceptance of your requested changes.

mikecook avatar Jun 25 '24 19:06 mikecook

This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days

github-actions[bot] avatar Jul 26 '24 00:07 github-actions[bot]

@antonbabenko Heads up, this PR is approved but is blocked by your acceptance of your requested changes.

@antonbabenko This is ready. A user has done the work. Please respond to your blocking review feedback that has been addressed. This was marked stale while awaiting your response. It is otherwise ready to merge.

CC: @bryantbiggs

mikecook avatar Jul 26 '24 00:07 mikecook

This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days

github-actions[bot] avatar Aug 26 '24 00:08 github-actions[bot]

@apparentlymart @shawnsavour @bryantbiggs Can anyone unblock this?

mikecook avatar Aug 26 '24 00:08 mikecook

I cannot remove a review that requests changes - we'll need to wait for Anton to review and update

bryantbiggs avatar Aug 26 '24 14:08 bryantbiggs

This PR is included in version 5.7.0 :tada:

antonbabenko avatar Aug 26 '24 23:08 antonbabenko

i'm facing this problem now:

Error: Value for unconfigurable attribute

  with module.ec2_instance.aws_eip.this,
  on .terraform/modules/ec2_instance/main.tf line 619, in resource "aws_eip" "this":
 619:   domain = var.eip_domain

Can't configure a value for "domain": its value will be decided automatically

carnei-ro avatar Aug 27 '24 13:08 carnei-ro

ugh, the EIP resource brought in a v5.0 argument https://github.com/hashicorp/terraform-provider-aws/pull/31567

Looks like we'll have to take a breaking change

bryantbiggs avatar Aug 27 '24 14:08 bryantbiggs

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[bot] avatar Sep 28 '24 02:09 github-actions[bot]