spotinst / terraform-spotinst-ocean-spark

https://registry.terraform.io/modules/spotinst/ocean-spark/spotinst/latest
Apache License 2.0
2 stars 3 forks source link

Add some outputs #34

Closed Vermyndax closed 1 year ago

Vermyndax commented 1 year ago

We're starting to use this module to provision some Ocean for Spark clusters. It would be great if there were some outputs that could be consumed elsewhere by lambdas/step functions. For example, we need to provide the URL to the Ocean for Spark cluster to a lambda script. It would be much more portable if this module provided the URL as an output.

Z4ck404 commented 1 year ago

Hey @Vermyndax,

Do you mean the ocean_spark endpoint to submit apps for example ?

That's actually a static url that you can find in the ocean spark docs, that you can construct using output ocean_spark_id that we just added in the version v2.0.1 and your spotinst_account.

Something like : https://api.spotinst.io/ocean/spark/cluster/${module.ocean-spark.ocean_spark_id}/app?accountId=${var.spotinst_account}