@@ -28,9 +28,11 @@ func resourceSumologicPartition() *schema.Resource {
2828 ValidateFunc : validation .StringLenBetween (0 , 16384 ),
2929 },
3030 "analytics_tier" : {
31- Type : schema .TypeString ,
32- Required : true ,
33- ForceNew : false ,
31+ Type : schema .TypeString ,
32+ Optional : true ,
33+ ForceNew : false ,
34+ ValidateFunc : validation .StringInSlice ([]string {"enhanced" , "basic" , "cold" }, false ),
35+ Default : "enhanced" ,
3436 },
3537 // Terraform does not support reducing the retention period after creation
3638 "retention_period" : {
@@ -71,7 +73,6 @@ func resourceSumologicPartitionCreate(d *schema.ResourceData, meta interface{})
7173 }
7274
7375 d .SetId (createdSpartition .ID )
74- d .Set ("retention_period" , createdSpartition .RetentionPeriod )
7576 }
7677
7778 return resourceSumologicPartitionUpdate (d , meta )
@@ -98,7 +99,7 @@ func resourceSumologicPartitionRead(d *schema.ResourceData, meta interface{}) er
9899 d .Set ("name" , spartition .Name )
99100 d .Set ("analytics_tier" , spartition .AnalyticsTier )
100101 d .Set ("retention_period" , spartition .RetentionPeriod )
101- d .Set ("is_compliant" , spartition .RetentionPeriod )
102+ d .Set ("is_compliant" , spartition .IsCompliant )
102103 d .Set ("data_forwarding_id" , spartition .DataForwardingId )
103104
104105 return nil
0 commit comments