-
Notifications
You must be signed in to change notification settings - Fork 44
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
- 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 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow this is nice !
testTerraform(t, "15_1.0") | ||
} | ||
|
||
func TestTerraform1o0(t *testing.T) { | ||
testTerraform(t, "15_1.0") |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#79 :(
Resolves #89