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: convert the fleet instance type in migration script #975

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

kayman-mk
Copy link
Collaborator

Description

The instance types for the fleet are not converted. In this case the module uses a default value m5.large. So all created instances are m5.large instances which is usually not wanted.

If the migration script was used to convert the module call to version 7, it is very likely that you find the following in your module call:

runner_instance = {
    docker_machine_types_fleet = ["t3.medium"] # your instance types here
}

The variable docker_machine_types_fleet does not exist, but Terraform does not report an error.

This PR fixes the migration script and produces the following correct code:

runner_worker_docker_machine_instance = {
  types                    = ["t3.medium"]
}

Migrations required

No

Verification

Verified locally that the script produces the output as described above.

@kayman-mk kayman-mk requested a review from npalm as a code owner September 28, 2023 07:33
@github-actions
Copy link
Contributor

Hey @kayman-mk! 👋

Thank you for your contribution to the project. Please refer to the contribution rules for a quick overview of the process.

Make sure that this PR clearly explains:

  • the problem being solved
  • the best way a reviewer and you can test your changes

With submitting this PR you confirm that you hold the rights of the code added and agree that it will published under this LICENSE.

The following ChatOps commands are supported:

  • /help: notifies a maintainer to help you out

Simply add a comment with the command in the first line. If you need to pass more information, separate it with a blank line from the command.

This message was generated automatically. You are welcome to improve it.

@kayman-mk kayman-mk mentioned this pull request Sep 28, 2023
2 tasks
@github-actions
Copy link
Contributor

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ BASH bash-exec 1 0 0.01s
✅ BASH shellcheck 1 0 0.51s
✅ BASH shfmt 1 1 0 0.06s
✅ COPYPASTE jscpd yes no 2.5s
✅ REPOSITORY checkov yes no 21.74s
✅ REPOSITORY dustilock yes no 0.28s
✅ REPOSITORY gitleaks yes no 0.99s
✅ REPOSITORY git_diff yes no 0.01s
✅ REPOSITORY grype yes no 15.33s
✅ REPOSITORY secretlint yes no 1.53s
✅ REPOSITORY syft yes no 0.21s
✅ REPOSITORY trivy-sbom yes no 1.29s
✅ REPOSITORY trufflehog yes no 5.36s
✅ SPELL cspell 2 0 3.22s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@kayman-mk kayman-mk merged commit 51b2842 into main Sep 28, 2023
19 checks passed
@kayman-mk kayman-mk deleted the kayman-mk-patch-1 branch September 28, 2023 07:39
kayman-mk pushed a commit that referenced this pull request Sep 28, 2023
🤖 I have created a release *beep* *boop*
---


##
[7.1.0](7.0.0...7.1.0)
(2023-09-28)


### Features

* add `MaxGrowthRate` to limit the number of instances added in parallel
([#962](#962))
([ae6d38a](ae6d38a))


### Bug Fixes

* convert the fleet instance type in migration script
([#975](#975))
([51b2842](51b2842))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Signed-off-by: Niek Palm <dev.npalm@gmail.com>
Co-authored-by: cattle-ops-releaser-2[bot] <134548870+cattle-ops-releaser-2[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

1 participant