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

Support Terraform 1.0.0 #90

Merged
merged 13 commits into from
Jun 16, 2021
Merged

Support Terraform 1.0.0 #90

merged 13 commits into from
Jun 16, 2021

Conversation

roni-frantchi
Copy link
Contributor

Resolves #89

@roni-frantchi roni-frantchi self-assigned this Jun 15, 2021
@roni-frantchi
Copy link
Contributor Author

@roni-frantchi roni-frantchi marked this pull request as ready for review June 16, 2021 08:10
@roni-frantchi roni-frantchi requested a review from a team June 16, 2021 08:11
Copy link
Contributor

@avnerenv0 avnerenv0 left a comment

Choose a reason for hiding this comment

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

👍

Comment on lines +53 to +65
- name: Set Test-Suite
id: test-suite
env:
TF_VERSION: ${{ matrix.terraform_version }}
uses: actions/github-script@v4
with:
script: |
console.log(`Setting test suite version based on ${process.env.TF_VERSION}`)
const suite = process.env.TF_VERSION.replace('.', 'o')
console.log(`Test suite set to ${suite}`)
return suite
result-encoding: string

Copy link
Contributor

Choose a reason for hiding this comment

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

wow this is nice !

Comment on lines +47 to +51
testTerraform(t, "15_1.0")
}

func TestTerraform1o0(t *testing.T) {
testTerraform(t, "15_1.0")
Copy link
Contributor

Choose a reason for hiding this comment

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

how come the tests for 1 and 15 are the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do the same between 13 and 14.
Basically nothing has changed in terms of in/out syntax and no new cases, so we reuse the fixture files

func buildMapExpression(tokens hclwrite.Tokens, tfVersion int) string {
if tfVersion >= 15 {
func buildMapExpression(tokens hclwrite.Tokens, tfVersion Version) string {
if tfVersion.Major == 0 && tfVersion.Minor >= 15 || tfVersion.Major == 1 {
Copy link
Contributor

Choose a reason for hiding this comment

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

#79 :(

@roni-frantchi roni-frantchi merged commit f8f06a1 into master Jun 16, 2021
@roni-frantchi roni-frantchi deleted the fix-tf-1.0 branch June 16, 2021 08:26
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.

Terraform 1.0.0 support
2 participants