Skip to content

Commit c4b3921

Browse files
authored
fix(apple-silicon): add username and password (#2971)
1 parent 5cc92af commit c4b3921

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

internal/services/applesilicon/server.go

+13
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,17 @@ func ResourceServer() *schema.Resource {
135135
Computed: true,
136136
Description: "The VPC status of the server",
137137
},
138+
"password": {
139+
Type: schema.TypeString,
140+
Computed: true,
141+
Sensitive: true,
142+
Description: "The password of the server",
143+
},
144+
"username": {
145+
Type: schema.TypeString,
146+
Computed: true,
147+
Description: "The username of the server",
148+
},
138149

139150
// Common
140151
"zone": zonal.Schema(),
@@ -225,6 +236,8 @@ func ResourceAppleSiliconServerRead(ctx context.Context, d *schema.ResourceData,
225236
_ = d.Set("zone", res.Zone.String())
226237
_ = d.Set("organization_id", res.OrganizationID)
227238
_ = d.Set("project_id", res.ProjectID)
239+
_ = d.Set("password", res.SudoPassword)
240+
_ = d.Set("username", res.SSHUsername)
228241

229242
listPrivateNetworks, err := privateNetworkAPI.ListServerPrivateNetworks(&applesilicon.PrivateNetworkAPIListServerPrivateNetworksRequest{
230243
Zone: res.Zone,

0 commit comments

Comments
 (0)