📜  使用 terraform 创建 aws ec2 实例 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:17.135000             🧑  作者: Mango

代码示例1
#create aws ec2 instance using terraform
provider "aws" {
  region = "ap-south-1"

}
resource "aws_instance" "ec2" {
  ami = "ami-019f0583716f0aec4" //ap-south-1
  instance_type = "t2.micro"
  tags = {
    Name = "visualscrapy"
  }
}
#you can get the ami-id from amzon marketplace