-
Notifications
You must be signed in to change notification settings - Fork 9k
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
Validate Examples Terraform Configurations via CI Testing #12861
Comments
…nd 0.12.24 Reference: #12861 GitHub Action that verifies the examples against the latest provider supported Terraform versions (0.11.14 and 0.12.24 currently) with the following commands: - `terraform init` - `terraform fmt -check` - `terraform validate` Most of the complexity in this workflow is supporting the `go build` of the provider that substitutes as the latest version available in releases/registry (determined via Git release tags). This allows unreleased functionality to be tested. We cannot use `-plugin-dir` since would prevent other providers in use by some of the examples (e.g. random) from downloading. This changeset also standardizes around using `terraform.template.tfvars` for declaring required variables and already in use by a few of the existing examples directories. This is especially required in Terraform 0.11 for `terraform validate`. Other changes here are bare minimum fixes to get everything passing in both Terraform versions. Later design proposals should guide any major refactorings of the examples.
…nd 0.12.24 (#13196) * fixed issue #9612 * fixed issue #9612 * fixed cidrsubnet implementation is off by 1 in the networking example. * tests/provider: Initial examples checking against Terraform 0.11.14 and 0.12.24 Reference: #12861 GitHub Action that verifies the examples against the latest provider supported Terraform versions (0.11.14 and 0.12.24 currently) with the following commands: - `terraform init` - `terraform fmt -check` - `terraform validate` Most of the complexity in this workflow is supporting the `go build` of the provider that substitutes as the latest version available in releases/registry (determined via Git release tags). This allows unreleased functionality to be tested. We cannot use `-plugin-dir` since would prevent other providers in use by some of the examples (e.g. random) from downloading. This changeset also standardizes around using `terraform.template.tfvars` for declaring required variables and already in use by a few of the existing examples directories. This is especially required in Terraform 0.11 for `terraform validate`. Other changes here are bare minimum fixes to get everything passing in both Terraform versions. Later design proposals should guide any major refactorings of the examples. Co-authored-by: Aidan Melen <amelen@exactsciences.com>
This has been released in version 2.61.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Description
The Terraform AWS Provider codebase contains full Terraform configurations in the
examples
directory. Each of these directories should at a minimum haveterraform fmt
andterraform validate
ran during pull requests for testing.As a potential implementation, there are officially supported Terraform GitHub Actions available: https://github.com/hashicorp/terraform-github-actions/
For example (needs to be updated to handle per-directory checks):
References
The text was updated successfully, but these errors were encountered: