Skip to content

Commit a56e7ad

Browse files
committed
add create_at and updated_at read
1 parent d9d061d commit a56e7ad

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

internal/services/inference/deployment.go

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ func ResourceDeployment() *schema.Resource {
5151
Required: true,
5252
Description: "The model name to use for the deployment",
5353
},
54+
"model_id": {
55+
Type: schema.TypeString,
56+
Computed: true,
57+
Description: "The model id used for the deployment",
58+
},
5459
"accept_eula": {
5560
Type: schema.TypeBool,
5661
Optional: true,
@@ -93,6 +98,11 @@ func ResourceDeployment() *schema.Resource {
9398
Computed: true,
9499
Description: "The endpoint private URL",
95100
},
101+
"disable_auth_private": {
102+
Type: schema.TypeBool,
103+
Computed: true,
104+
Description: "Whether or not the authentication on the private endpoint is disabled.",
105+
},
96106
"endpoint_public_id": {
97107
Type: schema.TypeString,
98108
Computed: true,
@@ -103,6 +113,21 @@ func ResourceDeployment() *schema.Resource {
103113
Computed: true,
104114
Description: "The endpoint private ID",
105115
},
116+
"disable_auth_public": {
117+
Type: schema.TypeBool,
118+
Computed: true,
119+
Description: "Whether or not the authentication on the public endpoint is disabled.",
120+
},
121+
"created_at": {
122+
Type: schema.TypeString,
123+
Computed: true,
124+
Description: "The date and time of the creation of the deployment",
125+
},
126+
"updated_at": {
127+
Type: schema.TypeString,
128+
Computed: true,
129+
Description: "The date and time of the last update of the deployment",
130+
},
106131
"endpoints": {
107132
Type: schema.TypeList,
108133
Required: true,
@@ -119,6 +144,12 @@ func ResourceDeployment() *schema.Resource {
119144
Description: "The id of the private network",
120145
Optional: true,
121146
},
147+
"disable_auth": {
148+
Type: schema.TypeBool,
149+
Description: "Disable the authentication on the endpoint.",
150+
Optional: true,
151+
Default: false,
152+
},
122153
},
123154
},
124155
},
@@ -211,17 +242,28 @@ func ResourceDeploymentRead(ctx context.Context, d *schema.ResourceData, m inter
211242
_ = d.Set("max_size", deployment.MaxSize)
212243
_ = d.Set("size", deployment.Size)
213244
_ = d.Set("status", deployment.Status)
245+
_ = d.Set("model_id", deployment.ModelID)
246+
_ = d.Set("created_at", types.FlattenTime(deployment.CreatedAt))
247+
_ = d.Set("updated_at", types.FlattenTime(deployment.UpdatedAt))
214248

215249
if deployment.Endpoints[0].PrivateNetwork.PrivateNetworkID != "" {
216250
_ = d.Set("endpoint_private_url", deployment.Endpoints[0].URL)
251+
_ = d.Set("endpoint_private_id", deployment.Endpoints[0].ID)
252+
_ = d.Set("disable_auth_private", deployment.Endpoints[0].DisableAuth)
217253
} else {
218254
_ = d.Set("endpoint_public_url", deployment.Endpoints[0].URL)
255+
_ = d.Set("endpoint_public_id", deployment.Endpoints[0].ID)
256+
_ = d.Set("disable_auth_public", deployment.Endpoints[0].DisableAuth)
219257
}
220258
if len(deployment.Endpoints) == 2 {
221259
if deployment.Endpoints[1].PrivateNetwork.PrivateNetworkID != "" {
222260
_ = d.Set("endpoint_private_url", deployment.Endpoints[1].URL)
261+
_ = d.Set("endpoint_private_id", deployment.Endpoints[1].ID)
262+
_ = d.Set("disable_auth_private", deployment.Endpoints[1].DisableAuth)
223263
} else {
224264
_ = d.Set("endpoint_public_url", deployment.Endpoints[1].URL)
265+
_ = d.Set("endpoint_public_id", deployment.Endpoints[1].ID)
266+
_ = d.Set("disable_auth_public", deployment.Endpoints[1].DisableAuth)
225267
}
226268
}
227269
return nil

0 commit comments

Comments
 (0)