Unable to read modules. Modules is looking at different path

I am new to filebeat. I am trying to setup the apache module using kubernetes to get the logs from container.

I am seeing the following error:
"ERROR fileset/modules.go:125 Not loading modules. Module directory not found: /etc/filebeat/module"

I am mounting below config map to the pod in the path "/etc/filebeat/modules.d/apache.yml"
Image used: docker.elastic.co/beats/filebeat:7.1.1
apiVersion: v1
kind: ConfigMap
metadata:
name: filebeat-module
namespace: kube-system
labels:
k8s-app: filebeat
data:
apache.yml: |-
- module: apache
access:
enabled: true
var.paths: ["/var/testapp/logs//.log"]

Below configmap is mounted to "/etc/filebeat/filebeat.yml"
apiVersion: v1
kind: ConfigMap
metadata:
name: filebeat-config
namespace: kube-system
labels:
k8s-app: filebeat
data:
filebeat.yml: |-
filebeat.config:
path.config: /usr/share/filebeat/
inputs:
# Mounted filebeat-inputs configmap:
path: {path.config}/inputs.d/*.yml # Reload inputs configs as they change: reload.enabled: false modules: enabled: true path: {path.config}/modules.d/.yml
#path: /etc/modules.d/
.yml
# Reload module configs as they change:
reload.enabled: false

# To enable hints based autodiscover, remove `filebeat.config.inputs` configuration and uncomment this:
#filebeat.autodiscover:
#  providers:
#    - type: kubernetes
#      hints.enabled: true

processors:
  - add_cloud_metadata:

#cloud.id: ${ELASTIC_CLOUD_ID}
#cloud.auth: ${ELASTIC_CLOUD_AUTH}

output.elasticsearch:
  hosts: ["host:port"]
  protocol: "http"
  username: "TEST"
  password: "TEST"

What am I missing? let me know if you need any other details:

Are you missing "$" in front of {path.config}?

https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-configuration-reloading.html

Thanks Daniel for your response.

I tried with $ before and it didn't work. Do you want any other info from em to debug?