fix: fix flavor null ability
This commit is contained in:
parent
4ca2d6a05d
commit
70343b2193
2 changed files with 7 additions and 8 deletions
|
|
@ -82,7 +82,7 @@ type resData struct {
|
|||
Region string
|
||||
Name string
|
||||
TfName string
|
||||
FlavorID string
|
||||
FlavorID *string
|
||||
BackupSchedule string
|
||||
UseEncryption bool
|
||||
UseFlavorId bool
|
||||
|
|
@ -125,7 +125,7 @@ func getExample() resData {
|
|||
ProjectID: os.Getenv("TF_ACC_PROJECT_ID"),
|
||||
Name: name,
|
||||
TfName: name,
|
||||
FlavorID: "4.16-Single",
|
||||
FlavorID: utils.Ptr("4.16-Single"),
|
||||
BackupSchedule: "0 0 * * *",
|
||||
UseEncryption: false,
|
||||
RetentionDays: 33,
|
||||
|
|
@ -387,7 +387,6 @@ func TestAccInstanceNoEncryptionWithFlavorObject(t *testing.T) {
|
|||
data := getExample()
|
||||
|
||||
data.UseFlavorId = false
|
||||
data.FlavorID = ""
|
||||
data.FlavorCpu = 4
|
||||
data.FlavorRam = 16
|
||||
data.Replicas = 1
|
||||
|
|
@ -583,7 +582,7 @@ func basicInstanceTestChecks(testItemID string, data resData) resource.TestCheck
|
|||
resource.TestCheckResourceAttr(testItemID, "backup_schedule", data.BackupSchedule),
|
||||
|
||||
resource.TestCheckResourceAttrSet(testItemID, "flavor_id"),
|
||||
resource.TestCheckResourceAttr(testItemID, "flavor_id", data.FlavorID),
|
||||
resource.TestCheckResourceAttr(testItemID, "flavor_id", *data.FlavorID),
|
||||
|
||||
resource.TestCheckResourceAttrSet(testItemID, "id"),
|
||||
resource.TestCheckResourceAttrSet(testItemID, "instance_id"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue