Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schematics_state data source JSON output #1411

Closed
stevestrutt opened this issue May 6, 2020 · 1 comment
Closed

schematics_state data source JSON output #1411

stevestrutt opened this issue May 6, 2020 · 1 comment

Comments

@stevestrutt
Copy link
Contributor

The ibm_schematics_state data source output state_store does not output in a usable format. To be usable state_store should be outputted in JSON format equivalent to the standalone statefile format.

Currently it seems to be Terraform internal format turned into one long string.

map[lineage:6a4245a2-994a-7306-32ef-fe8d17ed2a35 outputs:map[backend_server_host_ip_addresses:map[type:[tuple [[tuple [string]]]] value:[[172.17.0.4]]] bastion_host_ip_addresses:map[type:[tuple [string]] value:[52.116.132.36]] frontend_server_host_ip_addresses:map[type:[tuple [[tuple [string string]]]] value:[[172.16.0.5 172.16.2.5]]]] resources:[map[instances:[map[attributes:map[architecture:amd64 crn:crn:v1:bluemix:public:is:us-south:::image:r006-e0039ab2-fcc8-11e9-8a36-6ffb6501dd33 id:r006-e0039ab2-fcc8-11e9-8a36-6ffb6501dd33 name:ibm-centos-7-6-minimal-amd64-1 os:centos-7-amd64 status:deprecated visibility:public] schema_version:0]] mode:data name:os provider:provider.ibm type:ibm_is_image] map[instances:[map[attributes:map[architecture:amd64 crn:crn:v1:bluemix:public:is:us-south:::image:r006-e0039ab2-fcc8-11e9-8a36-6ffb6501dd33

For Ansible dynamic inventory integration it needs to be in JSON format equivalent to the standalone format. An additional use case is backup of the statefile, which would also need to be JSON. The simplest solution would be to add a new output which is in JSON format.

@stevestrutt
Copy link
Contributor Author

@smjtd works perfectly thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant