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

Terraform 0.13 Compatibility #285

Merged
merged 15 commits into from Aug 8, 2020
Merged

Terraform 0.13 Compatibility #285

merged 15 commits into from Aug 8, 2020

Conversation

skorfmann
Copy link
Contributor

@skorfmann skorfmann commented Aug 5, 2020

This adds Terraform 0.13 compatibility - Fixes #118

Noteworthy Changes:

  • We download the 0.12 and 0.13 Terraform binaries in hashicorp/jsii-terraform docker image.
  • Introduces build matrix for 0.12 / 0.13
  • For hashicorp maintained providers, cdktf.json provider specifications can stay as they are today
  • For all other providers (e.g. docker), the provider specification has to be changed to a more specific name

Example

AWS Provider

This will work with Terraform 0.12 and 0.13, since HashiCorp maintained providers will be automatically handled by Terraform 0.13 as well.

{
  "language": "typescript",
  "app": "npm run --silent compile && node main.js",
  "terraformProviders": [
    "aws@~> 2.0"
  ]
}

Docker Provider

This will work with Terraform 0.12 and 0.13, since the source is ignore in 0.12

{
  "language": "typescript",
  "app": "npm run --silent compile && node main.js",
  "terraformProviders": [
    "terraform-providers/docker@~> 2.0"
  ]
}

This will only work in 0.12

{
  "language": "typescript",
  "app": "npm run --silent compile && node main.js",
  "terraformProviders": [
    "docker@~> 2.0"
  ]
}

Dependencies

This still needs #36 /cc @anubhavmishra

@skorfmann skorfmann requested a review from anubhavmishra Aug 7, 2020
@anubhavmishra
Copy link
Member

I updated the jsii-terraform image with 0.12 and 0.13 binaries. We won't use tfenv for switching between Terraform versions as it requires us to install it by cloning the GitHub repo. We chose a simpler approach by installing the Terraform binaries from HashiCorp releases.

@anubhavmishra anubhavmishra merged commit 59f5566 into master Aug 8, 2020
1 check passed
@anubhavmishra anubhavmishra deleted the terraform-0-13 branch Aug 8, 2020
@github-actions
Copy link
Contributor

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check Terraform 0.13 Compatibility
2 participants