Skip to content

Commit 18a3d6a

Browse files
committed
Add return statement to not found on delete
1 parent 3bc8943 commit 18a3d6a

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

internal/provider/resource_tfe_aws_oidc_configuration.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ func (r *resourceTFEAWSOIDCConfiguration) Delete(ctx context.Context, req resour
187187
if err != nil {
188188
if errors.Is(err, tfe.ErrResourceNotFound) {
189189
tflog.Debug(ctx, fmt.Sprintf("TFE AWS OIDC configuration %s no longer exists", oidcID))
190+
return
190191
}
191192

192193
resp.Diagnostics.AddError("Error deleting TFE AWS OIDC Configuration", err.Error())

internal/provider/resource_tfe_azure_oidc_configuration.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ func (r *resourceTFEAzureOIDCConfiguration) Delete(ctx context.Context, req reso
201201
if err != nil {
202202
if errors.Is(err, tfe.ErrResourceNotFound) {
203203
tflog.Debug(ctx, fmt.Sprintf("TFE Azure OIDC configuration %s no longer exists", oidcID))
204+
return
204205
}
205206

206207
resp.Diagnostics.AddError("Error deleting TFE Azure OIDC Configuration", err.Error())

internal/provider/resource_tfe_gcp_oidc_configuration.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ func (r *resourceTFEGCPOIDCConfiguration) Delete(ctx context.Context, req resour
201201
if err != nil {
202202
if errors.Is(err, tfe.ErrResourceNotFound) {
203203
tflog.Debug(ctx, fmt.Sprintf("TFE GCP OIDC configuration %s no longer exists", oidcID))
204+
return
204205
}
205206

206207
resp.Diagnostics.AddError("Error deleting TFE GCP OIDC Configuration", err.Error())

internal/provider/resource_tfe_vault_oidc_configuration.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ func (r *resourceTFEVaultOIDCConfiguration) Delete(ctx context.Context, req reso
220220
if err != nil {
221221
if errors.Is(err, tfe.ErrResourceNotFound) {
222222
tflog.Debug(ctx, fmt.Sprintf("TFE Vault OIDC configuration %s no longer exists", oidcID))
223+
return
223224
}
224225

225226
resp.Diagnostics.AddError("Error deleting TFE Vault OIDC Configuration", err.Error())

0 commit comments

Comments
 (0)