Skip to content

DXE-4473 Error exporting property. Saving terraform files. Executing template: rules_v2024-10-21. Range can't iterate over #82

@glenthomas

Description

@glenthomas

I have a bug with the export-property command when exporting rule format 2024-10-21.

The output is:

Fetching property www.something.com [OK]
Fetching group  [OK]
Fetching property version  [OK]
Fetching property rules  [OK]
Fetching product name  [OK]
Fetching hostnames  [OK]
Fetching activation details  [OK]
Saving TF configurations  [FAIL]
Error exporting property: saving terraform project files: executing template: rules_v2024-10-21.tmpl: 
template: rules_v2024-10-21.tmpl:9347:20: executing "queryStringParameter" at <$v>: 
range can't iterate over api.blah.something.com

I have some match criteria that uses an array of strings for match values. This is from the downloaded rules JSON:

"criteria": [
    {
        "name": "queryStringParameter",
        "options": {
            "parameterName": "host",
            "matchOperator": "IS_ONE_OF",
            "values": "api.blah.something.com",
            "matchWildcardName": false,
            "matchCaseSensitiveName": true,
            "matchWildcardValue": false,
            "matchCaseSensitiveValue": true,
            "escapeValue": false
        }
    }
],

Strangely, I have similar blocks of JSON in the export that have a single array item, but include it as an array of strings rather than just a string:

"criteria": [
    {
        "name": "queryStringParameter",
        "options": {
            "parameterName": "host",
            "matchOperator": "IS_ONE_OF",
            "values": [
                "api.blah.something.com",
            ],
            "matchWildcardName": false,
            "matchCaseSensitiveName": true,
            "matchWildcardValue": false,
            "matchCaseSensitiveValue": true,
            "escapeValue": false
        }
    }
],

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions