-
Notifications
You must be signed in to change notification settings - Fork 1
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
build: use opentofu binary in harness terraform image #217
base: main
Are you sure you want to change the base?
build: use opentofu binary in harness terraform image #217
Conversation
tag: '1.1' | ||
- full: 1.0.11 | ||
- tofu: 1.6.2 |
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.
are these versions actually aligned? Looks like the tofu version is always 1.6.2
?
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.
yes, according to OpenTofu Migration Docs
When migrating from Terraform 1.5.x or lower, please migrate to OpenTofu 1.6.2 first
But with a caveat:
This migration guide is only valid for Terraform 1.5.7. If you are on a Terraform version below 1.5.7, please upgrade to at least Terraform version 1.5.7 before proceeding with the migration by following the Terraform upgrade guide. If you are on a higher Terraform version, please select the appropriate migration guide for your Terraform version.
and use that to conditionally determine which dockerfile to use
…u-binary-in-terraform-dockerfile
Have you tested any runs w/ the tofu versions yet? |
I tested manually. by that I mean downloading the image, volume mounting the |
…u-binary-in-terraform-dockerfile
@@ -0,0 +1,11 @@ | |||
ARG TOFU_IMAGE_TAG=1.7.1 |
Check notice
Code scanning / Trivy
No HEALTHCHECK defined Low
Type: dockerfile
Vulnerability DS026
Severity: LOW
Message: Add HEALTHCHECK instruction in your Dockerfile
Link: DS026
…u-binary-in-terraform-dockerfile
ARG HARNESS_BASE_IMAGE_REPO=harness-base | ||
ARG HARNESS_BASE_IMAGE=$HARNESS_BASE_IMAGE_REPO:$HARNESS_BASE_IMAGE_TAG | ||
|
||
FROM $TOFU_IMAGE AS tofu |
Check warning
Code scanning / Trivy
':latest' tag used Medium
Type: dockerfile
Vulnerability DS001
Severity: MEDIUM
Message: Specify a tag in the 'FROM' statement for image '1.7.1'
Link: DS001
ARG HARNESS_BASE_IMAGE=$HARNESS_BASE_IMAGE_REPO:$HARNESS_BASE_IMAGE_TAG | ||
|
||
FROM $TOFU_IMAGE AS tofu | ||
FROM $HARNESS_BASE_IMAGE AS final |
Check warning
Code scanning / Trivy
':latest' tag used Medium
Type: dockerfile
Vulnerability DS001
Severity: MEDIUM
Message: Specify a tag in the 'FROM' statement for image 'harness-base'
Link: DS001
ARG HARNESS_BASE_IMAGE=$HARNESS_BASE_IMAGE_REPO:$HARNESS_BASE_IMAGE_TAG | ||
|
||
FROM $TOFU_IMAGE AS tofu | ||
FROM $HARNESS_BASE_IMAGE AS final |
Check warning
Code scanning / Trivy
':latest' tag used Medium
Type: dockerfile
Vulnerability DS001
Severity: MEDIUM
Message: Specify a tag in the 'FROM' statement for image 'sha-1eca71e'
Link: DS001
…u-binary-in-terraform-dockerfile
To avoid violating Terraform's BSL license, we are using the OpenTofu binary in the Harness Image