File tree 1 file changed +5
-11
lines changed
1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -27,13 +27,9 @@ func TestWorkspaceTags(t *testing.T) {
27
27
default = "chris"
28
28
}
29
29
data "coder_workspace_tags" "wt" {
30
- tag {
31
- name = "cat"
32
- value = "james"
33
- }
34
- tag {
35
- name = "dog"
36
- value = data.coder_parameter.animal.value
30
+ tags = {
31
+ "cat" = "james"
32
+ "dog" = data.coder_parameter.animal.value
37
33
}
38
34
}` ,
39
35
Check : func (state * terraform.State ) error {
@@ -43,10 +39,8 @@ func TestWorkspaceTags(t *testing.T) {
43
39
require .NotNil (t , resource )
44
40
45
41
attribs := resource .Primary .Attributes
46
- require .Equal (t , "cat" , attribs ["tag.0.name" ])
47
- require .Equal (t , "james" , attribs ["tag.0.value" ])
48
- require .Equal (t , "dog" , attribs ["tag.1.name" ])
49
- require .Equal (t , "chris" , attribs ["tag.1.value" ])
42
+ require .Equal (t , "james" , attribs ["tags.cat" ])
43
+ require .Equal (t , "chris" , attribs ["tags.dog" ])
50
44
return nil
51
45
},
52
46
}},
You can’t perform that action at this time.
0 commit comments