Skip to content
Snippets Groups Projects
Unverified Commit 4ac18238 authored by Timo Furrer's avatar Timo Furrer
Browse files

Rename `terraform_authenticate_private_registry` function to `tofu_authenticate_private_registry`

Changelog: changed
parent 30b74af0
No related branches found
No related tags found
No related merge requests found
...@@ -227,7 +227,7 @@ if [ -z "${TF_CLI_CONFIG_FILE}" ] && [ -f "${default_tf_cli_config_file}" ]; the ...@@ -227,7 +227,7 @@ if [ -z "${TF_CLI_CONFIG_FILE}" ] && [ -f "${default_tf_cli_config_file}" ]; the
fi fi
terraform_authenticate_private_registry() { tofu_authenticate_private_registry() {
# From Terraform 1.2.0 and later (or all versions of OpenTofu), we can use TF_TOKEN_your_domain_name to authenticate to registry. # From Terraform 1.2.0 and later (or all versions of OpenTofu), we can use TF_TOKEN_your_domain_name to authenticate to registry.
# The credential environment variable has the following requirements: # The credential environment variable has the following requirements:
# - Domain names containing non-ASCII characters are converted to their punycode equivalent with an ACE prefix # - Domain names containing non-ASCII characters are converted to their punycode equivalent with an ACE prefix
...@@ -269,7 +269,7 @@ tofu_init() { ...@@ -269,7 +269,7 @@ tofu_init() {
# and helper functions exposed by this script. # and helper functions exposed by this script.
if [ $sourced -eq 0 ]; then if [ $sourced -eq 0 ]; then
# Authenticate to private registry # Authenticate to private registry
terraform_authenticate_private_registry tofu_authenticate_private_registry
var_file_args="" var_file_args=""
if [ -n "${GITLAB_TOFU_VAR_FILE}" ]; then if [ -n "${GITLAB_TOFU_VAR_FILE}" ]; then
......
...@@ -139,7 +139,7 @@ EOF ...@@ -139,7 +139,7 @@ EOF
@test "gitlab-tofu no wrap" { @test "gitlab-tofu no wrap" {
# NOTE: running `gitlab-tofu apply` wouldn't fail # NOTE: running `gitlab-tofu apply` wouldn't fail
# because of the implicit `terraform init`. # because of the implicit `tofu init`.
run gitlab-tofu -- apply -no-color run gitlab-tofu -- apply -no-color
assert_failure assert_failure
assert_output --partial 'Error: Backend initialization required, please run "tofu init"' assert_output --partial 'Error: Backend initialization required, please run "tofu init"'
...@@ -206,7 +206,7 @@ set -x ...@@ -206,7 +206,7 @@ set -x
export CI_SERVER_HOST=gitlab.example.com export CI_SERVER_HOST=gitlab.example.com
export TF_TOKEN_gitlab_example_com=mysecrettoken export TF_TOKEN_gitlab_example_com=mysecrettoken
. $(which gitlab-tofu) . $(which gitlab-tofu)
terraform_authenticate_private_registry tofu_authenticate_private_registry
test "$TF_TOKEN_gitlab_example_com" = "mysecrettoken" test "$TF_TOKEN_gitlab_example_com" = "mysecrettoken"
EOF EOF
...@@ -224,7 +224,7 @@ set -x ...@@ -224,7 +224,7 @@ set -x
export CI_SERVER_HOST=gitlab.example.com export CI_SERVER_HOST=gitlab.example.com
export TF_TOKEN_gitlab_example_com=mysecrettoken export TF_TOKEN_gitlab_example_com=mysecrettoken
. $(which gitlab-tofu) . $(which gitlab-tofu)
terraform_authenticate_private_registry tofu_authenticate_private_registry
test "$TF_TOKEN_gitlab_example_com" = "mysecrettoken" test "$TF_TOKEN_gitlab_example_com" = "mysecrettoken"
EOF EOF
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment