Cannot find a definition for command

config

#1

Hi there!

I’m trying to use a community orb and am encountering a good bit of resistance and I cannot find forum posts or documentation on how to resolve. I’m getting a Cannot find a definition for command error from the following config. I have updated the security setting to allow 3rd party orbs, so that’s not it. I’m not sure why the command isn’t able to be called when I’ve included the orb :thinking:

version: 2.1

orbs:
  # source: https://circleci.com/orbs/registry/orb/devops-workflow/terraform
  terraform: devops-workflow/terraform@0.0.1

jobs:
  test:
    parallelism: 1
    shell: /bin/sh
    environment:
      DEBIAN_FRONTEND: noninteractive
    docker:
    - image: hashicorp/terraform:0.11.10
      entrypoint: ""
    steps:
      - checkout
      - terraform_fmt
      - terraform_validate
      - run:
          command: terraform init -input=false

workflows:
  test:
    jobs:
      - test


#2

Aha! The orb commands have to be namespaced by the key defined in in the orbs section! I used terraform as the key, so the commands should be invoked with that namespace like so: terraform/terraform_fmt. Here’s the updated and valid template:

version: 2.1

orbs:
  # source: https://circleci.com/orbs/registry/orb/devops-workflow/terraform
  terraform: devops-workflow/terraform@0.0.1

jobs:
  test:
    parallelism: 1
    shell: /bin/sh
    environment:
      DEBIAN_FRONTEND: noninteractive
    docker:
    - image: hashicorp/terraform:0.11.10
      entrypoint: ""
    steps:
      - checkout
      - terraform/terraform_fmt
      - terraform/terraform_validate
      - run:
          command: terraform init -input=false

workflows:
  test:
    jobs:
      - test