Skip to content

Commit 1c86a06

Browse files
authored
Comment out unencrypted migration method in encryption configuration (#189)
1 parent a859783 commit 1c86a06

File tree

3 files changed

+29
-27
lines changed

3 files changed

+29
-27
lines changed

.github/workflows/plan-and-apply.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
# https://github.com/marketplace/actions/cache
7575

7676
- name: Setup cache
77-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.0
77+
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
7878
with:
7979
path: |
8080
${{ inputs.working_directory }}/.terraform
@@ -87,15 +87,15 @@ jobs:
8787
# https://github.com/marketplace/actions/checkout
8888

8989
- name: Checkout
90-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.2.2
90+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
9191
with:
9292
ref: ${{ inputs.checkout_ref }}
9393

9494
# Google Cloud Platform - Authenticate to Google Cloud
9595
# https://github.com/marketplace/actions/authenticate-to-google-cloud
9696

9797
- name: Authenticate
98-
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v2.1.6
98+
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
9999
with:
100100
create_credentials_file: true
101101
service_account: ${{ inputs.service_account }}
@@ -173,15 +173,15 @@ jobs:
173173
# https://github.com/marketplace/actions/checkout
174174

175175
- name: Checkout
176-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.2.2
176+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
177177
with:
178178
ref: ${{ inputs.checkout_ref }}
179179

180180
# Google Cloud Platform - Authenticate to Google Cloud
181181
# https://github.com/marketplace/actions/authenticate-to-google-cloud
182182

183183
- name: Authenticate
184-
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v2.1.6
184+
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
185185
with:
186186
create_credentials_file: true
187187
service_account: ${{ inputs.service_account }}

tests/plan-and-apply/main.tofu

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,18 @@ module "project" {
1414
# Google Storage Bucket Module (osinfra.io)
1515
# https://github.com/osinfra-io/opentofu-google-storage-bucket
1616

17-
module "bucket" {
18-
source = "github.com/osinfra-io/opentofu-google-storage-bucket?ref=642c3eb45623e0e619dcc3c80c98ef804da7c153" # v0.2.1
17+
# Comment or un-comment out the following two resources to test the apply job.
1918

20-
force_destroy = true
21-
labels = module.helpers.labels
22-
location = "US"
23-
name = "test-${random_id.test.hex}-${module.helpers.env}"
24-
project = module.project.id
25-
}
19+
# module "bucket" {
20+
# source = "github.com/osinfra-io/opentofu-google-storage-bucket?ref=642c3eb45623e0e619dcc3c80c98ef804da7c153" # v0.2.1
2621

27-
resource "random_id" "test" {
28-
byte_length = 4
29-
}
22+
# force_destroy = true
23+
# labels = module.helpers.labels
24+
# location = "US"
25+
# name = "test-${random_id.test.hex}-${module.helpers.env}"
26+
# project = module.project.id
27+
# }
28+
29+
# resource "random_id" "test" {
30+
# byte_length = 4
31+
# }

tests/plan-and-apply/providers.tofu

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ terraform {
77
# fallback encryption methods for state and plan files for bootstrapping.
88

99
encryption {
10-
method "unencrypted" "migrate" {}
10+
# method "unencrypted" "migrate" {}
1111

1212
key_provider "gcp_kms" "default" {
1313
kms_encryption_key = var.kms_encryption_key
@@ -19,21 +19,21 @@ terraform {
1919
}
2020

2121
plan {
22-
method = method.aes_gcm.default
23-
#enforced = true
22+
method = method.aes_gcm.default
23+
enforced = true
2424

25-
fallback {
26-
method = method.unencrypted.migrate
27-
}
25+
# fallback {
26+
# method = method.unencrypted.migrate
27+
# }
2828
}
2929

3030
state {
31-
method = method.aes_gcm.default
32-
#enforced = true
31+
method = method.aes_gcm.default
32+
enforced = true
3333

34-
fallback {
35-
method = method.unencrypted.migrate
36-
}
34+
# fallback {
35+
# method = method.unencrypted.migrate
36+
# }
3737
}
3838
}
3939

0 commit comments

Comments
 (0)