Daniel
Daniel

Reputation: 61

aws ec2 import-image via Terraform

I'm searching for the Terraform equivalent of "aws ec2 import-image --description "Windows 2008 OVA" --license-type --disk-containers file://containers.json" but cannot find a matching resource command in the documentation.

The purpose is to lift an OVA image out of S3 and covert to AMI so it can be used to launch EC2 instances.

Upvotes: 1

Views: 1130

Answers (2)

leraning
leraning

Reputation: 441

https://github.com/terraform-providers/terraform-provider-aws/issues/5998

Right now terraform not supporting for ec2 image import

Upvotes: 0

Sudharsan Sivasankaran
Sudharsan Sivasankaran

Reputation: 5887

There is an option in packer where you can create OVA by a builder and upload it to S3 and then create an AMI. Once you have the AMI, you can inject into your terraform script to launch it.

https://www.packer.io/docs/post-processors/amazon-import.html

Upvotes: 0

Related Questions