mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
updates
This commit is contained in:
parent
b30711ac4c
commit
680419d949
2
.github/CONTRIBUTING.md
vendored
2
.github/CONTRIBUTING.md
vendored
@ -22,7 +22,7 @@ The contribution guideline will change in the near future, as the management of
|
||||
|
||||
## Proposing a Change
|
||||
|
||||
In order to be respectful of the time of community contributors, we aim to discuss potential changes in GitHub issues prior to implementation. That will allow us to give design feedback up front and set expectations about the scope of the change, and, for larger changes, how best to approach the work such that the Terraform team can review it and merge it along with other concurrent work.
|
||||
In order to be respectful of the time of community contributors, we aim to discuss potential changes in GitHub issues prior to implementation. That will allow us to give design feedback up front and set expectations about the scope of the change, and, for larger changes, how best to approach the work such that the OpenTF team can review it and merge it along with other concurrent work.
|
||||
|
||||
If the bug you wish to fix or enhancement you wish to implement isn't already covered by a GitHub issue, please do start a discussion (either in [a new GitHub issue](https://github.com/placeholderplaceholderplaceholder/opentf/issues/new/choose) or an existing one, as appropriate) before you invest significant development time.
|
||||
|
||||
|
14
.github/actions/equivalence-test/action.yml
vendored
14
.github/actions/equivalence-test/action.yml
vendored
@ -2,16 +2,16 @@
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
name: equivalence-test
|
||||
description: "Execute the suite of Terraform equivalence tests in testing/equivalence-tests"
|
||||
description: "Execute the suite of OpenTF equivalence tests in testing/equivalence-tests"
|
||||
inputs:
|
||||
target-terraform-version:
|
||||
description: "The version of Terraform to use in execution."
|
||||
target-opentf-version:
|
||||
description: "The version of OpenTF to use in execution."
|
||||
required: true
|
||||
target-terraform-branch:
|
||||
target-opentf-branch:
|
||||
description: "The branch within this repository to update and compare."
|
||||
required: true
|
||||
target-equivalence-test-version:
|
||||
description: "The version of the Terraform equivalence tests to use."
|
||||
description: "The version of the OpenTF equivalence tests to use."
|
||||
default: "0.3.0"
|
||||
target-os:
|
||||
description: "Current operating system"
|
||||
@ -30,7 +30,7 @@ runs:
|
||||
./bin/equivalence-tests \
|
||||
${{ inputs.target-os }} \
|
||||
${{ inputs.target-arch }}
|
||||
- name: "download terraform binary"
|
||||
- name: "download opentf binary"
|
||||
shell: bash
|
||||
run: |
|
||||
./.github/scripts/equivalence-test.sh download_terraform_binary \
|
||||
@ -51,7 +51,7 @@ runs:
|
||||
echo "found changes, and pushing new golden files into branch ${{ inputs.target-terraform-branch }}."
|
||||
|
||||
git config user.email "52939924+teamterraform@users.noreply.github.com"
|
||||
git config user.name "The Terraform Team"
|
||||
git config user.name "The OpenTF Team"
|
||||
|
||||
git add ./testing/equivalence-tests/outputs
|
||||
git commit -m "Automated equivalence test golden file update for release ${{ inputs.target-terraform-version }}."
|
||||
|
6
.github/scripts/equivalence-test.sh
vendored
6
.github/scripts/equivalence-test.sh
vendored
@ -10,11 +10,11 @@ Usage: ./equivalence-test.sh <command> [<args>] [<options>]
|
||||
|
||||
Description:
|
||||
This script will handle various commands related to the execution of the
|
||||
Terraform equivalence tests.
|
||||
OpenTF equivalence tests.
|
||||
|
||||
Commands:
|
||||
get_target_branch <version>
|
||||
get_target_branch returns the default target branch for a given Terraform
|
||||
get_target_branch returns the default target branch for a given OpenTF
|
||||
version.
|
||||
|
||||
target_branch=$(./equivalence-test.sh get_target_branch v1.4.3); target_branch=v1.4
|
||||
@ -27,7 +27,7 @@ Commands:
|
||||
./equivalence-test.sh download_equivalence_test_binary 0.3.0 ./bin/terraform-equivalence-testing linux amd64
|
||||
|
||||
download_terraform_binary <version> <target> <os> <arch>
|
||||
download_terraform_binary downloads the terraform release binary for a given
|
||||
download_terraform_binary downloads the opentf release binary for a given
|
||||
version and places it at the target path.
|
||||
|
||||
./equivalence-test.sh download_terraform_binary 1.4.3 ./bin/terraform linux amd64
|
||||
|
2
.github/scripts/get_product_version.sh
vendored
2
.github/scripts/get_product_version.sh
vendored
@ -30,7 +30,7 @@ LDFLAGS="${LDFLAGS} -X 'main.experimentsAllowed=yes'"
|
||||
fi
|
||||
LDFLAGS="${LDFLAGS} -X 'github.com/placeholderplaceholderplaceholder/opentf/version.dev=no'"
|
||||
|
||||
echo "Building Terraform CLI ${VERSION}"
|
||||
echo "Building OpenTF CLI ${VERSION}"
|
||||
if [[ "$EXPERIMENTS_ENABLED" == 1 ]]; then
|
||||
echo "This build allows use of experimental features"
|
||||
fi
|
||||
|
2
.github/workflows/build-Dockerfile
vendored
2
.github/workflows/build-Dockerfile
vendored
@ -4,7 +4,7 @@
|
||||
#
|
||||
# If you want to test this locally you'll need to set the three arguments
|
||||
# to values realistic for what the hashicorp/actions-docker-build GitHub
|
||||
# action would set, and ensure that there's a suitable "terraform" executable
|
||||
# action would set, and ensure that there's a suitable "opentf" executable
|
||||
# in the dist/linux/${TARGETARCH} directory.
|
||||
|
||||
FROM docker.mirror.hashicorp.services/alpine:latest AS default
|
||||
|
14
main.go
14
main.go
@ -75,7 +75,7 @@ func realMain() int {
|
||||
// explicit environment variable to enable telemetry collection,
|
||||
// so in typical use we cannot get here.
|
||||
Ui.Error(fmt.Sprintf("Could not initialize telemetry: %s", err))
|
||||
Ui.Error(fmt.Sprintf("Unset environment variable %s if you don't intend to collect telemetry from Terraform.", openTelemetryExporterEnvVar))
|
||||
Ui.Error(fmt.Sprintf("Unset environment variable %s if you don't intend to collect telemetry from OpenTF.", openTelemetryExporterEnvVar))
|
||||
return 1
|
||||
}
|
||||
var ctx context.Context
|
||||
@ -83,7 +83,7 @@ func realMain() int {
|
||||
{
|
||||
// At minimum we emit a span covering the entire command execution.
|
||||
_, displayArgs := shquot.POSIXShellSplit(os.Args)
|
||||
ctx, otelSpan = tracer.Start(context.Background(), fmt.Sprintf("terraform %s", displayArgs))
|
||||
ctx, otelSpan = tracer.Start(context.Background(), fmt.Sprintf("opentf %s", displayArgs))
|
||||
defer otelSpan.End()
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ func realMain() int {
|
||||
}
|
||||
|
||||
log.Printf(
|
||||
"[INFO] Terraform version: %s %s",
|
||||
"[INFO] OpenTF version: %s %s",
|
||||
Version, VersionPrerelease)
|
||||
for _, depMod := range version.InterestingDependencies() {
|
||||
log.Printf("[DEBUG] using %s %s", depMod.Path, depMod.Version)
|
||||
@ -109,7 +109,7 @@ func realMain() int {
|
||||
log.Printf("[INFO] Go runtime version: %s", runtime.Version())
|
||||
log.Printf("[INFO] CLI args: %#v", os.Args)
|
||||
if ExperimentsAllowed() {
|
||||
log.Printf("[INFO] This build of Terraform allows using experimental features")
|
||||
log.Printf("[INFO] This build of OpenTF allows using experimental features")
|
||||
}
|
||||
|
||||
streams, err := terminal.Init()
|
||||
@ -157,7 +157,7 @@ func realMain() int {
|
||||
Ui.Error(format.Diagnostic(diag, nil, earlyColor, 78))
|
||||
}
|
||||
if diags.HasErrors() {
|
||||
Ui.Error("As a result of the above problems, Terraform may not behave as intended.\n\n")
|
||||
Ui.Error("As a result of the above problems, OpenTF may not behave as intended.\n\n")
|
||||
// We continue to run anyway, since Terraform has reasonable defaults.
|
||||
}
|
||||
}
|
||||
@ -195,7 +195,7 @@ func realMain() int {
|
||||
Ui.Error(format.Diagnostic(diag, nil, earlyColor, 78))
|
||||
}
|
||||
if diags.HasErrors() {
|
||||
Ui.Error("As a result of the above problems, Terraform's provider installer may not behave as intended.\n\n")
|
||||
Ui.Error("As a result of the above problems, OpenTF's provider installer may not behave as intended.\n\n")
|
||||
// We continue to run anyway, because most commands don't do provider installation.
|
||||
}
|
||||
}
|
||||
@ -331,7 +331,7 @@ func realMain() int {
|
||||
if suggestion != "" {
|
||||
suggestion = fmt.Sprintf(" Did you mean %q?", suggestion)
|
||||
}
|
||||
fmt.Fprintf(os.Stderr, "Terraform has no command named %q.%s\n\nTo see all of Terraform's top-level commands, run:\n terraform -help\n\n", cmd, suggestion)
|
||||
fmt.Fprintf(os.Stderr, "OpenTF has no command named %q.%s\n\nTo see all of OpenTF's top-level commands, run:\n opentf -help\n\n", cmd, suggestion)
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user