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

Add support for Terraform 0.14 #262

Merged
merged 15 commits into from
Dec 10, 2020
Merged

Add support for Terraform 0.14 #262

merged 15 commits into from
Dec 10, 2020

Conversation

Nuru
Copy link
Contributor

@Nuru Nuru commented Dec 7, 2020

what

  • Add target that starts the build-harness Docker image and lets you run make or bash from within the container
  • Add target to update README for Terraform modules to switch to registry format
  • Add target to bump modules with minimum core version of '0.12.x' to '>= 0.12.26'
  • Replace constraints on upper bounds of versions with constraints only on lower bounds. ~> X converted to >= X, explicit upper limits like < 0.14 removed completely.
  • Add target to rewrite versions.tf to add an explicit source attribute for each provider
  • Add group target for all one-time Terraform updates
  • Update github/init templates to include validate-codeowners workflow and add Terraform-only .github/* files

why

  • Allow users to use the scripts and tools without having to install binaries on their host computers
  • Switch README to preferred registry format
  • Explicit provider source addresses were introduced with Terraform v0.13, so the full provider requirements syntax is not supported by Terraform v0.12, but v0.12.26 will accept but ignore the source argument in a required_providers block
  • Terraform v0.13 introduces new syntax in the required_providers nested block inside the terraform configuration block. We want to make modules compatible with Terraform v0.14, which drops support for the v0.12 format.
  • Make it easier to apply all updates at once
  • Invalid CODEOWNERS becomes silently ignored, removing all protection, so it is critical to ensure it is valid

ToDo

  • Enhance github/init to allow for multiple versions of the same file, installing correct one based on repo nature
  • Configure non-Terraform version of Codeowners
  • Restore file existence check to verify-codeowners.

references

@Nuru Nuru requested a review from a team as a code owner December 7, 2020 07:01
@Nuru Nuru removed request for goruha and aknysh December 7, 2020 07:01
@Nuru Nuru requested a review from maximmi December 7, 2020 07:02
modules/terraform/Makefile Outdated Show resolved Hide resolved
maximmi
maximmi previously approved these changes Dec 7, 2020
@Nuru Nuru requested a review from a team as a code owner December 7, 2020 12:37
@Nuru Nuru requested a review from nitrocode December 7, 2020 12:37
modules/terraform/Makefile Outdated Show resolved Hide resolved
modules/terraform/Makefile Outdated Show resolved Hide resolved
modules/terraform/Makefile Outdated Show resolved Hide resolved
maximmi
maximmi previously approved these changes Dec 8, 2020
@Nuru Nuru requested a review from maximmi December 9, 2020 05:12
modules/packages/Makefile Outdated Show resolved Hide resolved
echo "context.tf file was updated. Need to rebuild README.md."
make init
make readme/build
echo "::set-output name=create_pull_request=true"
Copy link
Member

Choose a reason for hiding this comment

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

Technically unnecessary because create-pull-request will only open a PR if there were changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

create-pull-request will still do a lot of work to determine that no changes were needed, and since we will be running over 100 of these in parallel, and the normal case will be no changes, I want to short-circuit as much as possible.

Copy link
Member

@osterman osterman left a comment

Choose a reason for hiding this comment

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

Fix auto-release config

@Nuru Nuru changed the title Add target to update README, group target Add support for Terraform 0.14 Dec 10, 2020
@Nuru Nuru requested a review from osterman December 10, 2020 05:11
@Nuru Nuru requested review from osterman and aknysh December 10, 2020 06:04
maximmi
maximmi previously approved these changes Dec 10, 2020
@Nuru Nuru merged commit c994df8 into master Dec 10, 2020
@Nuru Nuru deleted the tf-14 branch December 10, 2020 23:41
ray-harris added a commit to stolostron/build-harness that referenced this pull request Nov 16, 2021
* Let build-harness know what OS we're on (cloudposse#195)

* Add Slash Command Dispatch GitHub Actions template (cloudposse#197)

* Update Slash Command Dispatch GitHub Actions templates

* Update Slash Command Dispatch GitHub Actions templates

* Update Slash Command Dispatch GitHub Actions template

* suppress detachedhead advise on versioned tag install (cloudposse#199)

Thanks! Makes sense...

* Add discourse badges (cloudposse#200)

* fix gomplate install

* rebuild readme

* Update README.md (cloudposse#201)

Co-authored-by: osterman <[email protected]>

Co-authored-by: Cloud Posse Bot (CI/CD) <[email protected]>
Co-authored-by: osterman <[email protected]>

* Fixes cloudposse#149, tf/lint on mac xargs does not support --no-run-if-empty (cloudposse#206)

* fix dispatch template paths (cloudposse#211)

* fix dispatch template paths

* remove duplicate target

* Use github actions to build and push (cloudposse#213)

* Use github actions to build and push

* Update readme

* rename to docker

* rename to docker

* update descriptions

* build-and-push

* Update readme

* more renaming

* Update .github/workflows/build-and-push.yml

Co-authored-by: Andriy Knysh <[email protected]>

Co-authored-by: Andriy Knysh <[email protected]>

* fix issue template (cloudposse#215)

* add test workflow (cloudposse#212)

* add test workflow

* bump versions

* add test command

* rename to chatops

* drop slash command (cloudposse#216)

* Update codeowners (cloudposse#217)

* Fix terraform docs (cloudposse#218)

* build image on releases (cloudposse#219)

* Fix assert-set (cloudposse#220)

* Fix assert-set

* Update description

* use native make to test variables

* reenable deps-dev

* use native make error handling

* add yq (cloudposse#222)

* Changes to support README.md to passing super-linter (cloudposse#230)

* MD changes to pass linting

* Additional changes

* Built readme

* CR changes

* Create ignore file by default

* Change description to better match docs/deps

* Change linter ignore to according type

* Fix MD040/fenced-code-language lint error

* Ignore just part of violating MD file

* Ignore MD041 for whole file targets.md

* Ignore linting all docs/*.md files

* Update README template to pass lint and add gh action superlinter  (cloudposse#232)

* Update README template to pass lint

In PR against `terraform-example-module` I ran into [issue with superlint](https://github.com/cloudposse/terraform-example-module/pull/3/checks?check_run_id=928328375)
> ERROR:[README.md:240 MD046/code-block-style Code block style [Expected: fenced; Actual: indented]]

Here is documentation about it:
https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md046---code-block-style

* Additional fix for another lint failure

* Convert licenses to code and add superlint to gh actions

* Fix readme

* Remove ending white characters'

* add auto-release action (cloudposse#238)

* refine auto release (cloudposse#239)

* Expand auto-releasers configuration (cloudposse#240)

* use labels

* fix auto labels

* Update Release Template (cloudposse#241)

* Update chatops (cloudposse#236)

* update chatops permissions

* update chatops

* Update .github/workflows/chatops.yml

Co-authored-by: Nuru <[email protected]>

* Update .github/workflows/chatops.yml

Co-authored-by: Nuru <[email protected]>

* update slash-command-dispatch

Co-authored-by: Nuru <[email protected]>

* Fix module upgrade script (cloudposse#243)

* Fix module upgrade script

* update deps

* Add context.tf to CODEOWNERS (cloudposse#245)

* Fixing superlint terraform docs check for inherited markdown files (cloudposse#244)

* Update auto-release and docker workflow to push release tags (cloudposse#249)

* terraform/migrate-to-registry Makefile target added (cloudposse#258)

* terraform/migrate-to-registry Makefile target added

* target renamed

* readme rebuilded

* markdown linter rules fix to avoid raising errors for lines longer then 400 chars

* full linter config applied

* terraform format for examples as well

* markdownlint disabled for contributors table

* regex fix

* readme fix

* readme fix

* linter rules removed, no need for them any more

* new target to remove upper bound for terraform core version constraint (cloudposse#261)

* Add support for Terraform 0.14 (cloudposse#262)

* fix broken interpolation (cloudposse#265)

* Add commands to help create pull requests (cloudposse#266)

* Add renovate config to Terraform modules (cloudposse#267)

* Support more automation (cloudposse#268)

* RUNNER_DOCKER_IMAGE was missing for 'builder' target (cloudposse#269)

* [auto-context] Open PR (as cloudpossebot) when context.tf changes (cloudposse#270)

* feat: add dynamic update the lists of related and references (cloudposse#273)

* Update README.md Template with BridgeCrew Compliance Badges (cloudposse#256)

* Update README.md Template with BridgeCrew Compliance Badges

* template fixes

* Security & Compliance section shown only for terraform modules

Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>

* approvers now allowed to review all *.tf files (cloudposse#277)

* approvers now allowed to review all *.tf files

* README.yaml added for approvers

* mergify rule to close PRs without changes (cloudposse#280)

* mergify rule to close PRs without changes

* Update templates/terraform/.github/mergify.yml

Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>

* nightly build added before midnight to prepare build-harness images before most of nightly build fires (cloudposse#281)

* integration of generate-related-references target (cloudposse#282)

* remove generate-related-references target from auto-format (cloudposse#283)

* auto-release respect 'no-release' label (cloudposse#279)

* Adds auto-init capability using the bootstrap include directive (cloudposse#272)

* bugfix (cloudposse#285)

* Add `make` target to run pre-commit hooks (cloudposse#286)

* Add support for "deprecated" flag/section in README (cloudposse#288)

* Better formatting of combined release notes (cloudposse#289)

* Better formatting of combined release notes

* add conditional to related section or README template (cloudposse#290)

* add conditional

* fix formatting

* update readme

* Auto Format

Co-authored-by: cloudpossebot <[email protected]>

* Add Terraform versions 0.15 and 1.x (cloudposse#293)

* Enable formatting of modules requiring TF 0.15 or TF 1. (cloudposse#294)

* Create a draft release rather than no release with `no-release` label (cloudposse#296)

* update AWS CLI (cloudposse#297)

* Make 1.x the default Terraform version (cloudposse#299)

* remove  target

* remove .github directory

Co-authored-by: David Schmidt <[email protected]>
Co-authored-by: Andriy Knysh <[email protected]>
Co-authored-by: Hans Kristian Moen <[email protected]>
Co-authored-by: Erik Osterman <[email protected]>
Co-authored-by: Cloud Posse Bot (CI/CD) <[email protected]>
Co-authored-by: osterman <[email protected]>
Co-authored-by: Matt Gowie <[email protected]>
Co-authored-by: marcin <[email protected]>
Co-authored-by: Nuru <[email protected]>
Co-authored-by: Maxim Mironenko <[email protected]>
Co-authored-by: Matt Calhoun <[email protected]>
Co-authored-by: Vladimir <[email protected]>
Co-authored-by: Loren Gordon <[email protected]>
Co-authored-by: cloudpossebot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants