forked from rancher/terraform-rancher-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.tf
67 lines (55 loc) · 1.28 KB
/
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
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
data "aws_vpc" "default" {
default = var.vpc_id == null ? true : false
id = var.vpc_id
}
data "aws_subnet_ids" "available" {
vpc_id = data.aws_vpc.default.id
}
data "aws_route53_zone" "dns_zone" {
provider = aws.r53
name = local.r53_domain
}
data "aws_ami" "ubuntu" {
most_recent = true
owners = ["099720109477"]
filter {
name = "name"
values = ["ubuntu-minimal/images/*/ubuntu-bionic-18.04-*"]
}
filter {
name = "virtualization-type"
values = ["hvm"]
}
filter {
name = "root-device-type"
values = ["ebs"]
}
filter {
name = "architecture"
values = ["x86_64"]
}
}
data "helm_repository" "rancher_stable" {
name = "rancher-stable"
url = "https://releases.rancher.com/server-charts/stable/"
}
data "helm_repository" "jetstack" {
name = "jetstack"
url = "https://charts.jetstack.io"
}
data "rancher2_user" "admin" {
username = "admin"
depends_on = [rancher2_bootstrap.admin]
}
data "aws_instances" "rancher_master" {
filter {
name = "tag:aws:autoscaling:groupName"
values = [aws_autoscaling_group.rancher_master.0.name]
}
}
data "aws_instances" "rancher_worker" {
filter {
name = "tag:aws:autoscaling:groupName"
values = [aws_autoscaling_group.rancher_worker.0.name]
}
}