Skip to content

bug: File Substitution For JSON #9094

@bbernays

Description

@bbernays

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Documentation in file substitution docs doesn't match current behavior.

  • Also if you use a single quote around '${file:./jsongcp.json}' --> you get the following error message:
Error: failed to load spec(s) from config.yml. Error: failed to unmarshal file config.yml: failed to convert yaml to json: yaml: line 11: did not find expected key
  • In order for unmarshalling in source spec to work the json file needs to be a string rather than an object

Expected Behavior

Should all work

CloudQuery (redacted) config

kind: source
spec:
  # Source spec section
  name: "gcp"
  # path: "cloudquery/gcp"
  # version: "v8.4.0"
  path: localhost:7777
  registry: grpc
  destinations: ["postgresql"]
  spec:
    project_ids: ["lab-account"]
    service_account_key_json: ${file:./jsongcp.json}
---
kind: destination
spec:
  # Destination spec section
  name: "postgresql"
  path: "cloudquery/postgresql"
  version: "v2.1.0"
  spec:
    connection_string: "postgresql://postgres:pass@localhost:5432/postgres?sslmode=disable"

Steps To Reproduce

No response

CloudQuery (redacted) logs

none

CloudQuery version

cloudquery version 2.3.8

Additional Context

No response

Pull request (optional)

  • I can submit a pull request

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions