1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

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

Otherwise there will be duplicites for multiple hosts

(cherry picked from commit 1bcc970ba317058384b34523edd2f97b97bdcb8e)
This commit is contained in:
Jan Orel 2022-03-22 09:19:56 +01:00 committed by Ruben S. Montero
parent 6fd221adbb
commit 052192ebf0
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87
2 changed files with 17 additions and 17 deletions

View File

@ -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'%>"

View File

@ -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' %>