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

Plan does not identify change in Capacity for SpotFleet request. #9322

Closed
ghost opened this issue Jul 12, 2019 · 7 comments · Fixed by #12759
Closed

Plan does not identify change in Capacity for SpotFleet request. #9322

ghost opened this issue Jul 12, 2019 · 7 comments · Fixed by #12759
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@ghost
Copy link

ghost commented Jul 12, 2019

This issue was originally opened by @udayanms as hashicorp/terraform#22050. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

...

Terraform Configuration Files

...vars.tfvars
```SpotFleetTargetCapacity  = "9"



   resource "aws_spot_fleet_request" "SymphonySpotFleet" {
   count = length(var.SpotFleetRequests)
   iam_fleet_role      = "${var.SpotFleetIamFleetRole}"
  #  spot_price          = "0.03"
   allocation_strategy = "diversified"
   target_capacity     = 2
   valid_until         = "2019-11-04T20:44:20Z"
   dynamic "launch_specification" {
     iterator = instanceType
     for_each = var.SpotFleetRequests[count.index].SpotFleetInstanceTypes
     content {
          instance_type            = instanceType.value
          ami                      = "${var.SpotFleetimageId}"
          key_name                 = "${var.SpotFleetKey}"
          spot_price               = "${var.SpotFleetPrice}"
          iam_instance_profile_arn = "${var.SpotFleetIamInstanceProfile}"
          subnet_id                = "${var.SpotFleetSubnetId}"
          weighted_capacity        = "${var.SpotFleetRequests[count.index].SpotFleetWeightedCapacity}"
          tags = var.SpotFleetInstanceTags
    }
   }
  }

Once the SpotFleet was created with SpotFleetTargetCapacity  = "4". I changed the value to 9 but re-running the plan and apply. Nothing changed. 




### Debug Output
<!--
Full debug output can be obtained by running Terraform with the environment variable `TF_LOG=trace`. Please create a GitHub Gist containing the debug output. Please do _not_ paste the debug output in the issue, since debug output is long.
No changes. Infrastructure is up-to-date.

Debug output may contain sensitive information. Please review it before posting publicly, and if you are concerned feel free to encrypt the files using the HashiCorp security public key.
-->

### Crash Output
<!--
If the console output indicates that Terraform crashed, please share a link to a GitHub Gist containing the output of the `crash.log` file.
-->

### Expected Behavior
<!--
What should have happened?
-->

### Actual Behavior
<!--
What actually happened?
-->
No changes. Infrastructure is up-to-date.

### Steps to Reproduce
<!--
Please list the full steps required to reproduce the issue, for example:
1. `terraform init`
2. `terraform apply`
-->

### Additional Context
<!--
Are there anything atypical about your situation that we should know? For example: is Terraform running in a wrapper script or in a CI system? Are you passing any unusual command line options or environment variables to opt-in to non-default behavior?
-->

### References
<!--
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:

- hashicorp/terraform#6017

-->
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jul 12, 2019
@AlexanderIakovlev
Copy link

Hello @udayanms,

I can't find where you use "SpotFleetTargetCapacity" variable in your code snippet.
In your snippet target_capacity is hard-coded and will be equal "2"

target_capacity = 2

Thanks

@udayanms
Copy link

Actually I ran it first with capacity 1 then with 2.

@AlexanderIakovlev
Copy link

As i said before looks like you don't use SpotFleetTargetCapacity in this resource.
Please provide more output logs for your plan with option TF_LOG=debug
Thanks

@aeschright aeschright added the service/ec2 Issues and PRs that pertain to the ec2 service. label Aug 2, 2019
@DrFaust92
Copy link
Collaborator

possibly addressed in #12759

@ewbankkit ewbankkit added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jul 25, 2020
@anGie44 anGie44 added this to the v3.1.0 milestone Jul 31, 2020
@anGie44
Copy link
Contributor

anGie44 commented Jul 31, 2020

The bug fix has been merged and will release with the upcoming v3.1.0 of the Terraform AWS Provider.

@ghost
Copy link
Author

ghost commented Aug 7, 2020

This has been released in version 3.1.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link
Author

ghost commented Aug 31, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Aug 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants