Add locations
This commit is contained in:
@@ -207,7 +207,7 @@ func dataSourceComputeRead(ctx context.Context, d *schema.ResourceData, m interf
|
||||
return diag.FromErr(flattenCompute(d, compFacts))
|
||||
}
|
||||
|
||||
func dataSourceCompute() *schema.Resource {
|
||||
func DataSourceCompute() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
SchemaVersion: 1,
|
||||
|
||||
@@ -302,7 +302,6 @@ func dataSourceCompute() *schema.Resource {
|
||||
"extra_disks": {
|
||||
Type: schema.TypeSet,
|
||||
Computed: true,
|
||||
MaxItems: constants.MaxExtraDisksPerCompute,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
},
|
||||
|
||||
@@ -35,7 +35,7 @@ import (
|
||||
"bytes"
|
||||
"hash/fnv"
|
||||
|
||||
"github.com/rudecs/terraform-provider-decort/internal/provider"
|
||||
"github.com/rudecs/terraform-provider-decort/internal/statefuncs"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"sort"
|
||||
@@ -125,7 +125,7 @@ func networkSubresourceSchemaMake() map[string]*schema.Schema {
|
||||
"net_type": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
StateFunc: provider.StateFuncToUpper,
|
||||
StateFunc: statefuncs.StateFuncToUpper,
|
||||
ValidateFunc: validation.StringInSlice([]string{"EXTNET", "VINS"}, false), // observe case while validating
|
||||
Description: "Type of the network for this connection, either EXTNET or VINS.",
|
||||
},
|
||||
|
||||
@@ -40,7 +40,7 @@ import (
|
||||
|
||||
"github.com/rudecs/terraform-provider-decort/internal/constants"
|
||||
"github.com/rudecs/terraform-provider-decort/internal/controller"
|
||||
"github.com/rudecs/terraform-provider-decort/internal/provider"
|
||||
"github.com/rudecs/terraform-provider-decort/internal/statefuncs"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
|
||||
@@ -394,7 +394,7 @@ func ResourceCompute() *schema.Resource {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
StateFunc: provider.StateFuncToUpper,
|
||||
StateFunc: statefuncs.StateFuncToUpper,
|
||||
ValidateFunc: validation.StringInSlice([]string{"KVM_X86", "KVM_PPC"}, false), // observe case while validating
|
||||
Description: "Hardware architecture of this compute instance.",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user