Skip to content

Commit d1a87ca

Browse files
committed
fixup! feat: update the edge location resources according to new APIs
1 parent 1fbccad commit d1a87ca

File tree

2 files changed

+352
-52
lines changed

2 files changed

+352
-52
lines changed

castai/resource_edge_location.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ func (r *edgeLocationResource) Create(ctx context.Context, req resource.CreateRe
495495

496496
plan.ID = types.StringValue(*apiResp.JSON200.Id)
497497
plan.CredentialsRevision = types.Int64Value(1)
498-
// Store credential hash in private state (skip when using impersonation flow)
498+
// Store credential hash in private state (skip when credentials are missing e.g. OIDC flow with AWS and GCP)
499499
if mc != nil && !mc.credentials().IsNull() {
500500
resp.Diagnostics.Append(r.woCredentialsStore(resp.Private).Set(ctx, mc.credentials())...)
501501
}
@@ -898,7 +898,7 @@ func (r *edgeLocationResource) toGCPModel(ctx context.Context, config *omni.GCPP
898898
NetworkTags: types.SetNull(types.StringType),
899899
}
900900

901-
if config.InstanceServiceAccount != nil {
901+
if config.InstanceServiceAccount != nil && *config.InstanceServiceAccount != "" {
902902
gcp.InstanceServiceAccount = types.StringValue(*config.InstanceServiceAccount)
903903
}
904904

0 commit comments

Comments
 (0)