mirror of
https://github.com/nmasur/dotfiles
synced 2025-04-24 23:12:25 +00:00
Compare commits
No commits in common. "7ce9ed564ec31bc89960f4f2df3eb7b43cb466cc" and "6edc828ece53187ac8aa74ef138ae78d707b5edc" have entirely different histories.
7ce9ed564e
...
6edc828ece
@ -13,11 +13,6 @@ resource "aws_instance" "instance" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_ec2_instance_state" "instance" {
|
|
||||||
instance_id = aws_instance.instance.id
|
|
||||||
state = "running"
|
|
||||||
}
|
|
||||||
|
|
||||||
data "aws_vpc" "vpc" {
|
data "aws_vpc" "vpc" {
|
||||||
default = true
|
default = true
|
||||||
}
|
}
|
||||||
|
@ -14,10 +14,7 @@
|
|||||||
data "aws_s3_object" "image" {
|
data "aws_s3_object" "image" {
|
||||||
bucket = var.images_bucket
|
bucket = var.images_bucket
|
||||||
key = "arrow.vhd"
|
key = "arrow.vhd"
|
||||||
}
|
checksum_mode = "ENABLED"
|
||||||
|
|
||||||
resource "terraform_data" "image_replacement" {
|
|
||||||
input = data.aws_s3_object.image.checksum_sha256
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Setup IAM access for the VM Importer
|
# Setup IAM access for the VM Importer
|
||||||
@ -75,7 +72,7 @@ resource "aws_ebs_snapshot_import" "image" {
|
|||||||
|
|
||||||
role_name = aws_iam_role.vmimport.name
|
role_name = aws_iam_role.vmimport.name
|
||||||
lifecycle {
|
lifecycle {
|
||||||
replace_triggered_by = [terraform_data.image_replacement]
|
replace_triggered_by = [data.aws_s3_object.image.checksum_sha256]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user