File tree 1 file changed +19
-2
lines changed 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -39,9 +39,14 @@ variable "coder_parameter_order" {
39
39
default = null
40
40
}
41
41
42
- data "coder_parameter" "dotfiles_uri" {
43
- count = var. dotfiles_uri == null ? 1 : 0
42
+ variable "manual_update" {
43
+ type = bool
44
+ description = " If true, this adds a button to workspace page to refresh dotfiles on demand."
45
+ default = false
46
+ }
44
47
48
+ data "coder_parameter" "dotfiles_uri" {
49
+ count = var. dotfiles_uri == null ? 1 : 0
45
50
type = " string"
46
51
name = " dotfiles_uri"
47
52
display_name = " Dotfiles URL"
@@ -68,6 +73,18 @@ resource "coder_script" "dotfiles" {
68
73
run_on_start = true
69
74
}
70
75
76
+ resource "coder_app" "dotfiles" {
77
+ count = var. manual_update ? 1 : 0
78
+ agent_id = var. agent_id
79
+ display_name = " Refresh Dotfiles"
80
+ slug = " dotfiles"
81
+ icon = " /icon/dotfiles.svg"
82
+ command = templatefile (" ${ path . module } /run.sh" , {
83
+ DOTFILES_URI : local.dotfiles_uri,
84
+ DOTFILES_USER : local.user
85
+ })
86
+ }
87
+
71
88
output "dotfiles_uri" {
72
89
description = " Dotfiles URI"
73
90
value = local. dotfiles_uri
You can’t perform that action at this time.
0 commit comments