updated resources

This commit is contained in:
Manuel Ganter 2025-11-12 12:07:31 +01:00
parent cc46ee8974
commit f6f8dc17c1
No known key found for this signature in database
3 changed files with 8 additions and 10 deletions

View file

@ -27,8 +27,6 @@ type AppDataSourceModel struct {
Organization types.String `tfsdk:"organization"` Organization types.String `tfsdk:"organization"`
Version types.String `tfsdk:"version"` Version types.String `tfsdk:"version"`
Region types.String `tfsdk:"region"` Region types.String `tfsdk:"region"`
Description types.String `tfsdk:"description"`
Status types.String `tfsdk:"status"`
} }
func (d *AppDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { func (d *AppDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
@ -106,8 +104,6 @@ func (d *AppDataSource) Read(ctx context.Context, req datasource.ReadRequest, re
data.Name = types.StringValue(app.Key.Name) data.Name = types.StringValue(app.Key.Name)
data.Organization = types.StringValue(app.Key.Organization) data.Organization = types.StringValue(app.Key.Organization)
data.Version = types.StringValue(app.Key.Version) data.Version = types.StringValue(app.Key.Version)
data.Description = types.StringValue("")
data.Status = types.StringValue("")
tflog.Trace(ctx, "read an app data source") tflog.Trace(ctx, "read an app data source")

View file

@ -29,7 +29,6 @@ type AppInstanceDataSourceModel struct {
CloudletOrganization types.String `tfsdk:"cloudlet_organization"` CloudletOrganization types.String `tfsdk:"cloudlet_organization"`
Region types.String `tfsdk:"region"` Region types.String `tfsdk:"region"`
AppId types.String `tfsdk:"app_id"` AppId types.String `tfsdk:"app_id"`
Status types.String `tfsdk:"status"`
} }
func (d *AppInstanceDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { func (d *AppInstanceDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
@ -117,7 +116,6 @@ func (d *AppInstanceDataSource) Read(ctx context.Context, req datasource.ReadReq
data.Name = types.StringValue(appInstance.Key.Name) data.Name = types.StringValue(appInstance.Key.Name)
data.AppId = types.StringValue(appInstance.AppKey.Name) data.AppId = types.StringValue(appInstance.AppKey.Name)
data.Status = types.StringValue(appInstance.State)
tflog.Trace(ctx, "read an app instance data source") tflog.Trace(ctx, "read an app instance data source")

View file

@ -79,19 +79,23 @@ func (r *AppInstanceResource) Schema(ctx context.Context, req resource.SchemaReq
}, },
"app_name": schema.StringAttribute{ "app_name": schema.StringAttribute{
MarkdownDescription: "Application name", MarkdownDescription: "Application name",
Required: true, Required: false,
Optional: true,
}, },
"app_version": schema.StringAttribute{ "app_version": schema.StringAttribute{
MarkdownDescription: "Application version", MarkdownDescription: "Application version",
Required: true, Required: false,
Optional: true,
}, },
"app_organization": schema.StringAttribute{ "app_organization": schema.StringAttribute{
MarkdownDescription: "Application organization", MarkdownDescription: "Application organization",
Required: true, Required: false,
Optional: true,
}, },
"flavor_name": schema.StringAttribute{ "flavor_name": schema.StringAttribute{
MarkdownDescription: "Flavor name", MarkdownDescription: "Flavor name",
Required: true, Required: false,
Optional: true,
}, },
"state": schema.StringAttribute{ "state": schema.StringAttribute{
MarkdownDescription: "AppInstance state", MarkdownDescription: "AppInstance state",