Skip to content

Commit

Permalink
Использование локальных провайдеров для OpenTofu (#13)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexey Orlov <[email protected]>
  • Loading branch information
v1km4n and Alexey Orlov authored Aug 30, 2024
1 parent 51e09cf commit 1b1b504
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/workflows/opentofu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ jobs:
with:
tofu_version: 1.6.2

- name: Add .tofurc
shell: bash
run: |
cat <<EOS >> $HOME/.tofurc
provider_installation {
filesystem_mirror {
path = "$GITHUB_WORKSPACE/providers"
include = ["registry.terraform.io/*/*"]
}
}
EOS
- name: Lint OpenTofu
run: tofu fmt -diff -check -recursive

Expand All @@ -39,6 +51,9 @@ jobs:
-backend-config="access_key=${{ secrets.S3_ACCESS_KEY }}"
-backend-config="secret_key=${{ secrets.S3_SECRET_KEY }}"
- name: Chmod providers
run: chmod -R 777 $GITHUB_WORKSPACE/providers

- name: OpenTofu apply
run: tofu apply -auto-approve

Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ module "mks" {
gpu_ng_volume_gb = [100]
gpu_ng_volume_type = ["fast"]
gpu_ng_labels = [{ "role" : "gpu" }]
gpu_ng_flavor = ["3041"]
gpu_ng_flavor = ["3021"]

nat_subnet_cidr = "10.222.0.0/16"
enable_autorepair = false
Expand Down

0 comments on commit 1b1b504

Please sign in to comment.