Skip to content

Commit d63ad78

Browse files
fix(github_actions_repository_oidc_subject_claim_customization_template): graceful handling of 404 on read (#2483)
The resource github_actions_repository_oidc_subject_claim_customization_template would error when the associated repository was deleted. This change will gracefully remove the resource on 404 not found. Co-authored-by: Keegan Campbell <[email protected]>
1 parent c99f24e commit d63ad78

1 file changed

+1
-1
lines changed

github/resource_github_actions_repository_oidc_subject_claim_customization_template.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func resourceGithubActionsRepositoryOIDCSubjectClaimCustomizationTemplateRead(d
9595
template, _, err := client.Actions.GetRepoOIDCSubjectClaimCustomTemplate(ctx, owner, repository)
9696

9797
if err != nil {
98-
return err
98+
return deleteResourceOn404AndSwallow304OtherwiseReturnError(err, d, "actions repository oidc subject claim customization template (%s, %s)", owner, repository)
9999
}
100100

101101
if err = d.Set("repository", repository); err != nil {

0 commit comments

Comments
 (0)