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

Revert "Improve handling of tf plugin cache in tests" #886

Merged
merged 1 commit into from
Oct 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 4 additions & 23 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ jobs:
terraform_version: ${{ env.TF_VERSION }}
terraform_wrapper: false

- name: Config Terraform plugin cache and initialize providers
- name: Config Terraform plugin cache
run: |
echo 'plugin_cache_dir="$HOME/.terraform.d/plugin-cache"' >~/.terraformrc
mkdir --parents ~/.terraform.d/plugin-cache
sed -i -e '/# CI hook/e cat tests/test-versions.tf' default-versions.tf

- name: Initialize providers
run: |
terraform init

# avoid conflicts with user-installed providers on local machines
Expand Down Expand Up @@ -105,13 +107,6 @@ jobs:
run: |
terraform init

- name: Config Terraform plugin cache and initialize providers
run: |
echo 'plugin_cache_dir="$HOME/.terraform.d/plugin-cache"' >~/.terraformrc
mkdir --parents ~/.terraform.d/plugin-cache
sed -i -e '/# CI hook/e cat tests/test-versions.tf' default-versions.tf
terraform init

# avoid conflicts with user-installed providers on local machines
- name: Pin provider versions
run: |
Expand Down Expand Up @@ -156,13 +151,6 @@ jobs:
run: |
terraform init

- name: Config Terraform plugin cache and initialize providers
run: |
echo 'plugin_cache_dir="$HOME/.terraform.d/plugin-cache"' >~/.terraformrc
mkdir --parents ~/.terraform.d/plugin-cache
sed -i -e '/# CI hook/e cat tests/test-versions.tf' default-versions.tf
terraform init

# avoid conflicts with user-installed providers on local machines
- name: Pin provider versions
run: |
Expand Down Expand Up @@ -207,13 +195,6 @@ jobs:
run: |
terraform init

- name: Config Terraform plugin cache and initialize providers
run: |
echo 'plugin_cache_dir="$HOME/.terraform.d/plugin-cache"' >~/.terraformrc
mkdir --parents ~/.terraform.d/plugin-cache
sed -i -e '/# CI hook/e cat tests/test-versions.tf' default-versions.tf
terraform init

# avoid conflicts with user-installed providers on local machines
- name: Pin provider versions
run: |
Expand Down
9 changes: 8 additions & 1 deletion default-versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ terraform {
source = "hashicorp/google-beta"
version = ">= 4.36.0" # tftest
}
# CI hook
# used in modules
archive = {
source = "hashicorp/archive"
}
# used in fast
local = {
source = "hashicorp/local"
}
}
}

Expand Down
4 changes: 0 additions & 4 deletions tests/test-versions.tf

This file was deleted.