Files
terraform-provider-dynamix/internal/service/cloudbroker/rg/schemas/schema_data_source_rg_affinity_group_computes.go
asteam 003e4d656e 1.0.1
2024-08-23 16:55:50 +03:00

60 lines
1.5 KiB
Go

package schemas
import (
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
"github.com/hashicorp/terraform-plugin-framework/types"
)
func MakeSchemaDataSourceRGAffinityGroupComputes() map[string]schema.Attribute {
return map[string]schema.Attribute{
// required attributes
"rg_id": schema.Int64Attribute{
Required: true,
Description: "find by rg id",
},
"affinity_group": schema.StringAttribute{
Required: true,
Description: "Affinity group label",
},
//computed attributes
"id": schema.StringAttribute{
Computed: true,
},
"items": schema.ListNestedAttribute{
Computed: true,
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
"compute_id": schema.Int64Attribute{
Computed: true,
},
"other_node": schema.ListAttribute{
Computed: true,
ElementType: types.Int64Type,
},
"other_node_indirect": schema.ListAttribute{
Computed: true,
ElementType: types.Int64Type,
},
"other_node_indirect_soft": schema.ListAttribute{
Computed: true,
ElementType: types.Int64Type,
},
"other_node_soft": schema.ListAttribute{
Computed: true,
ElementType: types.Int64Type,
},
"same_node": schema.ListAttribute{
Computed: true,
ElementType: types.Int64Type,
},
"same_node_soft": schema.ListAttribute{
Computed: true,
ElementType: types.Int64Type,
},
},
},
},
}
}