mirror of https://github.com/coder/coder.git
feat: include coder_parameters from external modules (#8195)
This commit is contained in:
parent
0a6e6442b8
commit
b4f14cc6a9
|
@ -2,6 +2,7 @@ package terraform
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/awalterschulze/gographviz"
|
||||
|
@ -723,29 +724,38 @@ func orderedRichParametersResources(tfResourcesRichParameters []*tfjson.StateRes
|
|||
return tfResourcesRichParameters
|
||||
}
|
||||
|
||||
ordered := make([]*tfjson.StateResource, len(orderedNames))
|
||||
for i, name := range orderedNames {
|
||||
var ordered []*tfjson.StateResource
|
||||
for _, name := range orderedNames {
|
||||
for _, resource := range tfResourcesRichParameters {
|
||||
if resource.Name == name {
|
||||
ordered[i] = resource
|
||||
ordered = append(ordered, resource)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// There's an edge case possible for us to have a parameter name that isn't
|
||||
// present in the state, since the ordered names come statically from
|
||||
// parsing the Terraform file. We need to filter out the nil values if there
|
||||
// are any present.
|
||||
if len(tfResourcesRichParameters) != len(orderedNames) {
|
||||
nonNil := make([]*tfjson.StateResource, 0, len(ordered))
|
||||
for _, resource := range ordered {
|
||||
if resource != nil {
|
||||
nonNil = append(nonNil, resource)
|
||||
// Edge case: a parameter is present in an external module (Git repository, static files, etc.),
|
||||
// which can't be easily parsed to check the parameter order.
|
||||
// Those parameters will be prepended to the "ordered" list.
|
||||
var external []*tfjson.StateResource
|
||||
for _, resource := range tfResourcesRichParameters {
|
||||
isExternal := true
|
||||
for _, o := range ordered {
|
||||
if resource.Name == o.Name {
|
||||
isExternal = false
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
ordered = nonNil
|
||||
if isExternal {
|
||||
external = append(external, resource)
|
||||
}
|
||||
}
|
||||
|
||||
if len(external) > 0 {
|
||||
sort.Slice(external, func(i, j int) bool {
|
||||
return external[i].Name < external[j].Name
|
||||
})
|
||||
|
||||
ordered = append(external, ordered...)
|
||||
}
|
||||
return ordered
|
||||
}
|
||||
|
|
|
@ -318,6 +318,30 @@ func TestConvertResources(t *testing.T) {
|
|||
}},
|
||||
}},
|
||||
parameters: []*proto.RichParameter{{
|
||||
Name: "First parameter from child module",
|
||||
Type: "string",
|
||||
Description: "First parameter from child module",
|
||||
Mutable: true,
|
||||
DefaultValue: "abcdef",
|
||||
}, {
|
||||
Name: "Second parameter from child module",
|
||||
Type: "string",
|
||||
Description: "Second parameter from child module",
|
||||
Mutable: true,
|
||||
DefaultValue: "ghijkl",
|
||||
}, {
|
||||
Name: "First parameter from module",
|
||||
Type: "string",
|
||||
Description: "First parameter from module",
|
||||
Mutable: true,
|
||||
DefaultValue: "abcdef",
|
||||
}, {
|
||||
Name: "Second parameter from module",
|
||||
Type: "string",
|
||||
Description: "Second parameter from module",
|
||||
Mutable: true,
|
||||
DefaultValue: "ghijkl",
|
||||
}, {
|
||||
Name: "Example",
|
||||
Type: "string",
|
||||
Options: []*proto.RichParameterOption{{
|
||||
|
|
28
provisioner/terraform/testdata/rich-parameters/external-module/child-external-module/main.tf
vendored
Normal file
28
provisioner/terraform/testdata/rich-parameters/external-module/child-external-module/main.tf
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
terraform {
|
||||
required_providers {
|
||||
coder = {
|
||||
source = "coder/coder"
|
||||
version = "0.7.0"
|
||||
}
|
||||
docker = {
|
||||
source = "kreuzwerker/docker"
|
||||
version = "~> 2.22"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data "coder_parameter" "child_first_parameter_from_module" {
|
||||
name = "First parameter from child module"
|
||||
mutable = true
|
||||
type = "string"
|
||||
description = "First parameter from child module"
|
||||
default = "abcdef"
|
||||
}
|
||||
|
||||
data "coder_parameter" "child_second_parameter_from_module" {
|
||||
name = "Second parameter from child module"
|
||||
mutable = true
|
||||
type = "string"
|
||||
description = "Second parameter from child module"
|
||||
default = "ghijkl"
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
terraform {
|
||||
required_providers {
|
||||
coder = {
|
||||
source = "coder/coder"
|
||||
version = "0.7.0"
|
||||
}
|
||||
docker = {
|
||||
source = "kreuzwerker/docker"
|
||||
version = "~> 2.22"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module "this_is_external_child_module" {
|
||||
source = "./child-external-module"
|
||||
}
|
||||
|
||||
data "coder_parameter" "first_parameter_from_module" {
|
||||
name = "First parameter from module"
|
||||
mutable = true
|
||||
type = "string"
|
||||
description = "First parameter from module"
|
||||
default = "abcdef"
|
||||
}
|
||||
|
||||
data "coder_parameter" "second_parameter_from_module" {
|
||||
name = "Second parameter from module"
|
||||
mutable = true
|
||||
type = "string"
|
||||
description = "Second parameter from module"
|
||||
default = "ghijkl"
|
||||
}
|
|
@ -7,6 +7,10 @@ terraform {
|
|||
}
|
||||
}
|
||||
|
||||
module "this_is_external_module" {
|
||||
source = "./external-module"
|
||||
}
|
||||
|
||||
data "coder_parameter" "sample" {
|
||||
name = "Sample"
|
||||
type = "string"
|
||||
|
|
|
@ -9,6 +9,10 @@ digraph {
|
|||
"[root] data.coder_parameter.number_example_min_max (expand)" [label = "data.coder_parameter.number_example_min_max", shape = "box"]
|
||||
"[root] data.coder_parameter.number_example_min_zero (expand)" [label = "data.coder_parameter.number_example_min_zero", shape = "box"]
|
||||
"[root] data.coder_parameter.sample (expand)" [label = "data.coder_parameter.sample", shape = "box"]
|
||||
"[root] module.this_is_external_module.data.coder_parameter.first_parameter_from_module (expand)" [label = "module.this_is_external_module.data.coder_parameter.first_parameter_from_module", shape = "box"]
|
||||
"[root] module.this_is_external_module.data.coder_parameter.second_parameter_from_module (expand)" [label = "module.this_is_external_module.data.coder_parameter.second_parameter_from_module", shape = "box"]
|
||||
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module (expand)" [label = "module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module", shape = "box"]
|
||||
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module (expand)" [label = "module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module", shape = "box"]
|
||||
"[root] null_resource.dev (expand)" [label = "null_resource.dev", shape = "box"]
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"]" [label = "provider[\"registry.terraform.io/coder/coder\"]", shape = "diamond"]
|
||||
"[root] provider[\"registry.terraform.io/hashicorp/null\"]" [label = "provider[\"registry.terraform.io/hashicorp/null\"]", shape = "diamond"]
|
||||
|
@ -19,6 +23,20 @@ digraph {
|
|||
"[root] data.coder_parameter.number_example_min_max (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] data.coder_parameter.number_example_min_zero (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] data.coder_parameter.sample (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] module.this_is_external_module (close)" -> "[root] module.this_is_external_module.data.coder_parameter.first_parameter_from_module (expand)"
|
||||
"[root] module.this_is_external_module (close)" -> "[root] module.this_is_external_module.data.coder_parameter.second_parameter_from_module (expand)"
|
||||
"[root] module.this_is_external_module (close)" -> "[root] module.this_is_external_module.module.this_is_external_child_module (close)"
|
||||
"[root] module.this_is_external_module.data.coder_parameter.first_parameter_from_module (expand)" -> "[root] module.this_is_external_module (expand)"
|
||||
"[root] module.this_is_external_module.data.coder_parameter.first_parameter_from_module (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] module.this_is_external_module.data.coder_parameter.second_parameter_from_module (expand)" -> "[root] module.this_is_external_module (expand)"
|
||||
"[root] module.this_is_external_module.data.coder_parameter.second_parameter_from_module (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] module.this_is_external_module.module.this_is_external_child_module (close)" -> "[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module (expand)"
|
||||
"[root] module.this_is_external_module.module.this_is_external_child_module (close)" -> "[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module (expand)"
|
||||
"[root] module.this_is_external_module.module.this_is_external_child_module (expand)" -> "[root] module.this_is_external_module (expand)"
|
||||
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module (expand)" -> "[root] module.this_is_external_module.module.this_is_external_child_module (expand)"
|
||||
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module (expand)" -> "[root] module.this_is_external_module.module.this_is_external_child_module (expand)"
|
||||
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] null_resource.dev (expand)" -> "[root] coder_agent.dev (expand)"
|
||||
"[root] null_resource.dev (expand)" -> "[root] provider[\"registry.terraform.io/hashicorp/null\"]"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] coder_agent.dev (expand)"
|
||||
|
@ -28,7 +46,12 @@ digraph {
|
|||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] data.coder_parameter.number_example_min_max (expand)"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] data.coder_parameter.number_example_min_zero (expand)"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] data.coder_parameter.sample (expand)"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] module.this_is_external_module.data.coder_parameter.first_parameter_from_module (expand)"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] module.this_is_external_module.data.coder_parameter.second_parameter_from_module (expand)"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module (expand)"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module (expand)"
|
||||
"[root] provider[\"registry.terraform.io/hashicorp/null\"] (close)" -> "[root] null_resource.dev (expand)"
|
||||
"[root] root" -> "[root] module.this_is_external_module (close)"
|
||||
"[root] root" -> "[root] provider[\"registry.terraform.io/coder/coder\"] (close)"
|
||||
"[root] root" -> "[root] provider[\"registry.terraform.io/hashicorp/null\"] (close)"
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@
|
|||
"description": null,
|
||||
"display_name": null,
|
||||
"icon": null,
|
||||
"id": "62a57280-032d-4528-9705-c663e6971d9d",
|
||||
"id": "5b7b6210-ce5d-4cc4-bbd6-0b329ca1c04f",
|
||||
"legacy_variable": null,
|
||||
"legacy_variable_name": null,
|
||||
"mutable": false,
|
||||
|
@ -170,7 +170,7 @@
|
|||
"description": null,
|
||||
"display_name": null,
|
||||
"icon": null,
|
||||
"id": "37b849a7-1830-4662-b804-e23a6fb0a0dd",
|
||||
"id": "72a5396c-0b3f-427d-b491-2700b025b3a1",
|
||||
"legacy_variable": null,
|
||||
"legacy_variable_name": null,
|
||||
"mutable": false,
|
||||
|
@ -195,7 +195,7 @@
|
|||
"description": null,
|
||||
"display_name": null,
|
||||
"icon": null,
|
||||
"id": "21eddf29-7529-4ea4-9416-c0c6c156c3ad",
|
||||
"id": "63769975-a1e0-42ed-92c1-e003af6b4c54",
|
||||
"legacy_variable": null,
|
||||
"legacy_variable_name": null,
|
||||
"mutable": false,
|
||||
|
@ -232,7 +232,7 @@
|
|||
"description": null,
|
||||
"display_name": null,
|
||||
"icon": null,
|
||||
"id": "826afb7f-80fe-4563-95d3-1f8da1f8c274",
|
||||
"id": "2fce5c05-7018-402b-b653-98d75ad076a2",
|
||||
"legacy_variable": null,
|
||||
"legacy_variable_name": null,
|
||||
"mutable": false,
|
||||
|
@ -269,7 +269,7 @@
|
|||
"description": null,
|
||||
"display_name": null,
|
||||
"icon": null,
|
||||
"id": "9656b8ff-4e7b-4ba0-8377-569b358ff110",
|
||||
"id": "4408d7e5-3353-4434-810c-d8c913f29edd",
|
||||
"legacy_variable": null,
|
||||
"legacy_variable_name": null,
|
||||
"mutable": false,
|
||||
|
@ -306,7 +306,7 @@
|
|||
"description": "blah blah",
|
||||
"display_name": null,
|
||||
"icon": null,
|
||||
"id": "07dd798d-22fe-437d-ae78-2092d01f4b0b",
|
||||
"id": "2b05e465-b243-4ae0-9210-634cf0f65d20",
|
||||
"legacy_variable": null,
|
||||
"legacy_variable_name": null,
|
||||
"mutable": false,
|
||||
|
@ -319,6 +319,120 @@
|
|||
},
|
||||
"sensitive_values": {}
|
||||
}
|
||||
],
|
||||
"child_modules": [
|
||||
{
|
||||
"resources": [
|
||||
{
|
||||
"address": "module.this_is_external_module.data.coder_parameter.first_parameter_from_module",
|
||||
"mode": "data",
|
||||
"type": "coder_parameter",
|
||||
"name": "first_parameter_from_module",
|
||||
"provider_name": "registry.terraform.io/coder/coder",
|
||||
"schema_version": 0,
|
||||
"values": {
|
||||
"default": "abcdef",
|
||||
"description": "First parameter from module",
|
||||
"display_name": null,
|
||||
"icon": null,
|
||||
"id": "fc0491e2-ea2e-4fa7-9b0b-08298fb768f4",
|
||||
"legacy_variable": null,
|
||||
"legacy_variable_name": null,
|
||||
"mutable": true,
|
||||
"name": "First parameter from module",
|
||||
"option": null,
|
||||
"optional": true,
|
||||
"type": "string",
|
||||
"validation": null,
|
||||
"value": "abcdef"
|
||||
},
|
||||
"sensitive_values": {}
|
||||
},
|
||||
{
|
||||
"address": "module.this_is_external_module.data.coder_parameter.second_parameter_from_module",
|
||||
"mode": "data",
|
||||
"type": "coder_parameter",
|
||||
"name": "second_parameter_from_module",
|
||||
"provider_name": "registry.terraform.io/coder/coder",
|
||||
"schema_version": 0,
|
||||
"values": {
|
||||
"default": "ghijkl",
|
||||
"description": "Second parameter from module",
|
||||
"display_name": null,
|
||||
"icon": null,
|
||||
"id": "693fb916-39ed-4798-8724-0e751a2458e4",
|
||||
"legacy_variable": null,
|
||||
"legacy_variable_name": null,
|
||||
"mutable": true,
|
||||
"name": "Second parameter from module",
|
||||
"option": null,
|
||||
"optional": true,
|
||||
"type": "string",
|
||||
"validation": null,
|
||||
"value": "ghijkl"
|
||||
},
|
||||
"sensitive_values": {}
|
||||
}
|
||||
],
|
||||
"address": "module.this_is_external_module",
|
||||
"child_modules": [
|
||||
{
|
||||
"resources": [
|
||||
{
|
||||
"address": "module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module",
|
||||
"mode": "data",
|
||||
"type": "coder_parameter",
|
||||
"name": "child_first_parameter_from_module",
|
||||
"provider_name": "registry.terraform.io/coder/coder",
|
||||
"schema_version": 0,
|
||||
"values": {
|
||||
"default": "abcdef",
|
||||
"description": "First parameter from child module",
|
||||
"display_name": null,
|
||||
"icon": null,
|
||||
"id": "8014f515-a467-4dfe-ac63-8c7eadfc3521",
|
||||
"legacy_variable": null,
|
||||
"legacy_variable_name": null,
|
||||
"mutable": true,
|
||||
"name": "First parameter from child module",
|
||||
"option": null,
|
||||
"optional": true,
|
||||
"type": "string",
|
||||
"validation": null,
|
||||
"value": "abcdef"
|
||||
},
|
||||
"sensitive_values": {}
|
||||
},
|
||||
{
|
||||
"address": "module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module",
|
||||
"mode": "data",
|
||||
"type": "coder_parameter",
|
||||
"name": "child_second_parameter_from_module",
|
||||
"provider_name": "registry.terraform.io/coder/coder",
|
||||
"schema_version": 0,
|
||||
"values": {
|
||||
"default": "ghijkl",
|
||||
"description": "Second parameter from child module",
|
||||
"display_name": null,
|
||||
"icon": null,
|
||||
"id": "e94a306e-c1aa-47f5-833f-19719868d9ce",
|
||||
"legacy_variable": null,
|
||||
"legacy_variable_name": null,
|
||||
"mutable": true,
|
||||
"name": "Second parameter from child module",
|
||||
"option": null,
|
||||
"optional": true,
|
||||
"type": "string",
|
||||
"validation": null,
|
||||
"value": "ghijkl"
|
||||
},
|
||||
"sensitive_values": {}
|
||||
}
|
||||
],
|
||||
"address": "module.this_is_external_module.module.this_is_external_child_module"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -330,6 +444,12 @@
|
|||
"full_name": "registry.terraform.io/coder/coder",
|
||||
"version_constraint": "0.7.0"
|
||||
},
|
||||
"module.this_is_external_module:docker": {
|
||||
"name": "docker",
|
||||
"full_name": "registry.terraform.io/kreuzwerker/docker",
|
||||
"version_constraint": "~> 2.22",
|
||||
"module_address": "module.this_is_external_module"
|
||||
},
|
||||
"null": {
|
||||
"name": "null",
|
||||
"full_name": "registry.terraform.io/hashicorp/null"
|
||||
|
@ -526,7 +646,125 @@
|
|||
},
|
||||
"schema_version": 0
|
||||
}
|
||||
]
|
||||
],
|
||||
"module_calls": {
|
||||
"this_is_external_module": {
|
||||
"source": "./external-module",
|
||||
"module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "data.coder_parameter.first_parameter_from_module",
|
||||
"mode": "data",
|
||||
"type": "coder_parameter",
|
||||
"name": "first_parameter_from_module",
|
||||
"provider_config_key": "coder",
|
||||
"expressions": {
|
||||
"default": {
|
||||
"constant_value": "abcdef"
|
||||
},
|
||||
"description": {
|
||||
"constant_value": "First parameter from module"
|
||||
},
|
||||
"mutable": {
|
||||
"constant_value": true
|
||||
},
|
||||
"name": {
|
||||
"constant_value": "First parameter from module"
|
||||
},
|
||||
"type": {
|
||||
"constant_value": "string"
|
||||
}
|
||||
},
|
||||
"schema_version": 0
|
||||
},
|
||||
{
|
||||
"address": "data.coder_parameter.second_parameter_from_module",
|
||||
"mode": "data",
|
||||
"type": "coder_parameter",
|
||||
"name": "second_parameter_from_module",
|
||||
"provider_config_key": "coder",
|
||||
"expressions": {
|
||||
"default": {
|
||||
"constant_value": "ghijkl"
|
||||
},
|
||||
"description": {
|
||||
"constant_value": "Second parameter from module"
|
||||
},
|
||||
"mutable": {
|
||||
"constant_value": true
|
||||
},
|
||||
"name": {
|
||||
"constant_value": "Second parameter from module"
|
||||
},
|
||||
"type": {
|
||||
"constant_value": "string"
|
||||
}
|
||||
},
|
||||
"schema_version": 0
|
||||
}
|
||||
],
|
||||
"module_calls": {
|
||||
"this_is_external_child_module": {
|
||||
"source": "./child-external-module",
|
||||
"module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "data.coder_parameter.child_first_parameter_from_module",
|
||||
"mode": "data",
|
||||
"type": "coder_parameter",
|
||||
"name": "child_first_parameter_from_module",
|
||||
"provider_config_key": "coder",
|
||||
"expressions": {
|
||||
"default": {
|
||||
"constant_value": "abcdef"
|
||||
},
|
||||
"description": {
|
||||
"constant_value": "First parameter from child module"
|
||||
},
|
||||
"mutable": {
|
||||
"constant_value": true
|
||||
},
|
||||
"name": {
|
||||
"constant_value": "First parameter from child module"
|
||||
},
|
||||
"type": {
|
||||
"constant_value": "string"
|
||||
}
|
||||
},
|
||||
"schema_version": 0
|
||||
},
|
||||
{
|
||||
"address": "data.coder_parameter.child_second_parameter_from_module",
|
||||
"mode": "data",
|
||||
"type": "coder_parameter",
|
||||
"name": "child_second_parameter_from_module",
|
||||
"provider_config_key": "coder",
|
||||
"expressions": {
|
||||
"default": {
|
||||
"constant_value": "ghijkl"
|
||||
},
|
||||
"description": {
|
||||
"constant_value": "Second parameter from child module"
|
||||
},
|
||||
"mutable": {
|
||||
"constant_value": true
|
||||
},
|
||||
"name": {
|
||||
"constant_value": "Second parameter from child module"
|
||||
},
|
||||
"type": {
|
||||
"constant_value": "string"
|
||||
}
|
||||
},
|
||||
"schema_version": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,10 @@ digraph {
|
|||
"[root] data.coder_parameter.number_example_min_max (expand)" [label = "data.coder_parameter.number_example_min_max", shape = "box"]
|
||||
"[root] data.coder_parameter.number_example_min_zero (expand)" [label = "data.coder_parameter.number_example_min_zero", shape = "box"]
|
||||
"[root] data.coder_parameter.sample (expand)" [label = "data.coder_parameter.sample", shape = "box"]
|
||||
"[root] module.this_is_external_module.data.coder_parameter.first_parameter_from_module (expand)" [label = "module.this_is_external_module.data.coder_parameter.first_parameter_from_module", shape = "box"]
|
||||
"[root] module.this_is_external_module.data.coder_parameter.second_parameter_from_module (expand)" [label = "module.this_is_external_module.data.coder_parameter.second_parameter_from_module", shape = "box"]
|
||||
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module (expand)" [label = "module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module", shape = "box"]
|
||||
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module (expand)" [label = "module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module", shape = "box"]
|
||||
"[root] null_resource.dev (expand)" [label = "null_resource.dev", shape = "box"]
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"]" [label = "provider[\"registry.terraform.io/coder/coder\"]", shape = "diamond"]
|
||||
"[root] provider[\"registry.terraform.io/hashicorp/null\"]" [label = "provider[\"registry.terraform.io/hashicorp/null\"]", shape = "diamond"]
|
||||
|
@ -19,6 +23,20 @@ digraph {
|
|||
"[root] data.coder_parameter.number_example_min_max (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] data.coder_parameter.number_example_min_zero (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] data.coder_parameter.sample (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] module.this_is_external_module (close)" -> "[root] module.this_is_external_module.data.coder_parameter.first_parameter_from_module (expand)"
|
||||
"[root] module.this_is_external_module (close)" -> "[root] module.this_is_external_module.data.coder_parameter.second_parameter_from_module (expand)"
|
||||
"[root] module.this_is_external_module (close)" -> "[root] module.this_is_external_module.module.this_is_external_child_module (close)"
|
||||
"[root] module.this_is_external_module.data.coder_parameter.first_parameter_from_module (expand)" -> "[root] module.this_is_external_module (expand)"
|
||||
"[root] module.this_is_external_module.data.coder_parameter.first_parameter_from_module (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] module.this_is_external_module.data.coder_parameter.second_parameter_from_module (expand)" -> "[root] module.this_is_external_module (expand)"
|
||||
"[root] module.this_is_external_module.data.coder_parameter.second_parameter_from_module (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] module.this_is_external_module.module.this_is_external_child_module (close)" -> "[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module (expand)"
|
||||
"[root] module.this_is_external_module.module.this_is_external_child_module (close)" -> "[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module (expand)"
|
||||
"[root] module.this_is_external_module.module.this_is_external_child_module (expand)" -> "[root] module.this_is_external_module (expand)"
|
||||
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module (expand)" -> "[root] module.this_is_external_module.module.this_is_external_child_module (expand)"
|
||||
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module (expand)" -> "[root] module.this_is_external_module.module.this_is_external_child_module (expand)"
|
||||
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] null_resource.dev (expand)" -> "[root] coder_agent.dev (expand)"
|
||||
"[root] null_resource.dev (expand)" -> "[root] provider[\"registry.terraform.io/hashicorp/null\"]"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] coder_agent.dev (expand)"
|
||||
|
@ -28,7 +46,12 @@ digraph {
|
|||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] data.coder_parameter.number_example_min_max (expand)"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] data.coder_parameter.number_example_min_zero (expand)"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] data.coder_parameter.sample (expand)"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] module.this_is_external_module.data.coder_parameter.first_parameter_from_module (expand)"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] module.this_is_external_module.data.coder_parameter.second_parameter_from_module (expand)"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module (expand)"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module (expand)"
|
||||
"[root] provider[\"registry.terraform.io/hashicorp/null\"] (close)" -> "[root] null_resource.dev (expand)"
|
||||
"[root] root" -> "[root] module.this_is_external_module (close)"
|
||||
"[root] root" -> "[root] provider[\"registry.terraform.io/coder/coder\"] (close)"
|
||||
"[root] root" -> "[root] provider[\"registry.terraform.io/hashicorp/null\"] (close)"
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"description": null,
|
||||
"display_name": null,
|
||||
"icon": null,
|
||||
"id": "5860f577-b0e7-4bb6-a4de-9de71a801ba0",
|
||||
"id": "ca194a3d-90c5-4a74-8b9f-c299bc4dad33",
|
||||
"legacy_variable": null,
|
||||
"legacy_variable_name": null,
|
||||
"mutable": false,
|
||||
|
@ -59,7 +59,7 @@
|
|||
"description": null,
|
||||
"display_name": null,
|
||||
"icon": null,
|
||||
"id": "ecac8658-4def-424a-a24e-0a8c906cf8e8",
|
||||
"id": "c1a68d9c-5a5e-4560-9319-053addb068af",
|
||||
"legacy_variable": null,
|
||||
"legacy_variable_name": null,
|
||||
"mutable": false,
|
||||
|
@ -84,7 +84,7 @@
|
|||
"description": null,
|
||||
"display_name": null,
|
||||
"icon": null,
|
||||
"id": "6996b908-2bd9-4043-8821-59aada8fa202",
|
||||
"id": "04492d05-0c3b-4fc1-a8b7-da70499ff7b6",
|
||||
"legacy_variable": null,
|
||||
"legacy_variable_name": null,
|
||||
"mutable": false,
|
||||
|
@ -121,7 +121,7 @@
|
|||
"description": null,
|
||||
"display_name": null,
|
||||
"icon": null,
|
||||
"id": "a368fde8-b9ab-479f-92fb-776f4d5d3e53",
|
||||
"id": "852d5fc8-6d3b-4279-8165-fc6942e361f3",
|
||||
"legacy_variable": null,
|
||||
"legacy_variable_name": null,
|
||||
"mutable": false,
|
||||
|
@ -158,7 +158,7 @@
|
|||
"description": null,
|
||||
"display_name": null,
|
||||
"icon": null,
|
||||
"id": "55ff394f-995a-43d8-b05f-9fbf72f62d18",
|
||||
"id": "b811e107-17b2-44bd-a2aa-58586ba3725f",
|
||||
"legacy_variable": null,
|
||||
"legacy_variable_name": null,
|
||||
"mutable": false,
|
||||
|
@ -195,7 +195,7 @@
|
|||
"description": "blah blah",
|
||||
"display_name": null,
|
||||
"icon": null,
|
||||
"id": "6a1fb6c7-eb4d-443b-9968-1813668794d0",
|
||||
"id": "60d8c0b7-8442-4751-a4b3-0bff927fdbcb",
|
||||
"legacy_variable": null,
|
||||
"legacy_variable_name": null,
|
||||
"mutable": false,
|
||||
|
@ -221,7 +221,7 @@
|
|||
"connection_timeout": 120,
|
||||
"dir": null,
|
||||
"env": null,
|
||||
"id": "9e190fb1-8087-4c64-b99d-1e0bd1067ed8",
|
||||
"id": "4c9d79a7-73e9-4f4f-8efb-464a393d64cd",
|
||||
"init_script": "",
|
||||
"login_before_ready": true,
|
||||
"metadata": [],
|
||||
|
@ -231,7 +231,7 @@
|
|||
"shutdown_script_timeout": 300,
|
||||
"startup_script": null,
|
||||
"startup_script_timeout": 300,
|
||||
"token": "1e09aaa2-0700-4968-abbd-0b8ab8f9fefc",
|
||||
"token": "c31a5e7a-f0f2-4e61-aae8-82ae2456358b",
|
||||
"troubleshooting_url": null
|
||||
},
|
||||
"sensitive_values": {
|
||||
|
@ -246,7 +246,7 @@
|
|||
"provider_name": "registry.terraform.io/hashicorp/null",
|
||||
"schema_version": 0,
|
||||
"values": {
|
||||
"id": "7817924891856217249",
|
||||
"id": "3848665340553657624",
|
||||
"triggers": null
|
||||
},
|
||||
"sensitive_values": {},
|
||||
|
@ -254,6 +254,120 @@
|
|||
"coder_agent.dev"
|
||||
]
|
||||
}
|
||||
],
|
||||
"child_modules": [
|
||||
{
|
||||
"resources": [
|
||||
{
|
||||
"address": "module.this_is_external_module.data.coder_parameter.first_parameter_from_module",
|
||||
"mode": "data",
|
||||
"type": "coder_parameter",
|
||||
"name": "first_parameter_from_module",
|
||||
"provider_name": "registry.terraform.io/coder/coder",
|
||||
"schema_version": 0,
|
||||
"values": {
|
||||
"default": "abcdef",
|
||||
"description": "First parameter from module",
|
||||
"display_name": null,
|
||||
"icon": null,
|
||||
"id": "3f49f2f3-0a0a-49ff-9b7d-e34867f0f515",
|
||||
"legacy_variable": null,
|
||||
"legacy_variable_name": null,
|
||||
"mutable": true,
|
||||
"name": "First parameter from module",
|
||||
"option": null,
|
||||
"optional": true,
|
||||
"type": "string",
|
||||
"validation": null,
|
||||
"value": "abcdef"
|
||||
},
|
||||
"sensitive_values": {}
|
||||
},
|
||||
{
|
||||
"address": "module.this_is_external_module.data.coder_parameter.second_parameter_from_module",
|
||||
"mode": "data",
|
||||
"type": "coder_parameter",
|
||||
"name": "second_parameter_from_module",
|
||||
"provider_name": "registry.terraform.io/coder/coder",
|
||||
"schema_version": 0,
|
||||
"values": {
|
||||
"default": "ghijkl",
|
||||
"description": "Second parameter from module",
|
||||
"display_name": null,
|
||||
"icon": null,
|
||||
"id": "d1a6e987-b032-4107-88fd-f0aee0f3c1d3",
|
||||
"legacy_variable": null,
|
||||
"legacy_variable_name": null,
|
||||
"mutable": true,
|
||||
"name": "Second parameter from module",
|
||||
"option": null,
|
||||
"optional": true,
|
||||
"type": "string",
|
||||
"validation": null,
|
||||
"value": "ghijkl"
|
||||
},
|
||||
"sensitive_values": {}
|
||||
}
|
||||
],
|
||||
"address": "module.this_is_external_module",
|
||||
"child_modules": [
|
||||
{
|
||||
"resources": [
|
||||
{
|
||||
"address": "module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module",
|
||||
"mode": "data",
|
||||
"type": "coder_parameter",
|
||||
"name": "child_first_parameter_from_module",
|
||||
"provider_name": "registry.terraform.io/coder/coder",
|
||||
"schema_version": 0,
|
||||
"values": {
|
||||
"default": "abcdef",
|
||||
"description": "First parameter from child module",
|
||||
"display_name": null,
|
||||
"icon": null,
|
||||
"id": "79d7a875-18e2-4fcd-ac9a-ad6de9f00c20",
|
||||
"legacy_variable": null,
|
||||
"legacy_variable_name": null,
|
||||
"mutable": true,
|
||||
"name": "First parameter from child module",
|
||||
"option": null,
|
||||
"optional": true,
|
||||
"type": "string",
|
||||
"validation": null,
|
||||
"value": "abcdef"
|
||||
},
|
||||
"sensitive_values": {}
|
||||
},
|
||||
{
|
||||
"address": "module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module",
|
||||
"mode": "data",
|
||||
"type": "coder_parameter",
|
||||
"name": "child_second_parameter_from_module",
|
||||
"provider_name": "registry.terraform.io/coder/coder",
|
||||
"schema_version": 0,
|
||||
"values": {
|
||||
"default": "ghijkl",
|
||||
"description": "Second parameter from child module",
|
||||
"display_name": null,
|
||||
"icon": null,
|
||||
"id": "b71db658-46c0-4dca-8530-1d4f464b7ad6",
|
||||
"legacy_variable": null,
|
||||
"legacy_variable_name": null,
|
||||
"mutable": true,
|
||||
"name": "Second parameter from child module",
|
||||
"option": null,
|
||||
"optional": true,
|
||||
"type": "string",
|
||||
"validation": null,
|
||||
"value": "ghijkl"
|
||||
},
|
||||
"sensitive_values": {}
|
||||
}
|
||||
],
|
||||
"address": "module.this_is_external_module.module.this_is_external_child_module"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue