github.com/tomaszheflik/terraform@v0.7.3-0.20160827060421-32f990b41594/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 ARM cloud 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    access_key = ""
    27    organization = ""
    28  }
    29  
    30  resource "scaleway_ip" "ip" {
    31    server = "${scaleway_server.test.id}"
    32  }
    33  
    34  resource "scaleway_server" "test" {
    35    name = "test"
    36    image = "aecaed73-51a5-4439-a127-6d8229847145"
    37    type = "C2S"
    38  }
    39  
    40  resource "scaleway_volume" "test" {
    41    name = "test"
    42    size_in_gb = 20
    43    type = "l_ssd"
    44  }
    45  
    46  resource "scaleway_volume_attachment" "test" {
    47    server = "${scaleway_server.test.id}"
    48    volume = "${scaleway_volume.test.id}"
    49  }
    50  
    51  resource "scaleway_security_group" "http" {
    52    name = "http"
    53    description = "allow HTTP and HTTPS traffic"
    54  }
    55  
    56  resource "scaleway_security_group_rule" "http_accept" {
    57    security_group = "${scaleway_security_group.http.id}"
    58  
    59    action = "accept"
    60    direction = "inbound"
    61    ip_range = "0.0.0.0/0"
    62    protocol = "TCP"
    63    dest_port_from = 80
    64  }
    65  
    66  resource "scaleway_security_group_rule" "https_accept" {
    67    security_group = "${scaleway_security_group.http.id}"
    68  
    69    action = "accept"
    70    direction = "inbound"
    71    ip_range = "0.0.0.0/0"
    72    protocol = "TCP"
    73    dest_port_from = 443
    74  }
    75  
    76  ```
    77  
    78  You'll need to provide your Scaleway organization and access key,
    79  so that Terraform can connect. If you don't want to put
    80  credentials in your configuration file, you can leave them
    81  out:
    82  
    83  ```
    84  provider "scaleway" {}
    85  ```
    86  
    87  ...and instead set these environment variables:
    88  
    89  - **SCALEWAY_ORGANIZATION**: Your Scaleway organization
    90  - **SCALEWAY_ACCESS_KEY**: Your API Access key