# Filebeat gcp module keeps getting hash config error when setting up

**URL:** <https://discuss.elastic.co/t/filebeat-gcp-module-keeps-getting-hash-config-error-when-setting-up/273643>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 21, 2021, 9:06am UTC](https://discuss.elastic.co/t/filebeat-gcp-module-keeps-getting-hash-config-error-when-setting-up/273643 "2021-05-21T09:06:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevensim226](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stevensim226/32/89071_2.png) [@stevensim226](https://discuss.elastic.co/u/stevensim226)\
**Post date:** [May 21, 2021, 9:06am UTC](https://discuss.elastic.co/t/filebeat-gcp-module-keeps-getting-hash-config-error-when-setting-up/273643/1 "2021-05-21T09:06:19Z")

</div>

According to this [docs](https://www.elastic.co/guide/en/beats/filebeat/7.x/filebeat-module-gcp.html), I have set up the `gcp.yml` file as written with the settings intact (firewall and vpcflow is `enable: false`)

But i keep getting this error whenever I run `sudo filebeat setup -e`

```auto
2021-05-21T09:02:25.232Z	ERROR	cfgfile/reload.go:258	Error loading configuration files: 1 error: Unable to hash given config: missing field accessing '0.firewall' (source:'/etc/filebeat/modules.d/gcp.yml')
Loaded Ingest pipelines

```

My full `gcp.yml` file is as below

```auto
- module: gcp
  vpcflow:
    enabled: false
    var.project_id: my-gcp-project-id
    var.topic: gcp-vpc-flowlogs
    var.subscription_name: filebeat-gcp-vpc-flowlogs-sub
    var.credentials_file: ${path.config}/gcp-service-account-xyz.json
    #var.internal_networks: ["private"]

  firewall:
    enabled: false
    var.project_id: my-gcp-project-id
    var.topic: gcp-vpc-firewall
    var.subscription_name: filebeat-gcp-firewall-sub
    var.credentials_file: ${path.config}/gcp-service-account-xyz.json
    #var.internal_networks: ["private"]

  audit:
    enabled: true
    var.project_id: <my prod name>
    var.topic: sample_topic
    var.subscription_name: filebeat-gcp-audit
    var.credentials_file: ${path.config}/<something>.<something>

```

---

<div class="post-metadata">

**Author:** ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)\
**Post date:** [May 24, 2021, 8:00am UTC](https://discuss.elastic.co/t/filebeat-gcp-module-keeps-getting-hash-config-error-when-setting-up/273643/2 "2021-05-24T08:00:39Z")

</div>

Did you try transforming them into this configuration format: [beats/gcp.yml.disabled at master · elastic/beats · GitHub](https://github.com/elastic/beats/blob/master/x-pack/metricbeat/modules.d/gcp.yml.disabled) ?

---

<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:** [June 21, 2021, 10:01am UTC](https://discuss.elastic.co/t/filebeat-gcp-module-keeps-getting-hash-config-error-when-setting-up/273643/3 "2021-06-21T10:01:03Z")

</div>

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