Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mtojek merged 3 commits intocoder:mainfrommtojek:5931-description-markdown
Feb 7, 2023
Merged
Show file tree
Hide file tree
Changes fromall 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 deletionsexamples/resources/coder_parameter/resource.tf
View file
Open in desktop
Original file line numberDiff line numberDiff 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 = "CatLive"
name = "CatLives"
type = "number"
default = "9"
validation {
Expand Down
7 changes: 5 additions & 2 deletionsprovider/parameter_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff 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

[8]ページ先頭

©2009-2025 Movatter.jp