Documentation ¶
Index ¶
- func New(version string, logLevel string) func() provider.Provider
- func NewExampleDataSource() datasource.DataSource
- func NewImageResource() resource.Resource
- func NewVmResource() resource.Resource
- type ImageDataSource
- func (d *ImageDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *ImageDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *ImageDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *ImageDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type ImageDataSourceModel
- type ImageResource
- func (r *ImageResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *ImageResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *ImageResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *ImageResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *ImageResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *ImageResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *ImageResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *ImageResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type ImageResourceModel
- type SayaExecutionCtx
- type SayaProvider
- func (p *SayaProvider) Configure(ctx context.Context, req provider.ConfigureRequest, ...)
- func (p *SayaProvider) DataSources(ctx context.Context) []func() datasource.DataSource
- func (p *SayaProvider) Metadata(ctx context.Context, req provider.MetadataRequest, ...)
- func (p *SayaProvider) Resources(ctx context.Context) []func() resource.Resource
- func (p *SayaProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
- type SayaProviderModel
- type SayaProviderModelHttpAuthBasic
- type SayaProviderModelHttpRepo
- type SayaProviderModelS3Repo
- type SayaProviderModelS3RepoCred
- type VmResource
- func (r *VmResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *VmResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *VmResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *VmResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *VmResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *VmResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *VmResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *VmResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type VmResourceModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExampleDataSource ¶
func NewExampleDataSource() datasource.DataSource
func NewImageResource ¶
func NewVmResource ¶
Types ¶
type ImageDataSource ¶
type ImageDataSource struct {
// contains filtered or unexported fields
}
ImageDataSource defines the data source implementation.
func (*ImageDataSource) Configure ¶
func (d *ImageDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*ImageDataSource) Metadata ¶
func (d *ImageDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*ImageDataSource) Read ¶
func (d *ImageDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*ImageDataSource) Schema ¶
func (d *ImageDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type ImageDataSourceModel ¶
type ImageDataSourceModel struct { Name types.String `tfsdk:"name"` ImgType types.String `tfsdk:"img_type"` Platform types.String `tfsdk:"platform"` Id types.String `tfsdk:"id"` Sha256 types.String `tfsdk:"sha256"` OsVariant types.String `tfsdk:"os_variant"` Filters types.Map `tfsdk:"filters"` }
ImageDataSourceModel describes the data source data model.
type ImageResource ¶
type ImageResource struct {
// contains filtered or unexported fields
}
ImageResource defines the resource implementation.
func (*ImageResource) Configure ¶
func (r *ImageResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*ImageResource) Create ¶
func (r *ImageResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*ImageResource) Delete ¶
func (r *ImageResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*ImageResource) ImportState ¶
func (r *ImageResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*ImageResource) Metadata ¶
func (r *ImageResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*ImageResource) Read ¶
func (r *ImageResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*ImageResource) Schema ¶
func (r *ImageResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*ImageResource) Update ¶
func (r *ImageResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type ImageResourceModel ¶
type ImageResourceModel struct { Name types.String `tfsdk:"name"` ImgType types.String `tfsdk:"img_type"` Platform types.String `tfsdk:"platform"` Hash types.String `tfsdk:"hash"` Id types.String `tfsdk:"id"` Sha256 types.String `tfsdk:"sha256"` KeepLocally types.Bool `tfsdk:"keep_locally"` RepoType types.String `tfsdk:"repo_type"` }
ImageResourceModel describes the resource data model.
type SayaExecutionCtx ¶
type SayaExecutionCtx struct { SayaExe string // saya executable command or path, default to saya Config string // saya yaml config path Forge string // forge(local image store+ work directory, etc.) path LicenseKey opaque.String // License key LogLevel string // contains filtered or unexported fields }
func (*SayaExecutionCtx) HttpRepo ¶
func (exeCtx *SayaExecutionCtx) HttpRepo() *saya.HttpRepo
func (*SayaExecutionCtx) S3Repo ¶
func (exeCtx *SayaExecutionCtx) S3Repo() *saya.S3Repo
func (*SayaExecutionCtx) ToRequestSayaCtx ¶
func (exeCtx *SayaExecutionCtx) ToRequestSayaCtx() saya.RequestSayaCtx
type SayaProvider ¶
type SayaProvider struct {
// contains filtered or unexported fields
}
SayaProvider defines the provider implementation.
func (*SayaProvider) Configure ¶
func (p *SayaProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse)
func (*SayaProvider) DataSources ¶
func (p *SayaProvider) DataSources(ctx context.Context) []func() datasource.DataSource
func (*SayaProvider) Metadata ¶
func (p *SayaProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse)
func (*SayaProvider) Resources ¶
func (p *SayaProvider) Resources(ctx context.Context) []func() resource.Resource
func (*SayaProvider) Schema ¶
func (p *SayaProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
type SayaProviderModel ¶
type SayaProviderModel struct { Exe types.String `tfsdk:"exe"` Config types.String `tfsdk:"config"` Forge types.String `tfsdk:"forge"` LicenseKey types.String `tfsdk:"license_key"` HttpRepo types.Object `tfsdk:"http_repo"` S3Repo types.Object `tfsdk:"s3_repo"` }
SayaProviderModel describes the provider data model. @mind no LogLevel because terraform sets it throw environment variable so we are following the lead.
type SayaProviderModelHttpRepo ¶
type SayaProviderModelHttpRepo struct { RepoUrl string `tfsdk:"url"` BasePath string `tfsdk:"base_path"` UploadStrategy string `tfsdk:"upload_strategy"` AuthHttpBasic SayaProviderModelHttpAuthBasic `tfsdk:"basic_auth"` }
func (SayaProviderModelHttpRepo) NormalizeToNil ¶
func (repo SayaProviderModelHttpRepo) NormalizeToNil() *SayaProviderModelHttpRepo
type SayaProviderModelS3Repo ¶
type SayaProviderModelS3RepoCred ¶
type SayaProviderModelS3RepoCred struct { AccessKeyID string `tfsdk:"access_key_id"` SecretAccessKey string `tfsdk:"secret_access_key"` SessionToken string `tfsdk:"session_token"` Source string `tfsdk:"source"` CanExpire bool `tfsdk:"can_expire"` Expires string `tfsdk:"expires"` }
func (*SayaProviderModelS3RepoCred) AsSayaCred ¶
func (credTf *SayaProviderModelS3RepoCred) AsSayaCred() (*saya.AwsCredentials, error)
type VmResource ¶
type VmResource struct {
// contains filtered or unexported fields
}
VmResource defines the resource implementation.
func (*VmResource) Configure ¶
func (r *VmResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*VmResource) Create ¶
func (r *VmResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*VmResource) Delete ¶
func (r *VmResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*VmResource) ImportState ¶
func (r *VmResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*VmResource) Metadata ¶
func (r *VmResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*VmResource) Read ¶
func (r *VmResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*VmResource) Schema ¶
func (r *VmResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*VmResource) Update ¶
func (r *VmResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type VmResourceModel ¶
type VmResourceModel struct { Name types.String `tfsdk:"name"` Image types.String `tfsdk:"image"` ComputeType types.String `tfsdk:"compute_type"` Id types.String `tfsdk:"id"` State types.String `tfsdk:"state"` // steady state of the vm; started | stopped (what about hibernate e.g. for aws) OsVariant types.String `tfsdk:"os_variant"` KeepOnDelete types.Bool `tfsdk:"keep_on_delete"` // true if vm is not to be delete even vm double in terraform state will }
VmResourceModel describes the resource data model.
Click to show internal directories.
Click to hide internal directories.