How do I Run Scripts in Private VPC Without Leaving Resources Behind?

Let's say I launched this amazing application in my private AWS VPC through terraform. But that application still needs a few API calls to be fully configured.

I can't call the API from a local-exec because it's in a private VPC. How do I launch the code that can make those API calls?

Ideally if there was a dedicated K8 Cluster running in the VPC, I can just launch a kubernetes job through terraform and see it to its completion in a terraform-native way.

However, if I don't have that luxury, what do I do? Do I launch some server with userdata to make the API calls and then delete that server using a null-resource? Is there a good way to do this that doesn't require hacks or leaving any resources behind?

submitted by /u/Pumpkin-Main
[link] [comments]

Read more here: https://www.reddit.com/r/Terraform/comments/oo9ufn/how_do_i_run_scripts_in_private_vpc_without/

Content Attribution

This content was originally published by /u/Pumpkin-Main at Terraform, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: