Skip to content

Cannot unmarshal number 1757589543259 into Go struct field #114

@Luubosi

Description

@Luubosi

means that the Dependency-Track API is returning the firstOccurrence field as a very large number (most likely a timestamp in milliseconds), but the Terraform provider for Dependency-Track has this field defined as an int (32‑bit), which cannot hold such a large value.

This is a bug in the Terraform provider itself, not in your configuration.

required_providers { dependencytrack = { source = "SolarFactories/dependencytrack" version = "1.15.0" #or version = "1.14.1" }

`
Planning failed. Terraform encountered an error while generating this plan.


│ Error: Unable to get updated project

│ with dependencytrack_project.rrr,
│ on deptrack_ris.tf line 11, in resource "dependencytrack_project" "rrr":
│ 11: resource "dependencytrack_project" "rrr" {

│ Error with reading project: 54ad6d80-b5cf-4980-ae37-640e5d42e868, in original error: json: cannot unmarshal number 1757589543259 into Go struct field
│ ProjectMetrics.metrics.firstOccurrence of type int
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions