Documentation ¶
Index ¶
- Variables
- func CheckGroupEntitlements(ctx context.Context, features map[codersdk.FeatureName]codersdk.Feature) (diags diag.Diagnostics)
- func New(version string) func() provider.Provider
- func NewActiveVersionValidator() validator.List
- func NewGroupDataSource() datasource.DataSource
- func NewGroupResource() resource.Resource
- func NewLicenseResource() resource.Resource
- func NewOrganizationDataSource() datasource.DataSource
- func NewTemplateDataSource() datasource.DataSource
- func NewTemplateResource() resource.Resource
- func NewUserDataSource() datasource.DataSource
- func NewUserResource() resource.Resource
- func NewVersionsPlanModifier() planmodifier.List
- func NewWorkspaceProxyResource() resource.Resource
- func PrintOrNull(v any) string
- func PtrTo[T any](v T) *T
- type ACL
- type AutostopRequirement
- type CoderdProvider
- func (p *CoderdProvider) Configure(ctx context.Context, req provider.ConfigureRequest, ...)
- func (p *CoderdProvider) DataSources(ctx context.Context) []func() datasource.DataSource
- func (p *CoderdProvider) Functions(ctx context.Context) []func() function.Function
- func (p *CoderdProvider) Metadata(ctx context.Context, req provider.MetadataRequest, ...)
- func (p *CoderdProvider) Resources(ctx context.Context) []func() resource.Resource
- func (p *CoderdProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
- type CoderdProviderData
- type CoderdProviderModel
- type GroupDataSource
- func (d *GroupDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *GroupDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *GroupDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *GroupDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type GroupDataSourceModel
- type GroupResource
- func (r *GroupResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *GroupResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *GroupResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *GroupResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *GroupResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *GroupResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *GroupResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *GroupResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type GroupResourceModel
- type LastVersionsByHash
- type LicenseResource
- func (r *LicenseResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *LicenseResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *LicenseResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *LicenseResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *LicenseResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *LicenseResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *LicenseResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type LicenseResourceModel
- type Member
- type OrganizationDataSource
- func (d *OrganizationDataSource) ConfigValidators(_ context.Context) []datasource.ConfigValidator
- func (d *OrganizationDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *OrganizationDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *OrganizationDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *OrganizationDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type OrganizationDataSourceModel
- type Permission
- type PreviousTemplateVersion
- type TemplateDataSource
- func (d *TemplateDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *TemplateDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *TemplateDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *TemplateDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type TemplateDataSourceModel
- type TemplateResource
- func (r *TemplateResource) ConfigValidators(context.Context) []resource.ConfigValidator
- func (r *TemplateResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *TemplateResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *TemplateResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *TemplateResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *TemplateResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *TemplateResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *TemplateResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *TemplateResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type TemplateResourceModel
- type TemplateVersion
- type UUID
- type UserDataSource
- func (d *UserDataSource) ConfigValidators(context.Context) []datasource.ConfigValidator
- func (d *UserDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *UserDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *UserDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *UserDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type UserDataSourceModel
- type UserResource
- func (r *UserResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *UserResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *UserResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *UserResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *UserResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *UserResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *UserResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *UserResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type UserResourceModel
- type Variable
- type Versions
- type WorkspaceProxyResource
- func (r *WorkspaceProxyResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *WorkspaceProxyResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *WorkspaceProxyResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *WorkspaceProxyResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *WorkspaceProxyResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *WorkspaceProxyResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *WorkspaceProxyResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type WorkspaceProxyResourceModel
Constants ¶
This section is empty.
Variables ¶
var LastVersionsKey = "last_versions"
var UUIDType = uuidType{}
Functions ¶
func CheckGroupEntitlements ¶
func CheckGroupEntitlements(ctx context.Context, features map[codersdk.FeatureName]codersdk.Feature) (diags diag.Diagnostics)
func NewGroupDataSource ¶
func NewGroupDataSource() datasource.DataSource
func NewGroupResource ¶
func NewLicenseResource ¶ added in v0.0.5
func NewOrganizationDataSource ¶
func NewOrganizationDataSource() datasource.DataSource
func NewTemplateDataSource ¶
func NewTemplateDataSource() datasource.DataSource
func NewTemplateResource ¶
func NewUserDataSource ¶
func NewUserDataSource() datasource.DataSource
func NewUserResource ¶
func NewVersionsPlanModifier ¶
func NewVersionsPlanModifier() planmodifier.List
func PrintOrNull ¶
Types ¶
type ACL ¶
type ACL struct { UserPermissions []Permission `tfsdk:"users"` GroupPermissions []Permission `tfsdk:"groups"` }
type AutostopRequirement ¶
type CoderdProvider ¶
type CoderdProvider struct {
// contains filtered or unexported fields
}
CoderdProvider defines the provider implementation.
func (*CoderdProvider) Configure ¶
func (p *CoderdProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse)
func (*CoderdProvider) DataSources ¶
func (p *CoderdProvider) DataSources(ctx context.Context) []func() datasource.DataSource
func (*CoderdProvider) Functions ¶
func (p *CoderdProvider) Functions(ctx context.Context) []func() function.Function
func (*CoderdProvider) Metadata ¶
func (p *CoderdProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse)
func (*CoderdProvider) Resources ¶
func (p *CoderdProvider) Resources(ctx context.Context) []func() resource.Resource
func (*CoderdProvider) Schema ¶
func (p *CoderdProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
type CoderdProviderData ¶
type CoderdProviderModel ¶
type CoderdProviderModel struct { URL types.String `tfsdk:"url"` Token types.String `tfsdk:"token"` DefaultOrganizationID UUID `tfsdk:"default_organization_id"` }
CoderdProviderModel describes the provider data model.
type GroupDataSource ¶
type GroupDataSource struct {
// contains filtered or unexported fields
}
GroupDataSource defines the data source implementation.
func (*GroupDataSource) Configure ¶
func (d *GroupDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*GroupDataSource) Metadata ¶
func (d *GroupDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*GroupDataSource) Read ¶
func (d *GroupDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*GroupDataSource) Schema ¶
func (d *GroupDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type GroupDataSourceModel ¶
type GroupDataSourceModel struct { // ID or name and organization ID must be set ID UUID `tfsdk:"id"` Name types.String `tfsdk:"name"` OrganizationID UUID `tfsdk:"organization_id"` DisplayName types.String `tfsdk:"display_name"` AvatarURL types.String `tfsdk:"avatar_url"` QuotaAllowance types.Int32 `tfsdk:"quota_allowance"` Source types.String `tfsdk:"source"` Members []Member `tfsdk:"members"` }
GroupDataSourceModel describes the data source data model.
type GroupResource ¶
type GroupResource struct {
// contains filtered or unexported fields
}
GroupResource defines the resource implementation.
func (*GroupResource) Configure ¶
func (r *GroupResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*GroupResource) Create ¶
func (r *GroupResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*GroupResource) Delete ¶
func (r *GroupResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*GroupResource) ImportState ¶
func (r *GroupResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*GroupResource) Metadata ¶
func (r *GroupResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*GroupResource) Read ¶
func (r *GroupResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*GroupResource) Schema ¶
func (r *GroupResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*GroupResource) Update ¶
func (r *GroupResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type GroupResourceModel ¶
type GroupResourceModel struct { ID UUID `tfsdk:"id"` Name types.String `tfsdk:"name"` DisplayName types.String `tfsdk:"display_name"` AvatarURL types.String `tfsdk:"avatar_url"` QuotaAllowance types.Int32 `tfsdk:"quota_allowance"` OrganizationID UUID `tfsdk:"organization_id"` Members types.Set `tfsdk:"members"` }
GroupResourceModel describes the resource data model.
type LastVersionsByHash ¶
type LastVersionsByHash = map[string][]PreviousTemplateVersion
type LicenseResource ¶ added in v0.0.5
type LicenseResource struct {
// contains filtered or unexported fields
}
LicenseResource defines the resource implementation.
func (*LicenseResource) Configure ¶ added in v0.0.5
func (r *LicenseResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*LicenseResource) Create ¶ added in v0.0.5
func (r *LicenseResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*LicenseResource) Delete ¶ added in v0.0.5
func (r *LicenseResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*LicenseResource) Metadata ¶ added in v0.0.5
func (r *LicenseResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*LicenseResource) Read ¶ added in v0.0.5
func (r *LicenseResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*LicenseResource) Schema ¶ added in v0.0.5
func (r *LicenseResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*LicenseResource) Update ¶ added in v0.0.5
func (r *LicenseResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type LicenseResourceModel ¶ added in v0.0.5
type LicenseResourceModel struct { ID types.Int32 `tfsdk:"id"` ExpiresAt types.Int64 `tfsdk:"expires_at"` License types.String `tfsdk:"license"` }
LicenseResourceModel describes the resource data model.
type Member ¶
type Member struct { ID UUID `tfsdk:"id"` Username types.String `tfsdk:"username"` Email types.String `tfsdk:"email"` CreatedAt types.Int64 `tfsdk:"created_at"` LastSeenAt types.Int64 `tfsdk:"last_seen_at"` Status types.String `tfsdk:"status"` LoginType types.String `tfsdk:"login_type"` ThemePreference types.String `tfsdk:"theme_preference"` }
type OrganizationDataSource ¶
type OrganizationDataSource struct {
// contains filtered or unexported fields
}
OrganizationDataSource defines the data source implementation.
func (*OrganizationDataSource) ConfigValidators ¶
func (d *OrganizationDataSource) ConfigValidators(_ context.Context) []datasource.ConfigValidator
func (*OrganizationDataSource) Configure ¶
func (d *OrganizationDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*OrganizationDataSource) Metadata ¶
func (d *OrganizationDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*OrganizationDataSource) Read ¶
func (d *OrganizationDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*OrganizationDataSource) Schema ¶
func (d *OrganizationDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type OrganizationDataSourceModel ¶
type OrganizationDataSourceModel struct { // Exactly one of ID, IsDefault, or Name must be set. ID UUID `tfsdk:"id"` IsDefault types.Bool `tfsdk:"is_default"` Name types.String `tfsdk:"name"` CreatedAt types.Int64 `tfsdk:"created_at"` UpdatedAt types.Int64 `tfsdk:"updated_at"` // TODO: This could reasonably store some User object - though we may need to make additional queries depending on what fields we // want, or to have one consistent user type for all data sources. Members types.Set `tfsdk:"members"` }
OrganizationDataSourceModel describes the data source data model.
type Permission ¶
type PreviousTemplateVersion ¶
type TemplateDataSource ¶
type TemplateDataSource struct {
// contains filtered or unexported fields
}
TemplateDataSource defines the data source implementation.
func (*TemplateDataSource) Configure ¶
func (d *TemplateDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*TemplateDataSource) Metadata ¶
func (d *TemplateDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*TemplateDataSource) Read ¶
func (d *TemplateDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*TemplateDataSource) Schema ¶
func (d *TemplateDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type TemplateDataSourceModel ¶
type TemplateDataSourceModel struct { // ((Organization and Name) or ID) must be set OrganizationID UUID `tfsdk:"organization_id"` ID UUID `tfsdk:"id"` Name types.String `tfsdk:"name"` DisplayName types.String `tfsdk:"display_name"` // TODO: Provisioner Description types.String `tfsdk:"description"` ActiveVersionID UUID `tfsdk:"active_version_id"` ActiveUserCount types.Int64 `tfsdk:"active_user_count"` Deprecated types.Bool `tfsdk:"deprecated"` DeprecationMessage types.String `tfsdk:"deprecation_message"` Icon types.String `tfsdk:"icon"` DefaultTTLMillis types.Int64 `tfsdk:"default_ttl_ms"` ActivityBumpMillis types.Int64 `tfsdk:"activity_bump_ms"` AutostopRequirement types.Object `tfsdk:"auto_stop_requirement"` AutostartPermittedDaysOfWeek types.Set `tfsdk:"auto_start_permitted_days_of_week"` AllowUserAutostart types.Bool `tfsdk:"allow_user_autostart"` AllowUserAutostop types.Bool `tfsdk:"allow_user_autostop"` AllowUserCancelWorkspaceJobs types.Bool `tfsdk:"allow_user_cancel_workspace_jobs"` FailureTTLMillis types.Int64 `tfsdk:"failure_ttl_ms"` TimeTilDormantMillis types.Int64 `tfsdk:"time_til_dormant_ms"` TimeTilDormantAutoDeleteMillis types.Int64 `tfsdk:"time_til_dormant_autodelete_ms"` RequireActiveVersion types.Bool `tfsdk:"require_active_version"` CreatedByUserID UUID `tfsdk:"created_by_user_id"` CreatedAt types.Int64 `tfsdk:"created_at"` // Unix timestamp UpdatedAt types.Int64 `tfsdk:"updated_at"` // Unix timestamp ACL types.Object `tfsdk:"acl"` }
TemplateDataSourceModel describes the data source data model.
type TemplateResource ¶
type TemplateResource struct {
// contains filtered or unexported fields
}
TemplateResource defines the resource implementation.
func (*TemplateResource) ConfigValidators ¶
func (r *TemplateResource) ConfigValidators(context.Context) []resource.ConfigValidator
ConfigValidators implements resource.ResourceWithConfigValidators.
func (*TemplateResource) Configure ¶
func (r *TemplateResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*TemplateResource) Create ¶
func (r *TemplateResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*TemplateResource) Delete ¶
func (r *TemplateResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*TemplateResource) ImportState ¶
func (r *TemplateResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*TemplateResource) Metadata ¶
func (r *TemplateResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*TemplateResource) Read ¶
func (r *TemplateResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*TemplateResource) Schema ¶
func (r *TemplateResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*TemplateResource) Update ¶
func (r *TemplateResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type TemplateResourceModel ¶
type TemplateResourceModel struct { ID UUID `tfsdk:"id"` Name types.String `tfsdk:"name"` DisplayName types.String `tfsdk:"display_name"` Description types.String `tfsdk:"description"` OrganizationID UUID `tfsdk:"organization_id"` Icon types.String `tfsdk:"icon"` DefaultTTLMillis types.Int64 `tfsdk:"default_ttl_ms"` ActivityBumpMillis types.Int64 `tfsdk:"activity_bump_ms"` AutostopRequirement types.Object `tfsdk:"auto_stop_requirement"` AutostartPermittedDaysOfWeek types.Set `tfsdk:"auto_start_permitted_days_of_week"` AllowUserCancelWorkspaceJobs types.Bool `tfsdk:"allow_user_cancel_workspace_jobs"` AllowUserAutostart types.Bool `tfsdk:"allow_user_auto_start"` AllowUserAutostop types.Bool `tfsdk:"allow_user_auto_stop"` FailureTTLMillis types.Int64 `tfsdk:"failure_ttl_ms"` TimeTilDormantMillis types.Int64 `tfsdk:"time_til_dormant_ms"` TimeTilDormantAutoDeleteMillis types.Int64 `tfsdk:"time_til_dormant_autodelete_ms"` RequireActiveVersion types.Bool `tfsdk:"require_active_version"` DeprecationMessage types.String `tfsdk:"deprecation_message"` // If null, we are not managing ACL via Terraform (such as for AGPL). ACL types.Object `tfsdk:"acl"` Versions Versions `tfsdk:"versions"` }
TemplateResourceModel describes the resource data model.
func (*TemplateResourceModel) CheckEntitlements ¶
func (m *TemplateResourceModel) CheckEntitlements(ctx context.Context, features map[codersdk.FeatureName]codersdk.Feature) (diags diag.Diagnostics)
func (*TemplateResourceModel) EqualTemplateMetadata ¶
func (m *TemplateResourceModel) EqualTemplateMetadata(other *TemplateResourceModel) bool
EqualTemplateMetadata returns true if two templates have identical metadata (excluding ACL).
type TemplateVersion ¶
type TemplateVersion struct { ID UUID `tfsdk:"id"` Name types.String `tfsdk:"name"` Message types.String `tfsdk:"message"` Directory types.String `tfsdk:"directory"` DirectoryHash types.String `tfsdk:"directory_hash"` Active types.Bool `tfsdk:"active"` TerraformVariables []Variable `tfsdk:"tf_vars"` ProvisionerTags []Variable `tfsdk:"provisioner_tags"` }
type UUID ¶
type UUID struct { // The framework requires custom types extend a primitive or object. basetypes.StringValue // contains filtered or unexported fields }
func NewUUIDNull ¶
func NewUUIDNull() UUID
func NewUUIDUnknown ¶
func NewUUIDUnknown() UUID
func (UUID) ValidateAttribute ¶
func (v UUID) ValidateAttribute(ctx context.Context, req xattr.ValidateAttributeRequest, resp *xattr.ValidateAttributeResponse)
ValidateAttribute implements xattr.ValidateableAttribute.
type UserDataSource ¶
type UserDataSource struct {
// contains filtered or unexported fields
}
UserDataSource defines the data source implementation.
func (*UserDataSource) ConfigValidators ¶
func (d *UserDataSource) ConfigValidators(context.Context) []datasource.ConfigValidator
func (*UserDataSource) Configure ¶
func (d *UserDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*UserDataSource) Metadata ¶
func (d *UserDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*UserDataSource) Read ¶
func (d *UserDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*UserDataSource) Schema ¶
func (d *UserDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type UserDataSourceModel ¶
type UserDataSourceModel struct { // Username or ID must be set ID UUID `tfsdk:"id"` Username types.String `tfsdk:"username"` Name types.String `tfsdk:"name"` Email types.String `tfsdk:"email"` Roles types.Set `tfsdk:"roles"` // owner, template-admin, user-admin, auditor (member is implicit) LoginType types.String `tfsdk:"login_type"` // none, password, github, oidc Suspended types.Bool `tfsdk:"suspended"` AvatarURL types.String `tfsdk:"avatar_url"` OrganizationIDs types.Set `tfsdk:"organization_ids"` CreatedAt types.Int64 `tfsdk:"created_at"` // Unix timestamp LastSeenAt types.Int64 `tfsdk:"last_seen_at"` ThemePreference types.String `tfsdk:"theme_preference"` }
UserDataSourceModel describes the data source data model.
type UserResource ¶
type UserResource struct {
// contains filtered or unexported fields
}
UserResource defines the resource implementation.
func (*UserResource) Configure ¶
func (r *UserResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*UserResource) Create ¶
func (r *UserResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*UserResource) Delete ¶
func (r *UserResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*UserResource) ImportState ¶
func (r *UserResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
Req.ID can be either a UUID or a username.
func (*UserResource) Metadata ¶
func (r *UserResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*UserResource) Read ¶
func (r *UserResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*UserResource) Schema ¶
func (r *UserResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*UserResource) Update ¶
func (r *UserResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type UserResourceModel ¶
type UserResourceModel struct { ID UUID `tfsdk:"id"` Username types.String `tfsdk:"username"` Name types.String `tfsdk:"name"` Email types.String `tfsdk:"email"` Roles types.Set `tfsdk:"roles"` // owner, template-admin, user-admin, auditor (member is implicit) LoginType types.String `tfsdk:"login_type"` // none, password, github, oidc Password types.String `tfsdk:"password"` // only when login_type is password Suspended types.Bool `tfsdk:"suspended"` }
UserResourceModel describes the resource data model.
type Versions ¶
type Versions []TemplateVersion
func (Versions) ByID ¶
func (v Versions) ByID(id UUID) *TemplateVersion
type WorkspaceProxyResource ¶
type WorkspaceProxyResource struct {
// contains filtered or unexported fields
}
WorkspaceProxyResource defines the resource implementation.
func (*WorkspaceProxyResource) Configure ¶
func (r *WorkspaceProxyResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*WorkspaceProxyResource) Create ¶
func (r *WorkspaceProxyResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*WorkspaceProxyResource) Delete ¶
func (r *WorkspaceProxyResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*WorkspaceProxyResource) Metadata ¶
func (r *WorkspaceProxyResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*WorkspaceProxyResource) Read ¶
func (r *WorkspaceProxyResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*WorkspaceProxyResource) Schema ¶
func (r *WorkspaceProxyResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*WorkspaceProxyResource) Update ¶
func (r *WorkspaceProxyResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type WorkspaceProxyResourceModel ¶
type WorkspaceProxyResourceModel struct { ID UUID `tfsdk:"id"` Name types.String `tfsdk:"name"` DisplayName types.String `tfsdk:"display_name"` Icon types.String `tfsdk:"icon"` SessionToken types.String `tfsdk:"session_token"` }
WorkspaceProxyResourceModel describes the resource data model.