We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Have a question? Please checkout our Slack Community or visit our Slack Archive.
Add option for setting capacity_reservation_id param in the aws_instance resource.
capacity_reservation_id
aws_instance
Launch an EC2 instance using a pre-existing Capacity Reservation
# AWS Capacity Reservation resource "aws_ec2_capacity_reservation" "win_g4dn_xlarge_usw2a" { instance_type = "g4dn.xlarge" availability_zone = "us-west2-a" instance_platform = "Windows" instance_count = 1 } # AWS Instance module "instance_from_capacity_reservation" { source = "cloudposse/ec2-instance/aws" version = "x.x.x" ... ... capacity_reservation_id = aws_ec2_capacity_reservation.win_g4dn_xlarge_usw2a.id ... ... }
I'm not sure if the solution would be something as simple as adding:
variable "capacity_reservation_id" { type = string default = null description = "The ID of the Capacity Reservation in which to run the instance" }
resource "aws_instance" "default" { ... ... capacity_reservation_specification { capacity_reservation_target { capacity_reservation_id = var.capacity_reservation_id != null ? var.capacity_reservation_id : null } } ... ... }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Have a question? Please checkout our Slack Community or visit our Slack Archive.
Describe the Feature
Add option for setting
capacity_reservation_id
param in theaws_instance
resource.Expected Behavior
Launch an EC2 instance using a pre-existing Capacity Reservation
Describe Ideal Solution
Additional Context
I'm not sure if the solution would be something as simple as adding:
The text was updated successfully, but these errors were encountered: