forked from hashicorp/tfc-getting-started
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
38 lines (32 loc) · 1.21 KB
/
main.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
# The following configuration uses a provider which provisions [fake] resources
# to a fictitious cloud vendor called "Fake Web Services". Configuration for
# the fakewebservices provider can be found in provider.tf.
#
# After running the setup script (./scripts/setup.sh), feel free to change these
# resources and 'terraform apply' as much as you'd like! These resources are
# purely for demonstration and created in Terraform Cloud, scoped to your TFC
# user account.
#
# To review the provider and documentation for the available resources and
# schemas, see: https://registry.terraform.io/providers/hashicorp/fakewebservices
#
# If you're looking for the configuration for the remote backend, you can find that
# in backend.tf.
resource "fakewebservices_vpc" "primary_vpc" {
name = "Primary VPC"
cidr_block = "0.0.0.0/1"
}
resource "fakewebservices_server" "servers" {
count = 2
name = "Server ${count.index + 1}"
type = "t2.micro"
vpc = fakewebservices_vpc.primary_vpc.name
}
resource "fakewebservices_load_balancer" "primary_lb" {
name = "Primary Load Balancer"
servers = fakewebservices_server.servers[*].name
}
resource "fakewebservices_database" "prod_db" {
name = "Production DB"
size = 256
}