Skip to content

Commit

Permalink
streamline create
Browse files Browse the repository at this point in the history
  • Loading branch information
rajagopalans committed Nov 21, 2023
1 parent fdffb48 commit d9772ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apstra/resource_datacenter_property_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ func (o *resourceDatacenterPropertySet) Create(ctx context.Context, req resource
state.SyncWithCatalog = plan.SyncWithCatalog
state.SyncRequired = types.BoolValue(false)

if !plan.Keys.IsNull() {
state.Stale = types.BoolNull()
if plan.Keys.IsNull() {
resp.Diagnostics.Append(resp.State.Set(ctx, &state)...)
}

state.Stale = types.BoolNull()
// extract keys which actually got imported
var importedKeys []string
resp.Diagnostics.Append(plan.Keys.ElementsAs(ctx, &importedKeys, false)...)
Expand Down

0 comments on commit d9772ff

Please sign in to comment.