@@ -66,6 +66,12 @@ func resourceSumologicScheduledView() *schema.Resource {
6666 Type : schema .TypeBool ,
6767 Optional : true ,
6868 },
69+ "time_zone" : {
70+ Type : schema .TypeString ,
71+ Optional : true ,
72+ Computed : true ,
73+ Description : "Time zone for ingesting data in scheduled view. Follow the format in the IANA Time Zone Database." ,
74+ },
6975 },
7076 }
7177}
@@ -74,6 +80,12 @@ func resourceSumologicScheduledViewCreate(d *schema.ResourceData, meta interface
7480 c := meta .(* Client )
7581 if d .Id () == "" {
7682 sview := resourceToScheduledView (d )
83+
84+ // add timeZone if specified
85+ if v , ok := d .GetOk ("time_zone" ); ok {
86+ sview .TimeZone = v .(string )
87+ }
88+
7789 createdSview , err := c .CreateScheduledView (sview )
7890
7991 if err != nil {
@@ -112,6 +124,7 @@ func resourceSumologicScheduledViewRead(d *schema.ResourceData, meta interface{}
112124 d .Set ("retention_period" , sview .RetentionPeriod )
113125 d .Set ("data_forwarding_id" , sview .DataForwardingId )
114126 d .Set ("parsing_mode" , sview .ParsingMode )
127+ d .Set ("time_zone" , sview .TimeZone )
115128
116129 return nil
117130}
@@ -122,6 +135,10 @@ func resourceSumologicScheduledViewDelete(d *schema.ResourceData, meta interface
122135func resourceSumologicScheduledViewUpdate (d * schema.ResourceData , meta interface {}) error {
123136 sview := resourceToScheduledView (d )
124137
138+ if d .HasChange ("time_zone" ) {
139+ sview .TimeZone = d .Get ("time_zone" ).(string )
140+ }
141+
125142 c := meta .(* Client )
126143 err := c .UpdateScheduledView (sview )
127144
0 commit comments