Skip to content

Commit 1d024cb

Browse files
author
Naman Goyal
committed
SUMO-162542: added 'enabled' field to the data forwarding destination
1 parent 80d1975 commit 1d024cb

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

sumologic/resource_sumologic_data_forwarding_destination.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ func resourceSumologicDataForwardingDestination() *schema.Resource {
5858
},
5959
},
6060
},
61+
"enabled": {
62+
Type: schema.TypeBool,
63+
Optional: true,
64+
Default: false,
65+
},
6166
"s3_region": {
6267
Type: schema.TypeString,
6368
Optional: true,
@@ -124,6 +129,7 @@ func resourceSumologicDataForwardingDestinationRead(d *schema.ResourceData, meta
124129
d.Set("description", dataForwardingDestination.Description)
125130
d.Set("bucket_name", dataForwardingDestination.BucketName)
126131
d.Set("S3_region", dataForwardingDestination.S3Region)
132+
d.Set("enabled", dataForwardingDestination.Enabled)
127133
d.Set("S3_server_side_encryption", dataForwardingDestination.S3ServerSideEncryption)
128134

129135
return nil
@@ -149,6 +155,7 @@ func resourceToDataForwardingDestination(d *schema.ResourceData) DataForwardingD
149155
AccessKey: authentication["access_key"].(string),
150156
SecretKey: authentication["secret_key"].(string),
151157
RoleArn: authentication["role_arn"].(string),
158+
Enabled: d.Get("enabled").(bool),
152159
S3Region: d.Get("s3_region").(string),
153160
S3ServerSideEncryption: d.Get("s3_server_side_encryption").(bool),
154161
}

sumologic/sumologic_data_forwarding_destination.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ type DataForwardingDestination struct {
6767
AccessKey string `json:"accessKeyId,omitempty"`
6868
SecretKey string `json:"secretAccessKey,omitempty"`
6969
RoleArn string `json:"roleArn,omitempty"`
70+
Enabled bool `json:"enabled"`
7071
S3Region string `json:"region,omitempty"`
7172
S3ServerSideEncryption bool `json:"encrypted"`
7273
}

0 commit comments

Comments
 (0)