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

fix: The capacity_reservation_specification default value is updated from null to {} #285

Merged
merged 2 commits into from
Aug 12, 2022

Conversation

schniber
Copy link
Contributor

Description

The default value for the capacity_reservation_specification is now updated from null to {}

Motivation and Context

This behaviour better aligns with the general use of the module.

Breaking Changes

None

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

@schniber
Copy link
Contributor Author

As spotted by @yewton in #282
Thanks !

@schniber schniber changed the title Fix: capacity_reservation_specification default value updated from null to {} fix: capacity_reservation_specification default value updated from null to {} Aug 12, 2022
@schniber schniber changed the title fix: capacity_reservation_specification default value updated from null to {} fix: The capacity_reservation_specification default value is updated from null to {} Aug 12, 2022
Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @schniber

@bryantbiggs bryantbiggs merged commit 9af6601 into terraform-aws-modules:master Aug 12, 2022
antonbabenko pushed a commit that referenced this pull request Aug 12, 2022
### [4.1.3](v4.1.2...v4.1.3) (2022-08-12)

### Bug Fixes

* The capacity_reservation_specification default value is updated from null to {} ([#285](#285)) ([9af6601](9af6601))
@antonbabenko
Copy link
Member

This PR is included in version 4.1.3 🎉

@mtraynham
Copy link

mtraynham commented Aug 12, 2022

Hello, we started pulling the new module update this morning and am seeing the following. We're using the AWS Provider v4.25.0.

Downgrading back to terraform-aws-modules/ec2-instance/aws@4.1.2 still works.

╷
│ Error: Invalid combination of arguments
│
│   with module.ec2_instance["arm64"].aws_instance.this[0],
│   on .terraform/modules/ec2_instance/main.tf line 7, in resource "aws_instance" "this":
│    7: resource "aws_instance" "this" {
│
│ "capacity_reservation_specification.0.capacity_reservation_preference": one of
│ `capacity_reservation_specification.0.capacity_reservation_preference,capacity_reservation_specification.0.capacity_reservation_target` must be specified
╵

@jefteete
Copy link

getting same error as mtraynham ( Error: Invalid combination of arguments). I had to add the following to vm module to fix the issue:

capacity_reservation_specification = {
capacity_reservation_preference = "open"
}

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

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 github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants