Data sources do is your make an API request to get information for the availability zone.
provider "aws" {
region = "ap-southeast-1"
access_key = "AK"
secret_key = "vb"
}
resource "aws_instance" "db" {
ami = "ami-063e3af9d2cc7fe94"
instance_type = "t2.micro"
tags = {
Name = "DB_Server"
}
}
data "aws_instance" "dbsearch" {
filter {
name = "tag:Name"
values = ["DB_Server"]
}
}
output "dbserver" {
value = data.aws_instance.dbsearch.availability_zone
}
The general art of planning, arranging and building how inhabitants and guests will best access assets and versatility choices on a regional level. Central Ohio Mobile Mechanic
ReplyDeleteThe general art of planning, arranging and building how inhabitants and guests will best access assets and versatility choices on a regional level. Cypress Mobile Truck Repair
ReplyDelete