mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
refactor: deprecate login_before_ready in favor of startup_script_behavior (#7837)
Fixes #7758
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
"github.com/coder/terraform-provider-coder/provider"
|
||||
|
||||
"github.com/coder/coder/codersdk"
|
||||
"github.com/coder/coder/provisioner"
|
||||
"github.com/coder/coder/provisionersdk/proto"
|
||||
)
|
||||
@@ -24,22 +25,24 @@ type agentMetadata struct {
|
||||
|
||||
// A mapping of attributes on the "coder_agent" resource.
|
||||
type agentAttributes struct {
|
||||
Auth string `mapstructure:"auth"`
|
||||
OperatingSystem string `mapstructure:"os"`
|
||||
Architecture string `mapstructure:"arch"`
|
||||
Directory string `mapstructure:"dir"`
|
||||
ID string `mapstructure:"id"`
|
||||
Token string `mapstructure:"token"`
|
||||
Env map[string]string `mapstructure:"env"`
|
||||
StartupScript string `mapstructure:"startup_script"`
|
||||
ConnectionTimeoutSeconds int32 `mapstructure:"connection_timeout"`
|
||||
TroubleshootingURL string `mapstructure:"troubleshooting_url"`
|
||||
MOTDFile string `mapstructure:"motd_file"`
|
||||
LoginBeforeReady bool `mapstructure:"login_before_ready"`
|
||||
StartupScriptTimeoutSeconds int32 `mapstructure:"startup_script_timeout"`
|
||||
ShutdownScript string `mapstructure:"shutdown_script"`
|
||||
ShutdownScriptTimeoutSeconds int32 `mapstructure:"shutdown_script_timeout"`
|
||||
Metadata []agentMetadata `mapstructure:"metadata"`
|
||||
Auth string `mapstructure:"auth"`
|
||||
OperatingSystem string `mapstructure:"os"`
|
||||
Architecture string `mapstructure:"arch"`
|
||||
Directory string `mapstructure:"dir"`
|
||||
ID string `mapstructure:"id"`
|
||||
Token string `mapstructure:"token"`
|
||||
Env map[string]string `mapstructure:"env"`
|
||||
StartupScript string `mapstructure:"startup_script"`
|
||||
ConnectionTimeoutSeconds int32 `mapstructure:"connection_timeout"`
|
||||
TroubleshootingURL string `mapstructure:"troubleshooting_url"`
|
||||
MOTDFile string `mapstructure:"motd_file"`
|
||||
// Deprecated, but remains here for backwards compatibility.
|
||||
LoginBeforeReady bool `mapstructure:"login_before_ready"`
|
||||
StartupScriptBehavior string `mapstructure:"startup_script_behavior"`
|
||||
StartupScriptTimeoutSeconds int32 `mapstructure:"startup_script_timeout"`
|
||||
ShutdownScript string `mapstructure:"shutdown_script"`
|
||||
ShutdownScriptTimeoutSeconds int32 `mapstructure:"shutdown_script_timeout"`
|
||||
Metadata []agentMetadata `mapstructure:"metadata"`
|
||||
}
|
||||
|
||||
// A mapping of attributes on the "coder_app" resource.
|
||||
@@ -151,10 +154,18 @@ func ConvertState(modules []*tfjson.StateModule, rawGraph string, rawParameterNa
|
||||
}
|
||||
agentNames[tfResource.Name] = struct{}{}
|
||||
|
||||
// Handling for provider pre-v0.6.10.
|
||||
loginBeforeReady := true
|
||||
if _, ok := tfResource.AttributeValues["login_before_ready"]; ok {
|
||||
loginBeforeReady = attrs.LoginBeforeReady
|
||||
// Handling for deprecated attributes. login_before_ready was replaced
|
||||
// by startup_script_behavior, but we still need to support it for
|
||||
// backwards compatibility.
|
||||
startupScriptBehavior := string(codersdk.WorkspaceAgentStartupScriptBehaviorNonBlocking)
|
||||
if attrs.StartupScriptBehavior != "" {
|
||||
startupScriptBehavior = attrs.StartupScriptBehavior
|
||||
} else {
|
||||
// Handling for provider pre-v0.6.10 (because login_before_ready
|
||||
// defaulted to true, we must check for its presence).
|
||||
if _, ok := tfResource.AttributeValues["login_before_ready"]; ok && !attrs.LoginBeforeReady {
|
||||
startupScriptBehavior = string(codersdk.WorkspaceAgentStartupScriptBehaviorBlocking)
|
||||
}
|
||||
}
|
||||
|
||||
var metadata []*proto.Agent_Metadata
|
||||
@@ -179,7 +190,7 @@ func ConvertState(modules []*tfjson.StateModule, rawGraph string, rawParameterNa
|
||||
ConnectionTimeoutSeconds: attrs.ConnectionTimeoutSeconds,
|
||||
TroubleshootingUrl: attrs.TroubleshootingURL,
|
||||
MotdFile: attrs.MOTDFile,
|
||||
LoginBeforeReady: loginBeforeReady,
|
||||
StartupScriptBehavior: startupScriptBehavior,
|
||||
StartupScriptTimeoutSeconds: attrs.StartupScriptTimeoutSeconds,
|
||||
ShutdownScript: attrs.ShutdownScript,
|
||||
ShutdownScriptTimeoutSeconds: attrs.ShutdownScriptTimeoutSeconds,
|
||||
|
||||
@@ -43,7 +43,7 @@ func TestConvertResources(t *testing.T) {
|
||||
OperatingSystem: "linux",
|
||||
Architecture: "amd64",
|
||||
Auth: &proto.Agent_Token{},
|
||||
LoginBeforeReady: true,
|
||||
StartupScriptBehavior: "non-blocking",
|
||||
ConnectionTimeoutSeconds: 120,
|
||||
}},
|
||||
}},
|
||||
@@ -60,7 +60,7 @@ func TestConvertResources(t *testing.T) {
|
||||
OperatingSystem: "linux",
|
||||
Architecture: "amd64",
|
||||
Auth: &proto.Agent_Token{},
|
||||
LoginBeforeReady: true,
|
||||
StartupScriptBehavior: "non-blocking",
|
||||
ConnectionTimeoutSeconds: 120,
|
||||
}},
|
||||
}, {
|
||||
@@ -78,7 +78,7 @@ func TestConvertResources(t *testing.T) {
|
||||
OperatingSystem: "linux",
|
||||
Architecture: "amd64",
|
||||
Auth: &proto.Agent_InstanceId{},
|
||||
LoginBeforeReady: true,
|
||||
StartupScriptBehavior: "non-blocking",
|
||||
ConnectionTimeoutSeconds: 120,
|
||||
}},
|
||||
}},
|
||||
@@ -94,7 +94,7 @@ func TestConvertResources(t *testing.T) {
|
||||
OperatingSystem: "linux",
|
||||
Architecture: "amd64",
|
||||
Auth: &proto.Agent_Token{},
|
||||
LoginBeforeReady: true,
|
||||
StartupScriptBehavior: "non-blocking",
|
||||
ConnectionTimeoutSeconds: 120,
|
||||
}},
|
||||
}},
|
||||
@@ -111,7 +111,7 @@ func TestConvertResources(t *testing.T) {
|
||||
Architecture: "amd64",
|
||||
Auth: &proto.Agent_Token{},
|
||||
ConnectionTimeoutSeconds: 120,
|
||||
LoginBeforeReady: true,
|
||||
StartupScriptBehavior: "non-blocking",
|
||||
StartupScriptTimeoutSeconds: 300,
|
||||
ShutdownScriptTimeoutSeconds: 300,
|
||||
}, {
|
||||
@@ -121,7 +121,7 @@ func TestConvertResources(t *testing.T) {
|
||||
Auth: &proto.Agent_Token{},
|
||||
ConnectionTimeoutSeconds: 1,
|
||||
MotdFile: "/etc/motd",
|
||||
LoginBeforeReady: true,
|
||||
StartupScriptBehavior: "non-blocking",
|
||||
StartupScriptTimeoutSeconds: 30,
|
||||
ShutdownScript: "echo bye bye",
|
||||
ShutdownScriptTimeoutSeconds: 30,
|
||||
@@ -132,7 +132,16 @@ func TestConvertResources(t *testing.T) {
|
||||
Auth: &proto.Agent_Token{},
|
||||
ConnectionTimeoutSeconds: 120,
|
||||
TroubleshootingUrl: "https://coder.com/troubleshoot",
|
||||
LoginBeforeReady: false,
|
||||
StartupScriptBehavior: "blocking",
|
||||
StartupScriptTimeoutSeconds: 300,
|
||||
ShutdownScriptTimeoutSeconds: 300,
|
||||
}, {
|
||||
Name: "dev4",
|
||||
OperatingSystem: "linux",
|
||||
Architecture: "amd64",
|
||||
Auth: &proto.Agent_Token{},
|
||||
ConnectionTimeoutSeconds: 120,
|
||||
StartupScriptBehavior: "blocking",
|
||||
StartupScriptTimeoutSeconds: 300,
|
||||
ShutdownScriptTimeoutSeconds: 300,
|
||||
}},
|
||||
@@ -171,7 +180,7 @@ func TestConvertResources(t *testing.T) {
|
||||
},
|
||||
},
|
||||
Auth: &proto.Agent_Token{},
|
||||
LoginBeforeReady: true,
|
||||
StartupScriptBehavior: "non-blocking",
|
||||
ConnectionTimeoutSeconds: 120,
|
||||
}},
|
||||
}},
|
||||
@@ -195,7 +204,7 @@ func TestConvertResources(t *testing.T) {
|
||||
},
|
||||
},
|
||||
Auth: &proto.Agent_Token{},
|
||||
LoginBeforeReady: true,
|
||||
StartupScriptBehavior: "non-blocking",
|
||||
ConnectionTimeoutSeconds: 120,
|
||||
}},
|
||||
}},
|
||||
@@ -235,7 +244,7 @@ func TestConvertResources(t *testing.T) {
|
||||
}},
|
||||
ShutdownScriptTimeoutSeconds: 300,
|
||||
StartupScriptTimeoutSeconds: 300,
|
||||
LoginBeforeReady: true,
|
||||
StartupScriptBehavior: "non-blocking",
|
||||
ConnectionTimeoutSeconds: 120,
|
||||
}},
|
||||
}},
|
||||
@@ -286,7 +295,7 @@ func TestConvertResources(t *testing.T) {
|
||||
},
|
||||
},
|
||||
Auth: &proto.Agent_Token{},
|
||||
LoginBeforeReady: true,
|
||||
StartupScriptBehavior: "non-blocking",
|
||||
ConnectionTimeoutSeconds: 120,
|
||||
}},
|
||||
},
|
||||
@@ -303,7 +312,7 @@ func TestConvertResources(t *testing.T) {
|
||||
StartupScriptTimeoutSeconds: 300,
|
||||
Architecture: "arm64",
|
||||
Auth: &proto.Agent_Token{},
|
||||
LoginBeforeReady: true,
|
||||
StartupScriptBehavior: "non-blocking",
|
||||
ConnectionTimeoutSeconds: 120,
|
||||
}},
|
||||
}},
|
||||
@@ -360,7 +369,7 @@ func TestConvertResources(t *testing.T) {
|
||||
StartupScriptTimeoutSeconds: 300,
|
||||
Architecture: "arm64",
|
||||
Auth: &proto.Agent_Token{},
|
||||
LoginBeforeReady: true,
|
||||
StartupScriptBehavior: "non-blocking",
|
||||
ConnectionTimeoutSeconds: 120,
|
||||
}},
|
||||
}},
|
||||
@@ -411,7 +420,7 @@ func TestConvertResources(t *testing.T) {
|
||||
OperatingSystem: "linux",
|
||||
Architecture: "amd64",
|
||||
Auth: &proto.Agent_Token{},
|
||||
LoginBeforeReady: true,
|
||||
StartupScriptBehavior: "non-blocking",
|
||||
ConnectionTimeoutSeconds: 120,
|
||||
StartupScriptTimeoutSeconds: 300,
|
||||
ShutdownScriptTimeoutSeconds: 300,
|
||||
|
||||
@@ -2,7 +2,7 @@ terraform {
|
||||
required_providers {
|
||||
coder = {
|
||||
source = "coder/coder"
|
||||
version = "0.6.12"
|
||||
version = "0.8.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,22 +18,30 @@ resource "coder_agent" "dev2" {
|
||||
connection_timeout = 1
|
||||
motd_file = "/etc/motd"
|
||||
startup_script_timeout = 30
|
||||
login_before_ready = true
|
||||
startup_script_behavior = "non-blocking"
|
||||
shutdown_script = "echo bye bye"
|
||||
shutdown_script_timeout = 30
|
||||
}
|
||||
|
||||
resource "coder_agent" "dev3" {
|
||||
os = "windows"
|
||||
arch = "arm64"
|
||||
troubleshooting_url = "https://coder.com/troubleshoot"
|
||||
login_before_ready = false
|
||||
os = "windows"
|
||||
arch = "arm64"
|
||||
troubleshooting_url = "https://coder.com/troubleshoot"
|
||||
startup_script_behavior = "blocking"
|
||||
}
|
||||
|
||||
resource "coder_agent" "dev4" {
|
||||
os = "linux"
|
||||
arch = "amd64"
|
||||
# Test deprecated login_before_ready=false => startup_script_behavior=blocking.
|
||||
login_before_ready = false
|
||||
}
|
||||
|
||||
resource "null_resource" "dev" {
|
||||
depends_on = [
|
||||
coder_agent.dev1,
|
||||
coder_agent.dev2,
|
||||
coder_agent.dev3
|
||||
coder_agent.dev3,
|
||||
coder_agent.dev4
|
||||
]
|
||||
}
|
||||
|
||||
+4
@@ -5,19 +5,23 @@ digraph {
|
||||
"[root] coder_agent.dev1 (expand)" [label = "coder_agent.dev1", shape = "box"]
|
||||
"[root] coder_agent.dev2 (expand)" [label = "coder_agent.dev2", shape = "box"]
|
||||
"[root] coder_agent.dev3 (expand)" [label = "coder_agent.dev3", shape = "box"]
|
||||
"[root] coder_agent.dev4 (expand)" [label = "coder_agent.dev4", 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"]
|
||||
"[root] coder_agent.dev1 (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] coder_agent.dev2 (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] coder_agent.dev3 (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] coder_agent.dev4 (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] null_resource.dev (expand)" -> "[root] coder_agent.dev1 (expand)"
|
||||
"[root] null_resource.dev (expand)" -> "[root] coder_agent.dev2 (expand)"
|
||||
"[root] null_resource.dev (expand)" -> "[root] coder_agent.dev3 (expand)"
|
||||
"[root] null_resource.dev (expand)" -> "[root] coder_agent.dev4 (expand)"
|
||||
"[root] null_resource.dev (expand)" -> "[root] provider[\"registry.terraform.io/hashicorp/null\"]"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] coder_agent.dev1 (expand)"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] coder_agent.dev2 (expand)"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] coder_agent.dev3 (expand)"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] coder_agent.dev4 (expand)"
|
||||
"[root] provider[\"registry.terraform.io/hashicorp/null\"] (close)" -> "[root] null_resource.dev (expand)"
|
||||
"[root] root" -> "[root] provider[\"registry.terraform.io/coder/coder\"] (close)"
|
||||
"[root] root" -> "[root] provider[\"registry.terraform.io/hashicorp/null\"] (close)"
|
||||
|
||||
+127
-14
@@ -18,15 +18,19 @@
|
||||
"dir": null,
|
||||
"env": null,
|
||||
"login_before_ready": true,
|
||||
"metadata": [],
|
||||
"motd_file": null,
|
||||
"os": "linux",
|
||||
"shutdown_script": null,
|
||||
"shutdown_script_timeout": 300,
|
||||
"startup_script": null,
|
||||
"startup_script_behavior": null,
|
||||
"startup_script_timeout": 300,
|
||||
"troubleshooting_url": null
|
||||
},
|
||||
"sensitive_values": {}
|
||||
"sensitive_values": {
|
||||
"metadata": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"address": "coder_agent.dev2",
|
||||
@@ -42,15 +46,19 @@
|
||||
"dir": null,
|
||||
"env": null,
|
||||
"login_before_ready": true,
|
||||
"metadata": [],
|
||||
"motd_file": "/etc/motd",
|
||||
"os": "darwin",
|
||||
"shutdown_script": "echo bye bye",
|
||||
"shutdown_script_timeout": 30,
|
||||
"startup_script": null,
|
||||
"startup_script_behavior": "non-blocking",
|
||||
"startup_script_timeout": 30,
|
||||
"troubleshooting_url": null
|
||||
},
|
||||
"sensitive_values": {}
|
||||
"sensitive_values": {
|
||||
"metadata": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"address": "coder_agent.dev3",
|
||||
@@ -65,16 +73,48 @@
|
||||
"connection_timeout": 120,
|
||||
"dir": null,
|
||||
"env": null,
|
||||
"login_before_ready": false,
|
||||
"login_before_ready": true,
|
||||
"metadata": [],
|
||||
"motd_file": null,
|
||||
"os": "windows",
|
||||
"shutdown_script": null,
|
||||
"shutdown_script_timeout": 300,
|
||||
"startup_script": null,
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout": 300,
|
||||
"troubleshooting_url": "https://coder.com/troubleshoot"
|
||||
},
|
||||
"sensitive_values": {}
|
||||
"sensitive_values": {
|
||||
"metadata": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"address": "coder_agent.dev4",
|
||||
"mode": "managed",
|
||||
"type": "coder_agent",
|
||||
"name": "dev4",
|
||||
"provider_name": "registry.terraform.io/coder/coder",
|
||||
"schema_version": 0,
|
||||
"values": {
|
||||
"arch": "amd64",
|
||||
"auth": "token",
|
||||
"connection_timeout": 120,
|
||||
"dir": null,
|
||||
"env": null,
|
||||
"login_before_ready": false,
|
||||
"metadata": [],
|
||||
"motd_file": null,
|
||||
"os": "linux",
|
||||
"shutdown_script": null,
|
||||
"shutdown_script_timeout": 300,
|
||||
"startup_script": null,
|
||||
"startup_script_behavior": null,
|
||||
"startup_script_timeout": 300,
|
||||
"troubleshooting_url": null
|
||||
},
|
||||
"sensitive_values": {
|
||||
"metadata": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"address": "null_resource.dev",
|
||||
@@ -110,21 +150,25 @@
|
||||
"dir": null,
|
||||
"env": null,
|
||||
"login_before_ready": true,
|
||||
"metadata": [],
|
||||
"motd_file": null,
|
||||
"os": "linux",
|
||||
"shutdown_script": null,
|
||||
"shutdown_script_timeout": 300,
|
||||
"startup_script": null,
|
||||
"startup_script_behavior": null,
|
||||
"startup_script_timeout": 300,
|
||||
"troubleshooting_url": null
|
||||
},
|
||||
"after_unknown": {
|
||||
"id": true,
|
||||
"init_script": true,
|
||||
"metadata": [],
|
||||
"token": true
|
||||
},
|
||||
"before_sensitive": false,
|
||||
"after_sensitive": {
|
||||
"metadata": [],
|
||||
"token": true
|
||||
}
|
||||
}
|
||||
@@ -147,21 +191,25 @@
|
||||
"dir": null,
|
||||
"env": null,
|
||||
"login_before_ready": true,
|
||||
"metadata": [],
|
||||
"motd_file": "/etc/motd",
|
||||
"os": "darwin",
|
||||
"shutdown_script": "echo bye bye",
|
||||
"shutdown_script_timeout": 30,
|
||||
"startup_script": null,
|
||||
"startup_script_behavior": "non-blocking",
|
||||
"startup_script_timeout": 30,
|
||||
"troubleshooting_url": null
|
||||
},
|
||||
"after_unknown": {
|
||||
"id": true,
|
||||
"init_script": true,
|
||||
"metadata": [],
|
||||
"token": true
|
||||
},
|
||||
"before_sensitive": false,
|
||||
"after_sensitive": {
|
||||
"metadata": [],
|
||||
"token": true
|
||||
}
|
||||
}
|
||||
@@ -183,22 +231,67 @@
|
||||
"connection_timeout": 120,
|
||||
"dir": null,
|
||||
"env": null,
|
||||
"login_before_ready": false,
|
||||
"login_before_ready": true,
|
||||
"metadata": [],
|
||||
"motd_file": null,
|
||||
"os": "windows",
|
||||
"shutdown_script": null,
|
||||
"shutdown_script_timeout": 300,
|
||||
"startup_script": null,
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout": 300,
|
||||
"troubleshooting_url": "https://coder.com/troubleshoot"
|
||||
},
|
||||
"after_unknown": {
|
||||
"id": true,
|
||||
"init_script": true,
|
||||
"metadata": [],
|
||||
"token": true
|
||||
},
|
||||
"before_sensitive": false,
|
||||
"after_sensitive": {
|
||||
"metadata": [],
|
||||
"token": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"address": "coder_agent.dev4",
|
||||
"mode": "managed",
|
||||
"type": "coder_agent",
|
||||
"name": "dev4",
|
||||
"provider_name": "registry.terraform.io/coder/coder",
|
||||
"change": {
|
||||
"actions": [
|
||||
"create"
|
||||
],
|
||||
"before": null,
|
||||
"after": {
|
||||
"arch": "amd64",
|
||||
"auth": "token",
|
||||
"connection_timeout": 120,
|
||||
"dir": null,
|
||||
"env": null,
|
||||
"login_before_ready": false,
|
||||
"metadata": [],
|
||||
"motd_file": null,
|
||||
"os": "linux",
|
||||
"shutdown_script": null,
|
||||
"shutdown_script_timeout": 300,
|
||||
"startup_script": null,
|
||||
"startup_script_behavior": null,
|
||||
"startup_script_timeout": 300,
|
||||
"troubleshooting_url": null
|
||||
},
|
||||
"after_unknown": {
|
||||
"id": true,
|
||||
"init_script": true,
|
||||
"metadata": [],
|
||||
"token": true
|
||||
},
|
||||
"before_sensitive": false,
|
||||
"after_sensitive": {
|
||||
"metadata": [],
|
||||
"token": true
|
||||
}
|
||||
}
|
||||
@@ -230,7 +323,7 @@
|
||||
"coder": {
|
||||
"name": "coder",
|
||||
"full_name": "registry.terraform.io/coder/coder",
|
||||
"version_constraint": "0.6.12"
|
||||
"version_constraint": "0.8.3"
|
||||
},
|
||||
"null": {
|
||||
"name": "null",
|
||||
@@ -268,9 +361,6 @@
|
||||
"connection_timeout": {
|
||||
"constant_value": 1
|
||||
},
|
||||
"login_before_ready": {
|
||||
"constant_value": true
|
||||
},
|
||||
"motd_file": {
|
||||
"constant_value": "/etc/motd"
|
||||
},
|
||||
@@ -283,6 +373,9 @@
|
||||
"shutdown_script_timeout": {
|
||||
"constant_value": 30
|
||||
},
|
||||
"startup_script_behavior": {
|
||||
"constant_value": "non-blocking"
|
||||
},
|
||||
"startup_script_timeout": {
|
||||
"constant_value": 30
|
||||
}
|
||||
@@ -299,14 +392,33 @@
|
||||
"arch": {
|
||||
"constant_value": "arm64"
|
||||
},
|
||||
"os": {
|
||||
"constant_value": "windows"
|
||||
},
|
||||
"startup_script_behavior": {
|
||||
"constant_value": "blocking"
|
||||
},
|
||||
"troubleshooting_url": {
|
||||
"constant_value": "https://coder.com/troubleshoot"
|
||||
}
|
||||
},
|
||||
"schema_version": 0
|
||||
},
|
||||
{
|
||||
"address": "coder_agent.dev4",
|
||||
"mode": "managed",
|
||||
"type": "coder_agent",
|
||||
"name": "dev4",
|
||||
"provider_config_key": "coder",
|
||||
"expressions": {
|
||||
"arch": {
|
||||
"constant_value": "amd64"
|
||||
},
|
||||
"login_before_ready": {
|
||||
"constant_value": false
|
||||
},
|
||||
"os": {
|
||||
"constant_value": "windows"
|
||||
},
|
||||
"troubleshooting_url": {
|
||||
"constant_value": "https://coder.com/troubleshoot"
|
||||
"constant_value": "linux"
|
||||
}
|
||||
},
|
||||
"schema_version": 0
|
||||
@@ -321,7 +433,8 @@
|
||||
"depends_on": [
|
||||
"coder_agent.dev1",
|
||||
"coder_agent.dev2",
|
||||
"coder_agent.dev3"
|
||||
"coder_agent.dev3",
|
||||
"coder_agent.dev4"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
+4
@@ -5,19 +5,23 @@ digraph {
|
||||
"[root] coder_agent.dev1 (expand)" [label = "coder_agent.dev1", shape = "box"]
|
||||
"[root] coder_agent.dev2 (expand)" [label = "coder_agent.dev2", shape = "box"]
|
||||
"[root] coder_agent.dev3 (expand)" [label = "coder_agent.dev3", shape = "box"]
|
||||
"[root] coder_agent.dev4 (expand)" [label = "coder_agent.dev4", 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"]
|
||||
"[root] coder_agent.dev1 (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] coder_agent.dev2 (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] coder_agent.dev3 (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] coder_agent.dev4 (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
|
||||
"[root] null_resource.dev (expand)" -> "[root] coder_agent.dev1 (expand)"
|
||||
"[root] null_resource.dev (expand)" -> "[root] coder_agent.dev2 (expand)"
|
||||
"[root] null_resource.dev (expand)" -> "[root] coder_agent.dev3 (expand)"
|
||||
"[root] null_resource.dev (expand)" -> "[root] coder_agent.dev4 (expand)"
|
||||
"[root] null_resource.dev (expand)" -> "[root] provider[\"registry.terraform.io/hashicorp/null\"]"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] coder_agent.dev1 (expand)"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] coder_agent.dev2 (expand)"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] coder_agent.dev3 (expand)"
|
||||
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] coder_agent.dev4 (expand)"
|
||||
"[root] provider[\"registry.terraform.io/hashicorp/null\"] (close)" -> "[root] null_resource.dev (expand)"
|
||||
"[root] root" -> "[root] provider[\"registry.terraform.io/coder/coder\"] (close)"
|
||||
"[root] root" -> "[root] provider[\"registry.terraform.io/hashicorp/null\"] (close)"
|
||||
|
||||
+56
-12
@@ -17,19 +17,23 @@
|
||||
"connection_timeout": 120,
|
||||
"dir": null,
|
||||
"env": null,
|
||||
"id": "7fd8bb3f-704e-4d85-aaaf-1928a9a4df83",
|
||||
"id": "ff8b851f-127f-452f-9180-4e619b0093f2",
|
||||
"init_script": "",
|
||||
"login_before_ready": true,
|
||||
"metadata": [],
|
||||
"motd_file": null,
|
||||
"os": "linux",
|
||||
"shutdown_script": null,
|
||||
"shutdown_script_timeout": 300,
|
||||
"startup_script": null,
|
||||
"startup_script_behavior": null,
|
||||
"startup_script_timeout": 300,
|
||||
"token": "ebdd904c-a277-49ec-97cc-e29c7326b475",
|
||||
"token": "36dbfd5d-adf5-4e3e-9d92-190be56773fa",
|
||||
"troubleshooting_url": null
|
||||
},
|
||||
"sensitive_values": {}
|
||||
"sensitive_values": {
|
||||
"metadata": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"address": "coder_agent.dev2",
|
||||
@@ -44,19 +48,23 @@
|
||||
"connection_timeout": 1,
|
||||
"dir": null,
|
||||
"env": null,
|
||||
"id": "cd35b6c2-3f81-4857-ac8c-9cc0d1d0f0ee",
|
||||
"id": "a4951d98-2e07-4144-8942-a6f7584a6da0",
|
||||
"init_script": "",
|
||||
"login_before_ready": true,
|
||||
"metadata": [],
|
||||
"motd_file": "/etc/motd",
|
||||
"os": "darwin",
|
||||
"shutdown_script": "echo bye bye",
|
||||
"shutdown_script_timeout": 30,
|
||||
"startup_script": null,
|
||||
"startup_script_behavior": "non-blocking",
|
||||
"startup_script_timeout": 30,
|
||||
"token": "bbfc3bb1-31c8-42a2-bc5a-3f4ee95eea7b",
|
||||
"token": "f101a336-401d-4744-848f-437fe635f832",
|
||||
"troubleshooting_url": null
|
||||
},
|
||||
"sensitive_values": {}
|
||||
"sensitive_values": {
|
||||
"metadata": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"address": "coder_agent.dev3",
|
||||
@@ -71,19 +79,54 @@
|
||||
"connection_timeout": 120,
|
||||
"dir": null,
|
||||
"env": null,
|
||||
"id": "7407c159-30e7-4c7c-8187-3bf0f6805515",
|
||||
"id": "a3e1eaae-4bfd-4240-bc0a-0e940c3dd861",
|
||||
"init_script": "",
|
||||
"login_before_ready": false,
|
||||
"login_before_ready": true,
|
||||
"metadata": [],
|
||||
"motd_file": null,
|
||||
"os": "windows",
|
||||
"shutdown_script": null,
|
||||
"shutdown_script_timeout": 300,
|
||||
"startup_script": null,
|
||||
"startup_script_behavior": "blocking",
|
||||
"startup_script_timeout": 300,
|
||||
"token": "080070d7-cb08-4634-aa05-7ee07a193441",
|
||||
"token": "1551c374-aae3-4be8-8fa2-6082921b837f",
|
||||
"troubleshooting_url": "https://coder.com/troubleshoot"
|
||||
},
|
||||
"sensitive_values": {}
|
||||
"sensitive_values": {
|
||||
"metadata": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"address": "coder_agent.dev4",
|
||||
"mode": "managed",
|
||||
"type": "coder_agent",
|
||||
"name": "dev4",
|
||||
"provider_name": "registry.terraform.io/coder/coder",
|
||||
"schema_version": 0,
|
||||
"values": {
|
||||
"arch": "amd64",
|
||||
"auth": "token",
|
||||
"connection_timeout": 120,
|
||||
"dir": null,
|
||||
"env": null,
|
||||
"id": "fb94747b-e187-4c69-9c95-fb09c0832664",
|
||||
"init_script": "",
|
||||
"login_before_ready": false,
|
||||
"metadata": [],
|
||||
"motd_file": null,
|
||||
"os": "linux",
|
||||
"shutdown_script": null,
|
||||
"shutdown_script_timeout": 300,
|
||||
"startup_script": null,
|
||||
"startup_script_behavior": null,
|
||||
"startup_script_timeout": 300,
|
||||
"token": "714bf65d-92ff-4e7c-adbe-211b15a21085",
|
||||
"troubleshooting_url": null
|
||||
},
|
||||
"sensitive_values": {
|
||||
"metadata": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"address": "null_resource.dev",
|
||||
@@ -93,14 +136,15 @@
|
||||
"provider_name": "registry.terraform.io/hashicorp/null",
|
||||
"schema_version": 0,
|
||||
"values": {
|
||||
"id": "235602507221507275",
|
||||
"id": "3687348305461113369",
|
||||
"triggers": null
|
||||
},
|
||||
"sensitive_values": {},
|
||||
"depends_on": [
|
||||
"coder_agent.dev1",
|
||||
"coder_agent.dev2",
|
||||
"coder_agent.dev3"
|
||||
"coder_agent.dev3",
|
||||
"coder_agent.dev4"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user