-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.tf
40 lines (32 loc) · 948 Bytes
/
data.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Data source for the latest Amazon Linux 2 AMI
data "aws_ami" "latest_amazon_linux" {
most_recent = true
filter {
name = "name"
values = ["amzn2-ami-hvm-*-x86_64-gp2"]
}
filter {
name = "owner-id"
values = ["137112412989"] # Amazon's AWS account ID for AL2 AMIs
}
}
# Data source for the availability zones
data "aws_availability_zones" "available" {}
# Data source to find a hypothetical ARN for a certificate
data "aws_acm_certificate" "issued" {
domain = "tf.demo.net"
types = ["AMAZON_ISSUED"]
most_recent = true
}
# Data source for a hypothetical SNS topic to be used form CloudWatch Alarms
data "aws_sns_topic" "alert" {
name = "alert_topic"
}
# Data source for S3 bucket used for logging
data "aws_s3_bucket" "lb_logs" {
bucket = "loadbalancer-logs"
}
# Get the KMS key created for Secrets Manager
data "aws_kms_key" "secret-manager" {
key_id = "alias/demo-app-secrets-manager"
}