Skip to content

test: parameter description contains Markdown #94

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

Merged
merged 3 commits into from
Feb 7, 2023
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
11 changes: 8 additions & 3 deletions examples/resources/coder_parameter/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ data "coder_parameter" "example" {

data "coder_parameter" "ami" {
name = "Machine Image"
description = <<-EOT
# Provide the machine image
See the [registry](https://container.registry.blah/namespace) for options.
EOT
option {
value = "ami-xxxxxxxx"
name = "Ubuntu"
Expand All @@ -26,14 +30,15 @@ data "coder_parameter" "ami" {

data "coder_parameter" "is_public_instance" {
name = "Is public instance?"
icon = "/icon/docker.svg"
type = "bool"
icon = "/icon/docker.svg"
default = false
}

data "coder_parameter" "cores" {
name = "CPU Cores"
icon = "/icon/"
type = "number"
icon = "/icon/cpu.svg"
default = 3
}

Expand All @@ -50,7 +55,7 @@ data "coder_parameter" "disk_size" {
}

data "coder_parameter" "cat_lives" {
name = "Cat Live"
name = "Cat Lives"
type = "number"
default = "9"
validation {
Expand Down
7 changes: 5 additions & 2 deletions provider/parameter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ func TestParameter(t *testing.T) {
data "coder_parameter" "region" {
name = "Region"
type = "string"
description = "Some option!"
description = <<-EOT
# Select the machine image
See the [registry](https://container.registry.blah/namespace) for options.
EOT
mutable = true
icon = "/icon/region.svg"
option {
Expand All @@ -46,7 +49,7 @@ data "coder_parameter" "region" {
for key, value := range map[string]interface{}{
"name": "Region",
"type": "string",
"description": "Some option!",
"description": "# Select the machine image\nSee the [registry](https://container.registry.blah/namespace) for options.\n",
"mutable": "true",
"icon": "/icon/region.svg",
"option.0.name": "US Central",
Expand Down