chore(amplify): use the webhook.appId field instead of extracting it from the webhookArn #42551
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The Amplify GetWebhook API returns the
appId
field (docs). This changes the code to simply use theappId
from the response instead of parsing thewebhookArn
to extract the appId.There are no changes in functionality. This just simplifies the code to not make unnecessary assumptions on the ARN format. The motivation is to prevent reocurrence of of #39407 (comment)
Relations
Relates #39407
References
Output from Acceptance Testing
** Note: I commented out the tests not related to Amplify webhooks in this run. I believe that I cannot target only the Webhook tests with the
TESTS
parm due to how theTestAccAmplify_serial
is set up https://github.com/hashicorp/terraform-provider-aws/blob/main/internal/service/amplify/amplify_test.go#L16