Skip to content

terraform resource aws-parallelcluster_cluster, provider aws-parallelcluster: │ Error: json: cannot unmarshal number into Go struct field Change.changeSet.currentValue of type string #6997

@abazzi-neogenomics

Description

@abazzi-neogenomics

Hello there, I'm using terraform 1.6.6 and aws-parallelcluster 1.1.0
I'm able to successfully create apis and clusters (tried both 3.8.0 and 3.11.1), but when the cluster needs updating, terraform throws this error:

│   with module.clusters-3-11-1.aws-parallelcluster_cluster.managed_configs["test-tfpcluster3-slurm02"],
│   on ../modules/pcluster/main.tf line 1, in resource "aws-parallelcluster_cluster" "managed_configs":
│    1: resource "aws-parallelcluster_cluster" "managed_configs" {
│
│ Error: json: cannot unmarshal number into Go struct field Change.changeSet.currentValue of type string
│ Message: {{
│   "changeSet": [
│     {
│       "currentValue": 20,
│       "parameter": "Scheduling.SlurmQueues[main-queue].ComputeResources[large].MaxCount",
│       "requestedValue": 25
│     },
│     {
│       "currentValue": 20,
│       "parameter": "Scheduling.SlurmQueues[main-queue].ComputeResources[medium].MaxCount",
│       "requestedValue": 25
│     },
│     {
│       "currentValue": 20,
│       "parameter": "Scheduling.SlurmQueues[main-queue].ComputeResources[tiny].MaxCount",
│       "requestedValue": 25
│     }
│   ],
│   "cluster": {
│     "cloudformationStackArn": "arn:aws:cloudformation:eu-west-1:xxxxx:stack/euw1-dev-test-tfpcluster3-slurm02/b08d4580-933a-11f0-a36b-02d50a478753",
│     "cloudformationStackStatus": "UPDATE_IN_PROGRESS",
│     "clusterName": "euw1-dev-test-tfpcluster3-slurm02",
│     "clusterStatus": "UPDATE_IN_PROGRESS",
│     "region": "eu-west-1",
│     "scheduler": {
│       "type": "slurm"
│     },
│     "version": "3.11.1"
│   }
│ }
│ }

The cloudformation stack gets updated anyway (as you see it already reports it in progress) and succeeds but terraform errors out in update, the second plan/apply shows matching infrastructure.

I tried adding and removing double quotes in the template I'm using but no luck.
I tried both with the native resource aws-parallelcluster_cluster and with @gmarciani 's terraform module but I faced the same issue.

I can provide more code snippets if needed

Metadata

Metadata

Assignees

No one assigned

    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