File tree 2 files changed +22
-4
lines changed
2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,12 @@ resource "kubernetes_pod" "dev" {
24
24
<!-- schema generated by tfplugindocs -->
25
25
## Schema
26
26
27
- ### Optional
28
-
29
- - ` id ` (String) The ID of this resource.
30
-
31
27
### Read-Only
32
28
29
+ - ` id ` (String) UUID of the workspace.
33
30
- ` name ` (String) Name of the workspace.
34
31
- ` owner ` (String) Username of the workspace owner.
32
+ - ` owner_id ` (String) UUID of the workspace owner.
35
33
- ` start_count ` (Number) A computed count based on "transition" state. If "start", count will equal 1.
36
34
- ` transition ` (String) Either "start" or "stop". Use this to start/stop resources with "count".
37
35
Original file line number Diff line number Diff line change @@ -75,11 +75,21 @@ func New() *schema.Provider {
75
75
owner = "default"
76
76
}
77
77
_ = rd .Set ("owner" , owner )
78
+ ownerID := os .Getenv ("CODER_WORKSPACE_OWNER_ID" )
79
+ if ownerID == "" {
80
+ ownerID = uuid .Nil .String ()
81
+ }
82
+ _ = rd .Set ("owner_id" , ownerID )
78
83
name := os .Getenv ("CODER_WORKSPACE_NAME" )
79
84
if name == "" {
80
85
name = "default"
81
86
}
82
87
rd .Set ("name" , name )
88
+ id := os .Getenv ("CODER_WORKSPACE_ID" )
89
+ if id == "" {
90
+ id = uuid .Nil .String ()
91
+ }
92
+ _ = rd .Set ("id" , id )
83
93
return nil
84
94
},
85
95
Schema : map [string ]* schema.Schema {
@@ -98,6 +108,16 @@ func New() *schema.Provider {
98
108
Computed : true ,
99
109
Description : "Username of the workspace owner." ,
100
110
},
111
+ "owner_id" : {
112
+ Type : schema .TypeString ,
113
+ Computed : true ,
114
+ Description : "UUID of the workspace owner." ,
115
+ },
116
+ "id" : {
117
+ Type : schema .TypeString ,
118
+ Computed : true ,
119
+ Description : "UUID of the workspace." ,
120
+ },
101
121
"name" : {
102
122
Type : schema .TypeString ,
103
123
Computed : true ,
You can’t perform that action at this time.
0 commit comments