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
apiVersion: dynamodb.aws.upbound.io/v1beta2
kind: Table
metadata:
name: example
spec:
forProvider:
attribute:
- name: UserId
type: S
- name: GameTitle
type: S
billingMode: PAY_PER_REQUEST
hashKey: UserId
rangeKey: GameTitle
region: us-west-2
deletionPolicy: Orphan
apiVersion: dynamodb.aws.upbound.io/v1beta2
kind: Table
metadata:
name: example
annotations:
crossplane.io/external-name: example
spec:
forProvider:
region: us-west-2
managementPolicies: ["Observe"]
Steps to Reproduce
Create Table with a rangeKey. This can be externally created or an orphaned crossplane created table after deletion from kubernetes.
Add crossplane Table with managementPolicies:["Observe"] and the existing external-name set.
What happened?
observe failed: cannot compute the instance diff: failed to get *terraform.InstanceDiff: all attributes must be indexed. Unused attributes: ["GameTitle"]
Relevant Error Output Snippet
2024-12-11T17:32:19Z DEBUG provider-aws Cannot observe external resource {"controller": "managed/dynamodb.aws.upbound.io/v1beta1, kind=table", "request": {"name":"example"}, "uid": "58d1d8e2-7f7a-438c-8582-1ebdbe427619", "version": "56239723", "external-name":
"example", "error": "cannot compute the instance diff: failed to get *terraform.InstanceDiff: all attributes must be indexed. Unused attributes: [\"GameTitle\"]", "errorVerbose": "all attributes must be indexed. Unused attributes: [\"GameTitle\"]\nfailed to get *terraform.InstanceDiff\ngithub.com/crossplane/upjet/pkg/controller.(*terraformPluginSDKExternal).getResourceDataDiff\n\tgithub.com/crossplane/[email protected]/pkg/controller/external_tfpluginsdk.go:421\ngithub.com/crossplane/upjet/pkg/controller.(*terraformPluginSDKExternal).Observe\n\tgithub.com/crossplane/[email protected]/pkg/controller/external_tfpluginsdk.go:495\ngithub.com/crossplane/upjet/pkg/controller.(*terraformPluginSDKAsyncExternal).Observe\n\tgithub.com/crossplane/[email protected]184956-3afbb7796d46/pkg/controller/external_async_tfpluginsdk.go:127\ngithub.com/crossplane/crossplane-runtime/pkg/reconciler/managed.(*Reconciler).Reconcile\n\tgithub.com/crossplane/[email protected]/pkg/reconciler/managed/reconciler.go:914\ngithub.com/crossplane/crossplane-runtime/pkg/ratelimiter.(*Reconciler).Reconcile\n\tgithub.com/crossplane/[email protected]/pkg/ratelimiter/reconciler.go:54\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\tsigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:119\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:316\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\tsigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227\nruntime.goexit\n\truntime/asm_amd64.s:1700\ncannot compute the instance diff\ngithub.com/crossplane/upjet/pkg/controller.(*terraformPluginSDKExternal).Observe\n\tgithub.com/crossplane/[email protected].20240911184956-3afbb7796d46/pkg/controller/external_tfpluginsdk.go:497\ngithub.com/crossplane/upjet/pkg/controller.(*terraformPluginSDKAsyncExternal).Observe\n\tgithub.com/crossplane/[email protected]/pkg/controller/external_async_tfpluginsdk.go:127\ngithub.com/crossplane/crossplane-runtime/pkg/reconciler/managed.(*Reconciler).Reconcile\n\tgithub.com/crossplane/[email protected]/pkg/reconciler/managed/reconciler.go:914\ngithub.com/crossplane/crossplane-runtime/pkg/ratelimiter.(*Reconciler).Reconcile\n\tgithub.com/crossplane/[email protected]/pkg/ratelimiter/reconciler.go:54\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\tsigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:119\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:316\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\tsigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227\nruntime.goexit\n\truntime/asm_amd64.s:1700"}
Crossplane Version
1.18.0
Provider Version
1.17.0
Kubernetes Version
v1.30.6-eks-7f9249a
Kubernetes Distribution
EKS
Additional Info
I attempted to downgrade the dynamodb provider down to 1.15 with no success.
The same error occurs on rangeKey elements in a localSecondaryIndex, but pulled them out during troubleshooting to get a smaller reproduction. The rangeKey attributes are also marked as Unused. I did not test globalSecondaryIndex but suspect it would error as well.
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Affected Resource(s)
Resource MRs required to reproduce the bug
Steps to Reproduce
Table
with arangeKey
. This can be externally created or an orphaned crossplane created table after deletion from kubernetes.Table
withmanagementPolicies:["Observe"]
and the existingexternal-name
set.What happened?
Relevant Error Output Snippet
Crossplane Version
1.18.0
Provider Version
1.17.0
Kubernetes Version
v1.30.6-eks-7f9249a
Kubernetes Distribution
EKS
Additional Info
rangeKey
elements in alocalSecondaryIndex
, but pulled them out during troubleshooting to get a smaller reproduction. TherangeKey
attributes are also marked as Unused. I did not testglobalSecondaryIndex
but suspect it would error as well.The text was updated successfully, but these errors were encountered: