File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed
Expand file tree Collapse file tree 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" {
2424<!-- schema generated by tfplugindocs -->
2525## Schema
2626
27- ### Optional
28-
29- - ` id ` (String) The ID of this resource.
30-
3127### Read-Only
3228
29+ - ` id ` (String) UUID of the workspace.
3330- ` name ` (String) Name of the workspace.
3431- ` owner ` (String) Username of the workspace owner.
32+ - ` owner_id ` (String) UUID of the workspace owner.
3533- ` start_count ` (Number) A computed count based on "transition" state. If "start", count will equal 1.
3634- ` transition ` (String) Either "start" or "stop". Use this to start/stop resources with "count".
3735
Original file line number Diff line number Diff line change @@ -75,11 +75,21 @@ func New() *schema.Provider {
7575 owner = "default"
7676 }
7777 _ = 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 )
7883 name := os .Getenv ("CODER_WORKSPACE_NAME" )
7984 if name == "" {
8085 name = "default"
8186 }
8287 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 )
8393 return nil
8494 },
8595 Schema : map [string ]* schema.Schema {
@@ -98,6 +108,16 @@ func New() *schema.Provider {
98108 Computed : true ,
99109 Description : "Username of the workspace owner." ,
100110 },
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+ },
101121 "name" : {
102122 Type : schema .TypeString ,
103123 Computed : true ,
You can’t perform that action at this time.
0 commit comments