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

instance_interruption_behaviour results in availability_zone being ignored #12680

Closed
realflash opened this issue Apr 5, 2020 · 3 comments
Closed
Labels
service/ec2 Issues and PRs that pertain to the ec2 service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.

Comments

@realflash
Copy link
Contributor

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.12.24

  • provider.aws v2.56.0

Affected Resource(s)

aws_spot_instance_request

resource "aws_spot_instance_request" "wrong_zone" {
  ami = "ami-0ed2df11a6d41ea78"
  instance_type        = "t3.nano"
  availability_zone    = "eu-west-2a"
  instance_interruption_behaviour = "stop"
}

resource "aws_spot_instance_request" "right_zone" {
  ami = "ami-0ed2df11a6d41ea78"
  instance_type        = "t3.nano"
  availability_zone    = "eu-west-2a"
}

Debug Output

https://gist.github.com/realflash/80b306253fbcc2d67e35c0c5c93d9080

Expected Behaviour

Both instance requests created in the requested zone

Actual Behaviour

Instance with instance_interruption_behaviour = "stop" created in zone 2b instead of the requested zone. State file incorrect:

$ terraform state show aws_spot_instance_request.wrong_zone
# aws_spot_instance_request.wrong_zone:
resource "aws_spot_instance_request" "wrong_zone" {
    ami                             = "ami-0ed2df11a6d41ea78"
    availability_zone               = "eu-west-2a"
    block_duration_minutes          = 0
    get_password_data               = false
    id                              = "sir-t62iw2tg"
    instance_interruption_behaviour = "stop"
    instance_type                   = "t3.nano"
    security_groups                 = []
    source_dest_check               = true
    spot_bid_status                 = "pending-fulfillment"
    spot_request_state              = "open"
    spot_type                       = "persistent"
    valid_from                      = "0001-01-01T00:00:00Z"
    valid_until                     = "0001-01-01T00:00:00Z"
    vpc_security_group_ids          = []
    wait_for_fulfillment            = false

Actual zone is 2b:
Selection_157

Steps to Reproduce

  1. terraform apply
@ghost ghost added the service/ec2 Issues and PRs that pertain to the ec2 service. label Apr 5, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Apr 5, 2020
@justinretzolk
Copy link
Member

Hey @realflash 👋 Thank you for taking the time to file this. Based on the linked issue, it looks like this may be resolved with #18473. Can you let us know if you're still running into this?

@justinretzolk justinretzolk added waiting-response Maintainers are waiting on response from community or contributor. and removed needs-triage Waiting for first response or review from a maintainer. labels Oct 5, 2021
Copy link

github-actions bot commented Aug 4, 2024

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Aug 4, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 22, 2024
Copy link

I'm going to lock this issue 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 similar to this, 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 Oct 25, 2024
@justinretzolk justinretzolk removed the waiting-response Maintainers are waiting on response from community or contributor. label Feb 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/ec2 Issues and PRs that pertain to the ec2 service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.
Projects
None yet
Development

No branches or pull requests

2 participants