You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resource/aws_servicecatalog_provisioned_product: Add possible `TAINTED` target state for resource update and remove one of the internal waiters during read
@@ -415,9 +416,16 @@ func resourceProvisionedProductRead(d *schema.ResourceData, meta interface{}) er
415
416
d.Set("status_message", detail.StatusMessage)
416
417
d.Set("type", detail.Type)
417
418
418
-
// tags are only available from the record tied to the provisioned product
419
+
// Previously, we waited for the record to only return a target state of 'SUCCEEDED' or 'AVAILABLE'
420
+
// but this can interfere complete reads of this resource when an error occurs after initial creation
421
+
// or after an invalid update that returns a 'FAILED' record state. Thus, waiters are now present in the CREATE and UPDATE methods of this resource instead.
log.Printf("[WARN] Service Catalog Provisioned Product (%s) Record (%s) not found, unable to set tags", d.Id(), aws.StringValue(detail.LastProvisioningRecordId))
@@ -432,12 +440,27 @@ func resourceProvisionedProductRead(d *schema.ResourceData, meta interface{}) er
432
440
returnfmt.Errorf("error getting Service Catalog Provisioned Product (%s) Record (%s): empty response", d.Id(), aws.StringValue(detail.LastProvisioningRecordId))
433
441
}
434
442
443
+
// To enable debugging of potential errors, log as a warning
444
+
// instead of exiting prematurely with an error, e.g.
445
+
// errors can be present after update to a new version failed and the stack
log.Printf("[WARN] Errors found when describing Service Catalog Provisioned Product (%s) Record (%s): %s", d.Id(), aws.StringValue(detail.LastProvisioningRecordId), errs.ErrorOrNil())
0 commit comments