Skip to content

Collector resource reports installer_url_cmds is an emtpy map #104

@loshea-bmcd

Description

@loshea-bmcd

I have created a set of collectors using terraform 1.8.3. I need to use an output from these collectors, installer_url_cmds["cUL cmd"] in a cloud init script, to build the vms that will be running the collector agent associated with these collectors. However, when terrafrom plan runs, the plan fails because of the error in the title. I can look in state and see that installer_url_cmds map is populated as expected. It seems like the provider just isnt' reading state and is assuming this to be an empty map.

Relavent state section:
"installer_url_cmds": {
"URL": "https://burnsmcdonnellsandbox.logicmonitor.com/santaba/rest/setting/collector/collectors/26/bootstraps/linux64?token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&useEA=false&monitorOthers=true&v=3&collectorSize=medium",
"Wget cmd": "wget -O LogicmonitorBootstrap64_26.bin 'https://burnsmcdonnellsandbox.logicmonitor.com/santaba/rest/setting/collector/collectors/26/bootstraps/linux64?token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&useEA=false&monitorOthers=true&v=3&collectorSize=medium'",
"cURL cmd": "curl -o LogicmonitorBootstrap64_26.bin 'https://burnsmcdonnellsandbox.logicmonitor.com/santaba/rest/setting/collector/collectors/26/bootstraps/linux64?token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&useEA=false&monitorOthers=true&v=3&collectorSize=medium'"
},

Error from terraform plan:
Error: Invalid index
on main.tf line 130, in module "primary_collector_vm":

custom_data = base64encode(logicmonitor_collector.primary_collector.installer_url_cmds["cURL cmd"])

logicmonitor_collector.primary_collector.installer_url_cmds is empty map of string
The given key does not identify an element in this collection value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions