Skip to content

Support AWS Provider v6#168

Merged
TheOutdoorProgrammer merged 6 commits intospacelift-io:mainfrom
jeohist:support_aws_v6
Jul 23, 2025
Merged

Support AWS Provider v6#168
TheOutdoorProgrammer merged 6 commits intospacelift-io:mainfrom
jeohist:support_aws_v6

Conversation

@jeohist
Copy link
Contributor

@jeohist jeohist commented Jun 27, 2025

Description of the change

  • Bump the asg module version to 9+, which supports AWS Provider v6
  • Bump the required AWS Provider version
  • Replace deprecated data.aws_region attributes

Type of change

  • Bug fix (non-breaking change that fixes an issue);
  • New feature (non-breaking change that adds functionality);
  • Breaking change (fix or feature that would cause existing functionality to not work as expected);
  • Documentation (a documentation or example fix not affecting the infrastructure managed by this module);

I've bumped the version to4.5.0, let me know if you'd rather bump to 5.0.0.

Checklists

Development

  • All necessary variables have been defined, with defaults if applicable;
  • The code is formatted properly;

If I run tofu fmt -recursive in the root, the formatting of blocks in the examples directory change. Since these are unrelated to my PR, I won't commit them.

Code review

  • The module version is bumped accordingly;
  • Spacelift tests are passing;
  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached;
  • This pull request is no longer marked as "draft";
  • Reviewers have been assigned;
  • Changes have been reviewed by at least one other engineer;

@jeohist jeohist requested a review from a team as a code owner June 27, 2025 08:31
@github-actions
Copy link

Thank you for your contribution!

We've been notified of this pull request and will review it soon. We appreciate you helping to make Spacelift better!

For Spacelift Customers:

  • For fastest response, please use your dedicated Slack or Microsoft Teams channel
  • Or email us directly at support@spacelift.io

@TheOutdoorProgrammer
Copy link
Member

Hey @jeohist thanks for the contribution. What does upgrading to this mean for users of the module? I havent dont a major provider bump in a while so Im struggling to remember how complicated this is. (FWIW, I will try your PR myself probably next week but didnt know if you knew off hand)

@jeohist
Copy link
Contributor Author

jeohist commented Jun 29, 2025

Hey @jeohist thanks for the contribution. What does upgrading to this mean for users of the module? I havent dont a major provider bump in a while so Im struggling to remember how complicated this is. (FWIW, I will try your PR myself probably next week but didnt know if you knew off hand)

It's fairly straightforward for users, the functionality removed in v6 isn't used by this module at all.
I don't think any of the changes in the autoscaling module are used here either: terraform-aws-modules/terraform-aws-autoscaling#294

@jeohist jeohist force-pushed the support_aws_v6 branch 3 times, most recently from eebbc61 to a941d41 Compare July 1, 2025 10:40
@TheOutdoorProgrammer
Copy link
Member

All the checks are failing for the same reason

│ Error: Failed to resolve provider packages

│ Could not resolve provider hashicorp/aws: no available releases match the
│ given constraints >= 6.0.0, < 6.0.0

@jeohist
Copy link
Contributor Author

jeohist commented Jul 2, 2025

All the checks are failing for the same reason

│ Error: Failed to resolve provider packages

│ Could not resolve provider hashicorp/aws: no available releases match the
│ given constraints >= 6.0.0, < 6.0.0

Ah I didn't notice the provider constraints in the examples, I'll fix those.

edit: Could use some input here: Is it worth adding version constraints to the tests when we already define them in the module? We don't do it for hashicorp/random either.

@TheOutdoorProgrammer
Copy link
Member

Hey @jeohist I've had some conversations internally and we would like to let the 6.0.0 version of the provider bake for a bit before we release this.

Lets keep this open and give it some time before we pull the trigger on this.

@bodgit
Copy link

bodgit commented Jul 9, 2025

Please reconsider.

This is blocking me from upgrading my Terraform providers and modules as this module, (via the included autoscaling module), is pinned to < 6.

I've upgraded lots of other codebases already to run on 6.x without issue. This is one of the last to upgrade which I cannot do until this PR is merged.

I'm not actually using any autoscaling anyway but because the module is referenced by the source code I'm getting bitten by it.

The AWS provider is now on v6.2.0 so it's already had a few point releases to fix the inevitable major version snafus which tend to occur.

@jeohist
Copy link
Contributor Author

jeohist commented Jul 9, 2025

It's unfortunate that we can't do a backwards compatible release, because the terraform-aws-autoscaling module decided to go for the backwards incompatible route.

@TheOutdoorProgrammer
Copy link
Member

TheOutdoorProgrammer commented Jul 11, 2025

@jeohist a lot of the tests are failing with

│ Error: Invalid value for input variable

│ on ../../asg.tf line 35, in module "asg":
│ 35: instance_refresh = var.instance_refresh

│ The given value is not suitable for
│ module.this.module.asg.var.instance_refresh declared at
│ .terraform/modules/this.asg/variables.tf:138,1-28: attribute "strategy" is
│ required.

Im happy to look into this but its going to be later next week when I can. I have a feeling its an issue with the default being null. The ASG module probably doesnt like that after this new update.

@jeohist
Copy link
Contributor Author

jeohist commented Jul 11, 2025

@jeohist a lot of the tests are failing with

│ Error: Invalid value for input variable

│ on ../../asg.tf line 35, in module "asg":
│ 35: instance_refresh = var.instance_refresh

│ The given value is not suitable for
│ module.this.module.asg.var.instance_refresh declared at
│ .terraform/modules/this.asg/variables.tf:138,1-28: attribute "strategy" is
│ required.

Im happy to look into this but its going to be later next week when I can. I have a feeling its an issue with the default being null. The ASG module probably doesnt like that after this new update.

Thanks, didn't catch that on our end (because we define the variable). I went through the examples and they do pass now. I updated var.instance_market_options as well to match the upstream default.

@lorengordon
Copy link
Contributor

Would love to see this one released... this is the last module in our config that doesn't yet support v6! Any sense of when this will get merged? (We just started a new sprint where I'm evaluating v6, trying to decide whether to hold the task for a few days, or drop it to the backlog...)

@bodgit
Copy link

bodgit commented Jul 22, 2025

Would love to see this one released... this is the last module in our config that doesn't yet support v6! Any sense of when this will get merged? (We just started a new sprint where I'm evaluating v6, trying to decide whether to hold the task for a few days, or drop it to the backlog...)

Likewise. The AWS provider is now on v6.4.0 so I think any upgrade wrinkles have now been ironed out.

@TheOutdoorProgrammer
Copy link
Member

Hey Everyone, we've decided to release this tomorrow (7/23/25) first thing in the morning. I will merge it around 9am ET and then immediately release it.

Thank you for shepherding this through @jeohist

@bushong1
Copy link

S O O N

@TheOutdoorProgrammer TheOutdoorProgrammer merged commit 470a61a into spacelift-io:main Jul 23, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants