@@ -281,21 +281,23 @@ func (r MsSqlJobStepResource) Read() sdk.ResourceFunc {
281281 state .JobCredentialID = credentialID .ID ()
282282 }
283283
284- state .JobStepIndex = pointer .From (props .StepId )
285- state .JobTargetGroupID = props .TargetGroup
286- state .SqlScript = props .Action .Value
287- state .InitialRetryIntervalSeconds = pointer .From (props .ExecutionOptions .InitialRetryIntervalSeconds )
288- state .MaximumRetryIntervalSeconds = pointer .From (props .ExecutionOptions .MaximumRetryIntervalSeconds )
289-
290284 target , err := flattenOutputTarget (props .Output )
291285 if err != nil {
292286 return fmt .Errorf ("flattening `output_target`: %+v" , err )
293287 }
294288 state .OutputTarget = target
295289
296- state .RetryAttempts = pointer .From (props .ExecutionOptions .RetryAttempts )
297- state .RetryIntervalBackoffMultiplier = pointer .From (props .ExecutionOptions .RetryIntervalBackoffMultiplier )
298- state .TimeoutSeconds = pointer .From (props .ExecutionOptions .TimeoutSeconds )
290+ state .JobStepIndex = pointer .From (props .StepId )
291+ state .JobTargetGroupID = props .TargetGroup
292+ state .SqlScript = props .Action .Value
293+
294+ if exec := props .ExecutionOptions ; exec != nil {
295+ state .InitialRetryIntervalSeconds = pointer .From (exec .InitialRetryIntervalSeconds )
296+ state .MaximumRetryIntervalSeconds = pointer .From (exec .MaximumRetryIntervalSeconds )
297+ state .RetryAttempts = pointer .From (exec .RetryAttempts )
298+ state .RetryIntervalBackoffMultiplier = pointer .From (exec .RetryIntervalBackoffMultiplier )
299+ state .TimeoutSeconds = pointer .From (exec .TimeoutSeconds )
300+ }
299301 }
300302 }
301303
0 commit comments