Skip to content

Commit

Permalink
fix missing method error
Browse files Browse the repository at this point in the history
  • Loading branch information
dsa0x committed Oct 22, 2024
1 parent 1b6bced commit 69bd72a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions internal/provider/client_mock_workspaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,7 @@ func (m *mockWorkspaces) SetDataRetentionPolicyDeleteOlder(ctx context.Context,
func (m *mockWorkspaces) SetDataRetentionPolicyDontDelete(ctx context.Context, organization string, options tfe.DataRetentionPolicyDontDeleteSetOptions) (*tfe.DataRetentionPolicyDontDelete, error) {
panic("not implemented")
}

func (m *mockWorkspaces) ListTagBindings(ctx context.Context, workspaceID string) ([]*tfe.TagBinding, error) {
panic("not implemented")
}
8 changes: 4 additions & 4 deletions internal/provider/resource_tfe_no_code_module.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ func variableOptionsMaptoStruct(variableOptions []interface{}) []*tfe.NoCodeVari
return variableOptionsRes
}

func getFullModuleID(ctx context.Context, client *tfe.Client, orgName, ID string) (tfe.RegistryModuleID, error) {
module, err := client.RegistryModules.Read(ctx, tfe.RegistryModuleID{ID: ID})
func getFullModuleID(ctx context.Context, client *tfe.Client, orgName, id string) (tfe.RegistryModuleID, error) {
module, err := client.RegistryModules.Read(ctx, tfe.RegistryModuleID{ID: id})
if err != nil {
return tfe.RegistryModuleID{}, err
}
Expand All @@ -176,8 +176,8 @@ func waitForModuleVersion(ctx context.Context, client *tfe.Client, moduleID tfe.
timeout := time.Duration(5) * time.Minute
return retry.RetryContext(ctx, timeout, func() *retry.RetryError {
_, err := client.RegistryModules.ReadVersion(ctx, moduleID, versionPin)
if err == tfe.ErrResourceNotFound {
return retry.RetryableError(fmt.Errorf("Version %s not found for module %s", versionPin, moduleID))
if errors.Is(err, tfe.ErrResourceNotFound) {
return retry.RetryableError(fmt.Errorf("version %s not found for module %s", versionPin, moduleID))
}
if err != nil {
return retry.NonRetryableError(err)
Expand Down

0 comments on commit 69bd72a

Please sign in to comment.