[Bug]: CannotObserveExternalResource
when providing input to spec from another resource using getComposedResource
from function-go-templating
#669
Labels
Is there an existing issue for this?
Affected Resource(s)
Resource MRs required to reproduce the bug
Providers
Functions
XRD and Composition
Claim
Steps to Reproduce
Project
andProjectService
ServiceAccount
What happened?
When the
ServiceAccount
MR is created the spec contains<no value>
for bothdisplayName
andprojectId
. This is expected since the status of theProject
referenced bygetComposedResource
is not present until theProject
isSynced
andReady
.From
kubectl describe serviceaccount my-sample-sa
:The
ServiceAccount
has an event logging the failure to create the external resource (expected):When the value is present from the
Project
, the spec of theServiceAccount
is updated correctly:However it does not appear that the API call made to GCP is updated with the new value in the spec:
After the
projectId
field of the spec is updated, deleting theServiceAccount
and allowing Crossplane to recreate it causes the GCP Service Account resource to be created correctly on the first attempt.Relevant Error Output Snippet
Warning CannotObserveExternalResource 38s (x21 over 14m) managed/cloudplatform.gcp.upbound.io/v1beta1, kind=serviceaccount failed to observe the resource: [{0 Error when reading or editing Service Account "projects/<no value>/serviceAccounts/my-sample-sa@<no value>.iam.gserviceaccount.com": googleapi: Error 400: Unknown error, badRequest []}]
The text was updated successfully, but these errors were encountered: