-
Notifications
You must be signed in to change notification settings - Fork 56
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
Nomad autoscale_constraints improperly rendered with AWS Elastigroup #81
Comments
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: