Skip to content

Commit

Permalink
Merge pull request #1298 from hashicorp/gs/refactor-run-task-resource…
Browse files Browse the repository at this point in the history
…s-part2

Migrate tfe_workspace_run_task to plugin model
  • Loading branch information
glennsarti committed Apr 2, 2024
2 parents e5496d1 + 85c510d commit d59d3b2
Show file tree
Hide file tree
Showing 4 changed files with 243 additions and 132 deletions.
7 changes: 0 additions & 7 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ func Provider() *schema.Provider {
"tfe_team_token": resourceTFETeamToken(),
"tfe_terraform_version": resourceTFETerraformVersion(),
"tfe_workspace": resourceTFEWorkspace(),
"tfe_workspace_run_task": resourceTFEWorkspaceRunTask(),
"tfe_variable_set": resourceTFEVariableSet(),
"tfe_workspace_policy_set": resourceTFEWorkspacePolicySet(),
"tfe_workspace_policy_set_exclusion": resourceTFEWorkspacePolicySetExclusion(),
Expand Down Expand Up @@ -192,9 +191,3 @@ var descriptions = map[string]string{
"organization": "The organization to apply to a resource if one is not defined on\n" +
"the resource itself",
}

// A commonly used helper method to check if the error
// returned was tfe.ErrResourceNotFound
func isErrResourceNotFound(err error) bool {
return errors.Is(err, tfe.ErrResourceNotFound)
}
5 changes: 3 additions & 2 deletions internal/provider/provider_next.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,12 @@ func (p *frameworkProvider) DataSources(ctx context.Context) []func() datasource

func (p *frameworkProvider) Resources(ctx context.Context) []func() resource.Resource {
return []func() resource.Resource{
NewOrganizationRunTaskResource,
NewRegistryGPGKeyResource,
NewRegistryProviderResource,
NewResourceVariable,
NewSAMLSettingsResource,
NewResourceWorkspaceSettings,
NewOrganizationRunTaskResource,
NewSAMLSettingsResource,
NewWorkspaceRunTaskResource,
}
}
Loading

0 comments on commit d59d3b2

Please sign in to comment.