Error: error parsing mongodb-deployment.yaml: error converting YAML to JSON: yaml: line 27: did not find expected key

I am doing a lab about kubernetes Can you help me?

I have create the YAML file, but when I am trying to deploy it a shell shows me this error:

> error: error parsing mongodb-deployment.yaml: error converting YAML to JSON: yaml: line 27: did not find expected key

This is the yaml file for MongoDB for Kubernetes

apiVersion: apps/v1
kind: Deployment
metadata:
 name: mongodb-deployment
 labels:
   app: mongodb
spec:
  replicas: 1
  selector:
   matchLabels:
     app: mongodb
   template:
     metadata:
       labels:
         app: mongodb
     spec:
       containers:
       - name: mongodb
         image: mongo
         ports:
         - containerPort: 27017
         env:
         - name: MONGO_INITDB_ROOT_USERNAME
           valueFROM:
             secretKeyRef:
                name: mongodb-secret
                key: mongo-root-username
         - name: MONGO_INITDB_ROOT_PASSWORD
           valueFROM:
             secretKeyRef: 
                name: mongodb-secret
                key: mongo-root-password

valueFROM should be valueFrom and the tabbings is wrong all over the place. YAML is really picky about how far things get indented.

The reason I could spot this is because of the lines I see in vscode:

Here’s a corrected version:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: mongodb-deployment
  labels:
    app: mongodb
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mongodb
  template:
    metadata:
      labels:
        app: mongodb
    spec:
      containers:
      - name: mongodb
        image: mongo
        ports:
        - containerPort: 27017
        env:
        - name: MONGO_INITDB_ROOT_USERNAME
          valueFrom:
            secretKeyRef:
               name: mongodb-secret
               key: mongo-root-username
        - name: MONGO_INITDB_ROOT_PASSWORD
          valueFrom:
            secretKeyRef: 
               name: mongodb-secret
               key: mongo-root-password

thank you very much!!!