M #-: OneProvision: move ami search to cluster (#1865)

Otherwise there will be duplicites for multiple hosts

(cherry picked from commit 1bcc970ba3)
This commit is contained in:
Jan Orel authored and Ruben S. Montero committed 2022-03-22 09:21:00 +01:00
1 parent 6fd221adbb
commit 052192ebf0
2 files changed
+17 -17

No files matched your search

@@ -1,3 +1,20 @@
data "aws_ami" "ubuntu2004" {
most_recent = true
filter {
name = "name"
values = ["ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"]
}
filter {
name = "virtualization-type"
values = ["hvm"]
}
owners = ["099720109477"]
}
resource "aws_vpc" "device_<%= obj['ID'] %>" {
cidr_block = "<%= provision['CIDR'] ? provision['CIDR'] : '10.0.0.0/16'%>"
@@ -1,20 +1,3 @@
data "aws_ami" "ubuntu2004" {
most_recent = true
filter {
name = "name"
values = ["ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"]
}
filter {
name = "virtualization-type"
values = ["hvm"]
}
owners = ["099720109477"]
}
resource "aws_instance" "device_<%= obj['ID'] %>" {
<% if provision['AMI'] == 'default' %>