-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdata_source.tf
More file actions
50 lines (38 loc) · 1.13 KB
/
data_source.tf
File metadata and controls
50 lines (38 loc) · 1.13 KB
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
41
42
43
44
45
46
47
48
49
50
data "aws_ssm_parameter" "dt_update_key" {
name = var.update_key
with_decryption = false
}
data "aws_ssm_parameter" "dt_push_token" {
name = var.push_token
with_decryption = false
}
data "aws_ssm_parameter" "dt_os_sensor_hmac_token" {
count = var.os_sensor_hmac_token != "" ? 1 : 0
name = var.os_sensor_hmac_token
with_decryption = false
}
data "aws_region" "current" {}
data "aws_partition" "current" {}
data "aws_caller_identity" "current" {}
locals {
s3_list_bucket = var.lifecycle_pcaps_s3_bucket == 0 ? null : join("", ["arn:", data.aws_partition.current.partition, ":s3:::", aws_s3_bucket.vsensor_pcaps_s3[0].id])
s3_access_bucket = var.lifecycle_pcaps_s3_bucket == 0 ? null : join("", [local.s3_list_bucket, "/*"])
}
data "aws_vpc" "vsensors_asg" {
id = local.vpc_id
}
data "aws_ami" "ubuntu" {
most_recent = true
filter {
name = "name"
values = ["ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-*"]
}
filter {
name = "virtualization-type"
values = ["hvm"]
}
filter {
name = "owner-id"
values = ["099720109477"] # Canonical
}
}