resource “aws_spot_instance_request” “my-spot” {
spot_price = “$.$$$”
ami = “ami-xxxxx” #
wait_for_fulfillment = true
spot_type = “persistent”
instance_interruption_behaviour = “stop”
instance_type = “my.metal”
key_name = aws_key_pair.my-key.key_name
}
The above code deploys spot in “default-vpc” and in a default subnet. Can some point me as to how to deploy the spot instance in your private vpc with private subnet and not default vpc and default subnet ???
-Girish