Skip to content

Commit 4cb4b70

Browse files
committed
update some test data
1 parent 7f6750f commit 4cb4b70

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

testdata/dockerdata/main.tf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,24 @@ terraform {
1212
}
1313
}
1414

15+
data "coder_parameter" "example" {
16+
name = "Example"
17+
description = "An example parameter that has no purpose."
18+
type = "string"
19+
20+
option {
21+
name = "Ubuntu"
22+
description = data.docker_registry_image.ubuntu.name
23+
value = try(data.docker_registry_image.ubuntu.sha256_digest, "??")
24+
}
25+
26+
option {
27+
name = "Centos"
28+
description = docker_image.centos.name
29+
value = try(docker_image.centos.repo_digest, "??")
30+
}
31+
}
32+
1533
data "coder_workspace_tags" "custom_workspace_tags" {
1634
tags = {
1735
// If a value is required, you can do something like:

testdata/http/main.tf

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
terraform {
2+
required_providers {
3+
coder = {
4+
source = "coder/coder"
5+
}
6+
}
7+
}
8+
9+
data "http" "example" {
10+
url = "https://checkpoint-api.hashicorp.com/v1/check/terraform"
11+
12+
# Optional request headers
13+
request_headers = {
14+
Accept = "application/json"
15+
}
16+
}
17+
18+
data "coder_workspace_tags" "custom_workspace_tags" {
19+
tags = {
20+
"tfversion" = jsondecode(data.http.example.response_body)["current_version"]
21+
}
22+
}

0 commit comments

Comments
 (0)