# Index files from a folder in GCS bucket using logstash GCS plugin

**URL:** <https://discuss.elastic.co/t/index-files-from-a-folder-in-gcs-bucket-using-logstash-gcs-plugin/280384>\
**Category:** Logstash\
**Created:** [August 4, 2021, 5:12am UTC](https://discuss.elastic.co/t/index-files-from-a-folder-in-gcs-bucket-using-logstash-gcs-plugin/280384 "2021-08-04T05:12:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![madhanbaskar](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@madhanbaskar](https://discuss.elastic.co/u/madhanbaskar)\
**Post date:** [August 4, 2021, 5:12am UTC](https://discuss.elastic.co/t/index-files-from-a-folder-in-gcs-bucket-using-logstash-gcs-plugin/280384/1 "2021-08-04T05:12:42Z")

</div>

Hi,

I have a scenario where in the gcs bucket has multiple folders like dev and qa. Now by using logstash GCS plugin I have to read only the files from dev folder and not from qa. How is this possible?

The below config is not working..

input {  
google\_cloud\_storage {  
interval =\> 60  
bucket\_id =\> "my-logs-bucket"  
json\_key\_file =\> "/home/user/key.json"  
file\_matches =\> "dev/.\*json"  
codec =\> "json\_lines"  
}  
}

Can someone please help?  
Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 1, 2021, 5:13am UTC](https://discuss.elastic.co/t/index-files-from-a-folder-in-gcs-bucket-using-logstash-gcs-plugin/280384/2 "2021-09-01T05:13:15Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
