diff --git a/pkg/runtime/reconciler.go b/pkg/runtime/reconciler.go index e8b122e..8dec793 100644 --- a/pkg/runtime/reconciler.go +++ b/pkg/runtime/reconciler.go @@ -263,6 +263,17 @@ func (r *resourceReconciler) createResource( if err != nil { return latest, err } + + rlog.Enter("rm.ReadOne") + observed, err := rm.ReadOne(ctx, latest) + rlog.Exit("rm.ReadOne", err) + if err != nil { + return latest, err + } + + // Take the status from the latest ReadOne + latest.SetStatus(observed) + // Ensure that we are patching any changes to the annotations/metadata and // the Spec that may have been set by the resource manager's successful // Create call above. diff --git a/pkg/types/aws_resource.go b/pkg/types/aws_resource.go index b31f7c8..0690e56 100644 --- a/pkg/types/aws_resource.go +++ b/pkg/types/aws_resource.go @@ -55,4 +55,6 @@ type AWSResource interface { // SetIdentifiers will set the the Spec or Status field that represents the // identifier for the resource. SetIdentifiers(*ackv1alpha1.AWSIdentifiers) error + // SetStatus will set the Status field for the resource + SetStatus(AWSResource) }