From ffc7c817995cac4b61f41976d4d74fe6dd31ce8d Mon Sep 17 00:00:00 2001 From: Quentin Brosse Date: Thu, 4 Jul 2019 16:59:10 +0200 Subject: [PATCH] add scaleway_compute_instance_security_group example --- .../r/compute_instance_server.html.markdown | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/website/docs/r/compute_instance_server.html.markdown b/website/docs/r/compute_instance_server.html.markdown index 33e6f752b..d599974f3 100644 --- a/website/docs/r/compute_instance_server.html.markdown +++ b/website/docs/r/compute_instance_server.html.markdown @@ -46,6 +46,40 @@ resource "scaleway_compute_instance_server" "web" { } ``` +### With security group + +```hcl +resource "scaleway_compute_instance_security_group" "www" { + inbound_default_policy = "drop" + outbound_default_policy = "accept" + + inbound { + action = accept + port = "22" + } + + inbound { + action = accept + port = "443" + ip = "8.8.8.8" + } + + outbound { + action = drop + ip_range = "10.20.0.0/24" + } + + resource "scaleway_compute_instance_server" "web" { + type = "DEV1-S" + image_id = "f974feac-abae-4365-b988-8ec7d1cec10d" + + security_group_id= "${scaleway_compute_instance_security_group.www.id}" + } +} + + +``` + ### With user data and could-init ```hcl