Skip to content

Commit

Permalink
fix(dynamodb): Update Input with external-name for isUpToDate and pos…
Browse files Browse the repository at this point in the history
…tUpdate functions

Signed-off-by: kelvinwijaya <[email protected]>
  • Loading branch information
kelvinwijaya committed Aug 1, 2023
1 parent d4de19b commit a479ff9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/controller/dynamodb/table/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func SetupTable(mgr ctrl.Manager, o controller.Options) error {

func (e *updateClient) postUpdate(_ context.Context, cr *svcapitypes.Table, obj *svcsdk.UpdateTableOutput, _ managed.ExternalUpdate, _ error) (managed.ExternalUpdate, error) {
cbresult, err := e.client.DescribeContinuousBackups(&svcsdk.DescribeContinuousBackupsInput{
TableName: aws.String(cr.Name),
TableName: aws.String(meta.GetExternalName(cr)),
})
if err != nil {
return managed.ExternalUpdate{}, err
Expand All @@ -99,7 +99,7 @@ func (e *updateClient) postUpdate(_ context.Context, cr *svcapitypes.Table, obj
pitrSpecEnabled := pointer.BoolDeref(cr.Spec.ForProvider.PointInTimeRecoveryEnabled, false)

pitrInput := &svcsdk.UpdateContinuousBackupsInput{
TableName: aws.String(cr.Name),
TableName: aws.String(meta.GetExternalName(cr)),
PointInTimeRecoverySpecification: (&svcsdk.PointInTimeRecoverySpecification{
PointInTimeRecoveryEnabled: &pitrSpecEnabled,
}),
Expand Down Expand Up @@ -425,7 +425,7 @@ func (e *updateClient) isUpToDate(cr *svcapitypes.Table, resp *svcsdk.DescribeTa

// point in time recovery status
cbresult, err := e.client.DescribeContinuousBackups(&svcsdk.DescribeContinuousBackupsInput{
TableName: aws.String(cr.Name),
TableName: aws.String(meta.GetExternalName(cr)),
})
if err != nil {
return false, err
Expand Down

0 comments on commit a479ff9

Please sign in to comment.