-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
41 lines (37 loc) · 905 Bytes
/
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
39
40
41
provider "scaleway" {
access_key = "SCALEWAY_ACCESS_KEY"
secret_key = "SCALEWAY_SECRET_KEY"
organization_id = "SCALEWAY_ORGANIZATION_ID"
zone = "fr-par-1"
region = "fr-par"
}
resource "scaleway_instance_ip" "public_ip" {
server_id = "${scaleway_instance_server.docker.id}"
}
resource "scaleway_instance_security_group" "www" {
inbound_default_policy = "drop"
outbound_default_policy = "accept"
inbound_rule {
action = "accept"
port = "22"
ip = "${var.ipadmin}"
}
inbound_rule {
action = "accept"
port = "80"
}
inbound_rule {
action = "accept"
port = "443"
}
inbound_rule {
action = "accept"
port = "8080"
}
}
resource "scaleway_instance_server" "docker" {
type = "DEV1-S"
image = "89c80d27-ddf4-4ffa-8215-b335cce3fd05"
tags = [ "docker", "blog" ]
security_group_id= "${scaleway_instance_security_group.www.id}"
}