github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/scaleway/index.html.markdown (about) 1 --- 2 layout: "scaleway" 3 page_title: "Provider: Scaleway" 4 sidebar_current: "docs-scaleway-index" 5 description: |- 6 The Scaleway provider is used to interact with Scaleway bare metal & VPS provider. 7 --- 8 9 # Scaleway Provider 10 11 The Scaleway provider is used to manage Scaleway resources. 12 13 Use the navigation to the left to read about the available resources. 14 15 ## Example Usage 16 17 Here is an example that will setup the following: 18 + An ARM Server. 19 + An IP Address. 20 + A security group. 21 22 (create this as sl.tf and run terraform commands from this directory): 23 24 ```hcl 25 provider "scaleway" { 26 organization = "<YOUR-ACCESS-KEY>" 27 token = "<YOUR-GENERATED-TOKEN>" 28 region = "par1" 29 } 30 31 resource "scaleway_ip" "ip" { 32 server = "${scaleway_server.test.id}" 33 } 34 35 resource "scaleway_server" "test" { 36 name = "test" 37 image = "aecaed73-51a5-4439-a127-6d8229847145" 38 type = "C2S" 39 } 40 41 resource "scaleway_volume" "test" { 42 name = "test" 43 size_in_gb = 20 44 type = "l_ssd" 45 } 46 47 resource "scaleway_volume_attachment" "test" { 48 server = "${scaleway_server.test.id}" 49 volume = "${scaleway_volume.test.id}" 50 } 51 52 resource "scaleway_security_group" "http" { 53 name = "http" 54 description = "allow HTTP and HTTPS traffic" 55 } 56 57 resource "scaleway_security_group_rule" "http_accept" { 58 security_group = "${scaleway_security_group.http.id}" 59 60 action = "accept" 61 direction = "inbound" 62 ip_range = "0.0.0.0/0" 63 protocol = "TCP" 64 port = 80 65 } 66 67 resource "scaleway_security_group_rule" "https_accept" { 68 security_group = "${scaleway_security_group.http.id}" 69 70 action = "accept" 71 direction = "inbound" 72 ip_range = "0.0.0.0/0" 73 protocol = "TCP" 74 port = 443 75 } 76 ``` 77 78 You'll need to provide your Scaleway organization **access key** and **token**. 79 80 Your access key can be found on your Scaleway control panel, in the *Credentials* 81 tab of the management panes. It is under the *Tokens* subsection, but is labelled 82 seperately as **access key**. 83 84 Your **token** can be generated by selecting to "Create new token" under the same 85 subsection as above. This does not require further input, but giving each token a 86 friendly-name is suggested. 87 88 If you do not want to put credentials in your configuration file, 89 you can leave them out: 90 91 ``` 92 provider "scaleway" { 93 region = "par1" 94 } 95 ``` 96 97 ...and instead set these environment variables: 98 99 - **SCALEWAY_ORGANIZATION**: Your Scaleway `organization` access key 100 - **SCALEWAY_TOKEN**: Your API access `token`, generated by you 101 - **SCALEWAY_REGION**: The Scaleway region