Skip to content

Commit 8f44603

Browse files
authored
chore: update Terraform testdata by running generate.sh (coder#18044)
## Summary This PR updates the terraform/testdata by running `provisioner/terraform/testdata/generate.sh` script. These changes occur from `terraform-provider-coder` [v2.4.2](https://github.com/coder/terraform-provider-coder/releases/tag/v2.4.2) and are associated to the introduction of a `api_key_scope` optional field with a default value: coder/terraform-provider-coder#391 ## Changes * Run `provisioner/terraform/testdata/generate.sh` script. * Update `resource_test.go` to include `api_key_scope`
1 parent 01d144c commit 8f44603

File tree

41 files changed

+210
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+210
-1
lines changed

provisioner/terraform/resources_test.go

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ func TestConvertResources(t *testing.T) {
6666
OperatingSystem: "linux",
6767
Architecture: "amd64",
6868
Auth: &proto.Agent_Token{},
69+
ApiKeyScope: "all",
6970
ConnectionTimeoutSeconds: 120,
7071
DisplayApps: &displayApps,
7172
ResourcesMonitoring: &proto.ResourcesMonitoring{},
@@ -84,6 +85,7 @@ func TestConvertResources(t *testing.T) {
8485
OperatingSystem: "linux",
8586
Architecture: "amd64",
8687
Auth: &proto.Agent_Token{},
88+
ApiKeyScope: "all",
8789
ConnectionTimeoutSeconds: 120,
8890
DisplayApps: &displayApps,
8991
ResourcesMonitoring: &proto.ResourcesMonitoring{},
@@ -103,6 +105,7 @@ func TestConvertResources(t *testing.T) {
103105
OperatingSystem: "linux",
104106
Architecture: "amd64",
105107
Auth: &proto.Agent_InstanceId{},
108+
ApiKeyScope: "all",
106109
ConnectionTimeoutSeconds: 120,
107110
DisplayApps: &displayApps,
108111
ResourcesMonitoring: &proto.ResourcesMonitoring{},
@@ -120,6 +123,7 @@ func TestConvertResources(t *testing.T) {
120123
OperatingSystem: "linux",
121124
Architecture: "amd64",
122125
Auth: &proto.Agent_Token{},
126+
ApiKeyScope: "all",
123127
ConnectionTimeoutSeconds: 120,
124128
DisplayApps: &displayApps,
125129
ResourcesMonitoring: &proto.ResourcesMonitoring{},
@@ -138,6 +142,7 @@ func TestConvertResources(t *testing.T) {
138142
OperatingSystem: "linux",
139143
Architecture: "amd64",
140144
Auth: &proto.Agent_Token{},
145+
ApiKeyScope: "all",
141146
ConnectionTimeoutSeconds: 120,
142147
DisplayApps: &displayApps,
143148
ResourcesMonitoring: &proto.ResourcesMonitoring{},
@@ -146,6 +151,7 @@ func TestConvertResources(t *testing.T) {
146151
OperatingSystem: "darwin",
147152
Architecture: "amd64",
148153
Auth: &proto.Agent_Token{},
154+
ApiKeyScope: "all",
149155
ConnectionTimeoutSeconds: 1,
150156
MotdFile: "/etc/motd",
151157
DisplayApps: &displayApps,
@@ -162,6 +168,7 @@ func TestConvertResources(t *testing.T) {
162168
OperatingSystem: "windows",
163169
Architecture: "arm64",
164170
Auth: &proto.Agent_Token{},
171+
ApiKeyScope: "all",
165172
ConnectionTimeoutSeconds: 120,
166173
TroubleshootingUrl: "https://coder.com/troubleshoot",
167174
DisplayApps: &displayApps,
@@ -171,6 +178,7 @@ func TestConvertResources(t *testing.T) {
171178
OperatingSystem: "linux",
172179
Architecture: "amd64",
173180
Auth: &proto.Agent_Token{},
181+
ApiKeyScope: "all",
174182
ConnectionTimeoutSeconds: 120,
175183
DisplayApps: &displayApps,
176184
ResourcesMonitoring: &proto.ResourcesMonitoring{},
@@ -213,6 +221,7 @@ func TestConvertResources(t *testing.T) {
213221
},
214222
},
215223
Auth: &proto.Agent_Token{},
224+
ApiKeyScope: "all",
216225
ConnectionTimeoutSeconds: 120,
217226
DisplayApps: &displayApps,
218227
ResourcesMonitoring: &proto.ResourcesMonitoring{},
@@ -240,6 +249,7 @@ func TestConvertResources(t *testing.T) {
240249
},
241250
},
242251
Auth: &proto.Agent_Token{},
252+
ApiKeyScope: "all",
243253
ConnectionTimeoutSeconds: 120,
244254
DisplayApps: &displayApps,
245255
ResourcesMonitoring: &proto.ResourcesMonitoring{},
@@ -275,6 +285,7 @@ func TestConvertResources(t *testing.T) {
275285
},
276286
},
277287
Auth: &proto.Agent_Token{},
288+
ApiKeyScope: "all",
278289
ConnectionTimeoutSeconds: 120,
279290
DisplayApps: &displayApps,
280291
ResourcesMonitoring: &proto.ResourcesMonitoring{},
@@ -295,6 +306,7 @@ func TestConvertResources(t *testing.T) {
295306
},
296307
},
297308
Auth: &proto.Agent_Token{},
309+
ApiKeyScope: "all",
298310
ConnectionTimeoutSeconds: 120,
299311
DisplayApps: &displayApps,
300312
ResourcesMonitoring: &proto.ResourcesMonitoring{},
@@ -320,6 +332,7 @@ func TestConvertResources(t *testing.T) {
320332
},
321333
},
322334
Auth: &proto.Agent_Token{},
335+
ApiKeyScope: "all",
323336
ConnectionTimeoutSeconds: 120,
324337
DisplayApps: &displayApps,
325338
ResourcesMonitoring: &proto.ResourcesMonitoring{},
@@ -338,6 +351,7 @@ func TestConvertResources(t *testing.T) {
338351
},
339352
},
340353
Auth: &proto.Agent_Token{},
354+
ApiKeyScope: "all",
341355
ConnectionTimeoutSeconds: 120,
342356
DisplayApps: &displayApps,
343357
ResourcesMonitoring: &proto.ResourcesMonitoring{},
@@ -383,6 +397,7 @@ func TestConvertResources(t *testing.T) {
383397
},
384398
},
385399
Auth: &proto.Agent_Token{},
400+
ApiKeyScope: "all",
386401
ConnectionTimeoutSeconds: 120,
387402
DisplayApps: &displayApps,
388403
ResourcesMonitoring: &proto.ResourcesMonitoring{
@@ -398,6 +413,7 @@ func TestConvertResources(t *testing.T) {
398413
Architecture: "amd64",
399414
Apps: []*proto.App{},
400415
Auth: &proto.Agent_Token{},
416+
ApiKeyScope: "all",
401417
ConnectionTimeoutSeconds: 120,
402418
DisplayApps: &displayApps,
403419
ResourcesMonitoring: &proto.ResourcesMonitoring{
@@ -443,6 +459,7 @@ func TestConvertResources(t *testing.T) {
443459
},
444460
},
445461
Auth: &proto.Agent_Token{},
462+
ApiKeyScope: "all",
446463
ConnectionTimeoutSeconds: 120,
447464
DisplayApps: &displayApps,
448465
ResourcesMonitoring: &proto.ResourcesMonitoring{},
@@ -462,6 +479,7 @@ func TestConvertResources(t *testing.T) {
462479
},
463480
},
464481
Auth: &proto.Agent_Token{},
482+
ApiKeyScope: "all",
465483
ConnectionTimeoutSeconds: 120,
466484
DisplayApps: &displayApps,
467485
ResourcesMonitoring: &proto.ResourcesMonitoring{},
@@ -492,6 +510,7 @@ func TestConvertResources(t *testing.T) {
492510
Agents: []*proto.Agent{{
493511
Name: "main",
494512
Auth: &proto.Agent_Token{},
513+
ApiKeyScope: "all",
495514
OperatingSystem: "linux",
496515
Architecture: "amd64",
497516
Metadata: []*proto.Agent_Metadata{{
@@ -577,6 +596,7 @@ func TestConvertResources(t *testing.T) {
577596
OperatingSystem: "windows",
578597
Architecture: "arm64",
579598
Auth: &proto.Agent_Token{},
599+
ApiKeyScope: "all",
580600
ConnectionTimeoutSeconds: 120,
581601
DisplayApps: &displayApps,
582602
ResourcesMonitoring: &proto.ResourcesMonitoring{},
@@ -657,6 +677,7 @@ func TestConvertResources(t *testing.T) {
657677
OperatingSystem: "windows",
658678
Architecture: "arm64",
659679
Auth: &proto.Agent_Token{},
680+
ApiKeyScope: "all",
660681
ConnectionTimeoutSeconds: 120,
661682
DisplayApps: &displayApps,
662683
ResourcesMonitoring: &proto.ResourcesMonitoring{},
@@ -684,6 +705,7 @@ func TestConvertResources(t *testing.T) {
684705
OperatingSystem: "windows",
685706
Architecture: "arm64",
686707
Auth: &proto.Agent_Token{},
708+
ApiKeyScope: "all",
687709
ConnectionTimeoutSeconds: 120,
688710
DisplayApps: &displayApps,
689711
ResourcesMonitoring: &proto.ResourcesMonitoring{},
@@ -738,6 +760,7 @@ func TestConvertResources(t *testing.T) {
738760
OperatingSystem: "linux",
739761
Architecture: "amd64",
740762
Auth: &proto.Agent_Token{},
763+
ApiKeyScope: "all",
741764
ConnectionTimeoutSeconds: 120,
742765
DisplayApps: &displayApps,
743766
ResourcesMonitoring: &proto.ResourcesMonitoring{},
@@ -754,6 +777,7 @@ func TestConvertResources(t *testing.T) {
754777
OperatingSystem: "linux",
755778
Architecture: "amd64",
756779
Auth: &proto.Agent_Token{},
780+
ApiKeyScope: "all",
757781
ConnectionTimeoutSeconds: 120,
758782
DisplayApps: &proto.DisplayApps{
759783
VscodeInsiders: true,
@@ -772,6 +796,7 @@ func TestConvertResources(t *testing.T) {
772796
OperatingSystem: "linux",
773797
Architecture: "amd64",
774798
Auth: &proto.Agent_Token{},
799+
ApiKeyScope: "all",
775800
ConnectionTimeoutSeconds: 120,
776801
DisplayApps: &proto.DisplayApps{},
777802
ResourcesMonitoring: &proto.ResourcesMonitoring{},
@@ -786,8 +811,8 @@ func TestConvertResources(t *testing.T) {
786811
Name: "dev",
787812
OperatingSystem: "windows",
788813
Architecture: "arm64",
789-
ApiKeyScope: "all",
790814
Auth: &proto.Agent_Token{},
815+
ApiKeyScope: "all",
791816
ConnectionTimeoutSeconds: 120,
792817
DisplayApps: &displayApps,
793818
ResourcesMonitoring: &proto.ResourcesMonitoring{},
@@ -847,6 +872,7 @@ func TestConvertResources(t *testing.T) {
847872
OperatingSystem: "linux",
848873
Architecture: "amd64",
849874
Auth: &proto.Agent_Token{},
875+
ApiKeyScope: "all",
850876
ConnectionTimeoutSeconds: 120,
851877
DisplayApps: &displayApps,
852878
ResourcesMonitoring: &proto.ResourcesMonitoring{},

provisioner/terraform/testdata/resources/calling-module/calling-module.tfplan.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provisioner/terraform/testdata/resources/calling-module/calling-module.tfstate.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provisioner/terraform/testdata/resources/chaining-resources/chaining-resources.tfplan.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provisioner/terraform/testdata/resources/chaining-resources/chaining-resources.tfstate.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provisioner/terraform/testdata/resources/conflicting-resources/conflicting-resources.tfplan.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provisioner/terraform/testdata/resources/conflicting-resources/conflicting-resources.tfstate.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provisioner/terraform/testdata/resources/devcontainer/devcontainer.tfplan.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provisioner/terraform/testdata/resources/devcontainer/devcontainer.tfstate.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provisioner/terraform/testdata/resources/display-apps-disabled/display-apps-disabled.tfplan.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provisioner/terraform/testdata/resources/display-apps-disabled/display-apps-disabled.tfstate.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provisioner/terraform/testdata/resources/display-apps/display-apps.tfplan.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provisioner/terraform/testdata/resources/display-apps/display-apps.tfstate.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provisioner/terraform/testdata/resources/external-auth-providers/external-auth-providers.tfplan.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provisioner/terraform/testdata/resources/external-auth-providers/external-auth-providers.tfstate.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)