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:
parent
6fd221adbb
commit
052192ebf0
@ -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' %>
|
||||
|
Loading…
x
Reference in New Issue
Block a user