-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.tf
More file actions
69 lines (64 loc) · 2.22 KB
/
data.tf
File metadata and controls
69 lines (64 loc) · 2.22 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# ----------------------------------------------------------------------------------------------------------------------
# variables
# ----------------------------------------------------------------------------------------------------------------------
variable "management_addrs" {}
variable "instance_type" {}
variable "aws-access-key" {}
variable "aws-secret-key" {}
variable "aws-region" {}
variable "aws-az" {}
variable "aws-ecs-cluster" {}
variable "tenancy" {}
variable "ssl-cert" {}
variable "env" {}
variable "mongodb" {}
variable "mongodb-secrets" {}
variable "elasticache_auth" {}
variable "mq-secrets" {}
variable "aws-account-id" {}
#-----------------------------------------------------------------------------------------------------------------------
# data
# ----------------------------------------------------------------------------------------------------------------------
data "aws_caller_identity" "current" {
}
#-----------------------------------------------------------------------------------------------------------------------
# Ubuntu AMI
# ----------------------------------------------------------------------------------------------------------------------
data "aws_ami" "ubuntu-2204" {
most_recent = true
owners = ["099720109477"]
filter {
name = "name"
values = ["ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-20240301"]
}
filter {
name = "root-device-type"
values = ["ebs"]
}
filter {
name = "virtualization-type"
values = ["hvm"]
}
}
data "aws_ssm_parameter" "ecs_node_ami" {
name = "/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id"
}
#-----------------------------------------------------------------------------------------------------------------------
# Ubuntu AMI
# ----------------------------------------------------------------------------------------------------------------------
data "aws_ami" "ccscanner" {
most_recent = true
owners = ["749985416486"]
filter {
name = "name"
values = ["ccscanner-1719869458"]
}
filter {
name = "root-device-type"
values = ["ebs"]
}
filter {
name = "virtualization-type"
values = ["hvm"]
}
}