Documentation ¶
Index ¶
- Variables
- func NewDataSource() datasource.DataSource
- func NewResource() resource.Resource
- type DataSource
- type Resource
- func (r *Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *Resource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type StackScriptModel
Constants ¶
This section is empty.
Variables ¶
View Source
var StackscriptAttributes = map[string]schema.Attribute{ "id": schema.StringAttribute{ Description: "The StackScript's unique ID.", Required: true, }, "label": schema.StringAttribute{ Description: "The StackScript's label is for display purposes only.", Computed: true, }, "script": schema.StringAttribute{ Description: "The script to execute when provisioning a new Linode with this StackScript.", Computed: true, }, "description": schema.StringAttribute{ Description: "A description for the StackScript.", Computed: true, }, "rev_note": schema.StringAttribute{ Description: "This field allows you to add notes for the set of revisions made to this StackScript.", Computed: true, }, "is_public": schema.BoolAttribute{ Description: "This determines whether other users can use your StackScript. Once a StackScript is " + "made public, it cannot be made private.", Computed: true, }, "images": schema.SetAttribute{ Description: "An array of Image IDs representing the Images that this StackScript is compatible for " + "deploying with.", ElementType: types.StringType, Computed: true, }, "deployments_active": schema.Int64Attribute{ Description: "Count of currently active, deployed Linodes created from this StackScript.", Computed: true, }, "user_gravatar_id": schema.StringAttribute{ Description: "The Gravatar ID for the User who created the StackScript.", Computed: true, }, "deployments_total": schema.Int64Attribute{ Description: "The total number of times this StackScript has been deployed.", Computed: true, }, "username": schema.StringAttribute{ Description: "The User who created the StackScript.", Computed: true, }, "created": schema.StringAttribute{ Description: "The date this StackScript was created.", Computed: true, }, "updated": schema.StringAttribute{ Description: "The date this StackScript was updated.", Computed: true, }, "user_defined_fields": schema.ListAttribute{ Description: "This is a list of fields defined with a special syntax inside this " + "StackScript that allow for supplying customized parameters during deployment.", Computed: true, ElementType: udfObjectType, }, }
Functions ¶
func NewDataSource ¶
func NewDataSource() datasource.DataSource
func NewResource ¶
Types ¶
type DataSource ¶
type DataSource struct {
helper.BaseDataSource
}
func (*DataSource) Read ¶
func (r *DataSource) Read( ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse, )
type Resource ¶
type Resource struct {
helper.BaseResource
}
func (*Resource) Create ¶
func (r *Resource) Create( ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse, )
func (*Resource) Delete ¶
func (r *Resource) Delete( ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse, )
func (*Resource) Read ¶
func (r *Resource) Read( ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse, )
func (*Resource) Update ¶
func (r *Resource) Update( ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse, )
type StackScriptModel ¶
type StackScriptModel struct { ID types.String `tfsdk:"id"` Label types.String `tfsdk:"label"` Script types.String `tfsdk:"script"` Description types.String `tfsdk:"description"` RevNote types.String `tfsdk:"rev_note"` IsPublic types.Bool `tfsdk:"is_public"` Images types.Set `tfsdk:"images"` DeploymentsActive types.Int64 `tfsdk:"deployments_active"` UserGravatarID types.String `tfsdk:"user_gravatar_id"` DeploymentsTotal types.Int64 `tfsdk:"deployments_total"` Username types.String `tfsdk:"username"` Created types.String `tfsdk:"created"` Updated types.String `tfsdk:"updated"` UserDefinedFields basetypes.ListValue `tfsdk:"user_defined_fields"` }
StackScriptModel describes the Terraform resource data model to match the resource schema.
func (*StackScriptModel) ParseComputedAttributes ¶
func (data *StackScriptModel) ParseComputedAttributes( ctx context.Context, stackscript *linodego.Stackscript, ) diag.Diagnostics
func (*StackScriptModel) ParseNonComputedAttributes ¶
func (data *StackScriptModel) ParseNonComputedAttributes( ctx context.Context, stackscript *linodego.Stackscript, ) diag.Diagnostics
Source Files ¶
Click to show internal directories.
Click to hide internal directories.