Skip to content

generate command failing with file not found error in v0.16.0 #116

@fzkhan

Description

@fzkhan

Versions

0.16.0

Operating System

Windows 64 bit

Terraform Version

NA

Steps To Reproduce

  1. Download v0.16.0
  2. Follow the steps mentioned here for API testing.
  3. On running generate command, error encountered: file not found

Expected Behavior

Not happening with v0.15.1

PS Z:\Terraform\Output>
time="2025-03-03T14:53:09+05:30" level=info msg="working directory: Z:\\Terraform\\Output"
time="2025-03-03T14:53:09+05:30" level=info msg="loading swagger spec: Z:\\Repos\\azure-rest-api-specs\\specification\\cosmos-db\\resource-manager\\Microsoft.DocumentDB\\preview\\2023-03-15-preview\\mongoCluster.json..."
time="2025-03-03T14:53:09+05:30" level=info msg="parsing swagger spec: Z:\\Repos\\azure-rest-api-specs\\specification\\cosmos-db\\resource-manager\\Microsoft.DocumentDB\\preview\\2023-03-15-preview\\mongoCluster.json..."
time="2025-03-03T14:53:09+05:30" level=info msg="found 7 api paths"
time="2025-03-03T14:53:09+05:30" level=info msg="generating terraform configurations for Microsoft.DocumentDB/locations..."
time="2025-03-03T14:53:09+05:30" level=info msg="generating terraform configurations for Microsoft.DocumentDB/mongoClusters..."
time="2025-03-03T14:53:09+05:30" level=info msg="generating terraform configurations for Microsoft.DocumentDB/mongoClusters/firewallRules..."

Actual Behavior

PS Z:\Terraform\Output> armstrong generate -path "Z:\Repos\azure-rest-api-specs\specification\cosmos-db\resource-manager\Microsoft.DocumentDB\preview\2023-03-01-preview\examples\mongo-cluster\CosmosDBMongoClusterCreate.json" -working-dir .
time="2025-03-03T14:24:15+05:30" level=info msg="working directory: Z:\\Terraform\\Output"
time="2025-03-03T14:24:15+05:30" level=info msg="provider configuration is written to Z:\\Terraform\\Output/provider.tf"
time="2025-03-03T14:24:15+05:30" level=info msg="loading example: Z:\\Repos\\azure-rest-api-specs\\specification\\cosmos-db\\resource-manager\\Microsoft.DocumentDB\\preview\\2023-03-01-preview\\examples\\mongo-cluster\\CosmosDBMongoClusterCreate.json"
time="2025-03-03T14:24:15+05:30" level=info msg="loading dependencies..."
time="2025-03-03T14:24:15+05:30" level=info msg="found 0 existing dependencies"
time="2025-03-03T14:24:16+05:30" level=fatal msg="loading azapi dependencies: open azapi_examples/README.md/basic/main.tf: file does not exist"

Additional context

azapi_examples/README.md/basic/main.tf the missing file is not a valid path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions