You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL;DR - When integration_nomad {} is specified for an AWS Elastigroup, the provider doesn't properly translate autoscaler_constraints blocks into JSON for the API request.
Terraform Version
Terraform v0.12.21 (latest available in Chocolatey)
This results in a ValidationError being returned from the API:
[ERROR] failed to create group: POST https://api.spotinst.io/aws/ec2/group: 400 (request: "566d5d84-eac3-4e7d-8e6d-fa59d770594f") ValidationError: "value" is not allowed to be empty (field: body:group.thirdPartiesIntegration.nomad.autoScale.constraints.0.value)
Steps to Reproduce
Attempt to create a spotinst_elastigroup_aws resource that contains an autoscale_constraints{} block.
Important Factoids
This seems like this may have been introduced with Terraform 12. I have access to another configuration repository which uses TF11, and this issue does not occur.
The text was updated successfully, but these errors were encountered:
julian3xl
pushed a commit
to julian3xl/terraform-provider-spotinst
that referenced
this issue
Jun 29, 2022
## 1.9.0 (Unreleased)
ENHANCEMENTS:
* resource/spotinst_elastigroup_azure: added `additional_ip_configs` to `network`
* resource/spotinst_elastigroup_azure: added kubernetes and Multai to `integrations`
* resource/spotinst_elastigroup_azure: added `scaling policies`
BUG FIXES:
* changed the order that credentials are set. See notes.
* resource/spotinst_elastigroup_azure: `dimensions` changed to properly set `name` and `value` parameters
TL;DR - When
integration_nomad {}
is specified for an AWS Elastigroup, the provider doesn't properly translateautoscaler_constraints
blocks into JSON for the API request.Terraform Version
Terraform v0.12.21 (latest available in Chocolatey)
Provider versions:
Affected Resource(s)
Terraform Configuration Files
Truncated to relevant section:
Actual Behavior
When Terraform displays the
plan
output, it shows the correct projected actions for the resource:Truncated to relevant section:
However, the debug output shows improper JSON being sent to the API:
Truncated to relevant section:
This results in a ValidationError being returned from the API:
[ERROR] failed to create group: POST https://api.spotinst.io/aws/ec2/group: 400 (request: "566d5d84-eac3-4e7d-8e6d-fa59d770594f") ValidationError: "value" is not allowed to be empty (field: body:group.thirdPartiesIntegration.nomad.autoScale.constraints.0.value)
Steps to Reproduce
spotinst_elastigroup_aws
resource that contains anautoscale_constraints{}
block.Important Factoids
This seems like this may have been introduced with Terraform 12. I have access to another configuration repository which uses TF11, and this issue does not occur.
The text was updated successfully, but these errors were encountered: