1.1.0
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
package schemas
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
|
||||
"github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
func MakeSchemaResourceK8CI() map[string]schema.Attribute {
|
||||
return map[string]schema.Attribute{
|
||||
"name": schema.StringAttribute{
|
||||
Required: true,
|
||||
Description: "K8CI name",
|
||||
},
|
||||
"version": schema.StringAttribute{
|
||||
Required: true,
|
||||
},
|
||||
"master_driver": schema.StringAttribute{
|
||||
Required: true,
|
||||
},
|
||||
"master_image_id": schema.Int64Attribute{
|
||||
Required: true,
|
||||
},
|
||||
"max_master_count": schema.Int64Attribute{
|
||||
Required: true,
|
||||
},
|
||||
"max_worker_count": schema.Int64Attribute{
|
||||
Required: true,
|
||||
},
|
||||
"worker_image_id": schema.Int64Attribute{
|
||||
Required: true,
|
||||
},
|
||||
"worker_driver": schema.StringAttribute{
|
||||
Required: true,
|
||||
},
|
||||
"network_plugins": schema.ListAttribute{
|
||||
Required: true,
|
||||
ElementType: types.StringType,
|
||||
},
|
||||
"enabled": schema.BoolAttribute{
|
||||
Optional: true,
|
||||
},
|
||||
"permanently": schema.BoolAttribute{
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
Default: booldefault.StaticBool(true),
|
||||
// default value is true
|
||||
},
|
||||
"restore": schema.BoolAttribute{
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
Default: booldefault.StaticBool(true),
|
||||
// default value is true
|
||||
},
|
||||
"desc": schema.StringAttribute{
|
||||
Optional: true,
|
||||
},
|
||||
"gid": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"guid": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"k8ci_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"id": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
"lb_image_id": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"milestones": schema.Int64Attribute{
|
||||
Computed: true,
|
||||
},
|
||||
"shared_with": schema.ListAttribute{
|
||||
Optional: true,
|
||||
ElementType: types.Int64Type,
|
||||
},
|
||||
"status": schema.StringAttribute{
|
||||
Computed: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user