Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stacktrace when No Backend Provided #686

Open
jakeyheath opened this issue Jul 18, 2022 · 0 comments
Open

Stacktrace when No Backend Provided #686

jakeyheath opened this issue Jul 18, 2022 · 0 comments

Comments

@jakeyheath
Copy link
Contributor

jheath@CZIMACOS2953 happy-infra % fogg apply
panic: Invalid backend kind of 

goroutine 1 [running]:
github.com/chanzuckerberg/fogg/plan.(*Plan).buildEnvs(0xc0004eac00, 0xc0000b6820)
        /home/runner/work/fogg/fogg/plan/plan.go:500 +0x1455
github.com/chanzuckerberg/fogg/plan.Eval(0xc0000b6820)
        /home/runner/work/fogg/fogg/plan/plan.go:350 +0x245
github.com/chanzuckerberg/fogg/apply.Apply({0x1e4d318, 0xc00008e060}, 0x1b49f09, 0x25bb320, 0x0)
        /home/runner/work/fogg/fogg/apply/apply.go:41 +0xdd
github.com/chanzuckerberg/fogg/cmd.glob..func1(0x25927c0, {0x1b44c4c, 0x0, 0x0})
        /home/runner/work/fogg/fogg/cmd/apply.go:51 +0x119
github.com/spf13/cobra.(*Command).execute(0x25927c0, {0x25ec948, 0x0, 0x0})
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:872 +0x624
github.com/spf13/cobra.(*Command).ExecuteC(0x25936c0)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:990 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:918
github.com/chanzuckerberg/fogg/cmd.Execute()
        /home/runner/work/fogg/fogg/cmd/root.go:70 +0x10d
main.main()
        /home/runner/work/fogg/fogg/main.go:13 +0x4b

No default backend and no backend set for the environment. The YAML file:

defaults:
  owner: [email protected]
  project: happy
  providers: {}
  terraform_version: 0.13.5
accounts: {}
modules:
  happy-env: {}
  happy-stack: {}
envs:
  dogfood:
    components:
      root:
        depends_on:
          accounts: []
          components: []
      env-rdev:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "626314663667"
            role: tfe-si
            region: us-west-2
            version: 3.48.0
      env-staging:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "626314663667"
            role: tfe-si
            region: us-west-2
            version: 3.48.0
      env-prod:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "626314663667"
            role: tfe-si
            region: us-west-2
            version: 3.48.0
  infrasec:
    components:
      root:
        depends_on:
          accounts: []
          components: []
      env-rdev:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "626314663667"
            role: tfe-si
            region: us-west-2
            version: 3.48.0
      env-staging:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "626314663667"
            role: tfe-si
            region: us-west-2
            version: 3.48.0
      env-prod:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "626314663667"
            role: tfe-si
            region: us-west-2
            version: 3.48.0
    backend:
      kind: remote
      host_name: si.prod.tfe.czi.technology
      organization: happy-infrasec
  dataportal:
    components:
      root:
        depends_on:
          accounts: []
          components: []
      env-dev:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "699936264352"
            role: tfe-si
            region: us-west-2
            version: 3.48.0
      env-rdev:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "699936264352"
            role: tfe-si
            region: us-west-2
            version: 3.48.0
      env-stage:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "699936264352"
            role: tfe-si
            region: us-west-2
            version: 3.48.0
      env-prod:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "231426846575"
            role: tfe-si
            region: us-west-2
            version: 3.48.0
    backend:
      kind: remote
      host_name: si.prod.tfe.czi.technology
      organization: happy-singlecell
  genepi:
    components:
      root:
        depends_on:
          accounts: []
          components: []
      env-rdev:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "473004499091"
            role: tfe-si
            region: us-west-2
            version: 3.48.0
      env-staging:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "473004499091"
            role: tfe-si
            region: us-west-2
            version: 3.48.0
      env-prod:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "829407189049"
            role: tfe-si
            region: us-west-2
            version: 3.48.0
    backend:
      kind: remote
      host_name: si.prod.tfe.czi.technology
      organization: happy-genepi
  sci-imaging:
    components:
      root:
        depends_on:
          accounts: []
          components: []
      env-dev:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "516466186502"
            role: tfe-si
            region: us-west-2
            version: 3.48.0
      env-staging:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "516466186502"
            role: tfe-si
            region: us-west-2
            version: 3.48.0
      env-prod:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "516466186502"
            role: tfe-si
            region: us-west-2
            version: 3.48.0
    backend:
      kind: remote
      host_name: si.prod.tfe.czi.technology
      organization: happy-sci-imaging
  playground:
    components:
      root:
        depends_on:
          accounts: []
          components: []
      env-rdev:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "401986845158"
            role: tfe-si
            region: us-west-2
            version: 2.65.0
      env-staging:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "401986845158"
            role: tfe-si
            region: us-west-2
            version: 2.65.0
      env-prod:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "401986845158"
            role: tfe-si
            region: us-west-2
            version: 2.65.0
    backend:
      kind: remote
      host_name: si.prod.tfe.czi.technology
      organization: happy-playground
  eng-portal:
    components:
      root:
        depends_on:
          accounts: []
          components: []
      env-rdev:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "401986845158"
            role: tfe-si
            region: us-west-2
            version: 2.65.0
      env-staging:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "626314663667"
            role: tfe-si
            region: us-west-2
            version: 2.65.0
      env-prod:
        depends_on:
          accounts: []
          components: []
        providers:
          aws:
            account_id: "626314663667"
            role: tfe-si
            region: us-west-2
            version: 2.65.0
    backend:
      kind: remote
      host_name: si.prod.tfe.czi.technology
      organization: happy-eng-portal
  ie:
    providers:
      aws:
        account_id: "626314663667"
        role: tfe-si
        region: us-west-2
        version: 2.65.0
    depends_on:
      accounts: []
      components: []
    components:
      root:
      env-rdev: {}
      env-staging: {}
      env-prod: {}
      env-rdev-czi-ml-api: {}
      env-staging-czi-ml-api: {}
      env-prod-czi-ml-api: {}
    backend:
      kind: remote
      host_name: si.prod.tfe.czi.technology
      organization: happy-ie
version: 2

Should throw an error instead of a stacktrace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant