github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/clc/r/public_ip.html.markdown (about)

     1  ---
     2  layout: "clc"
     3  page_title: "clc: clc_public_ip"
     4  sidebar_current: "docs-clc-resource-public-ip"
     5  description: |-
     6    Manages a CLC public ip.
     7  ---
     8  
     9  # clc_public_ip
    10  
    11  Manages a CLC public ip (for an existing server).
    12  
    13  See also [Complete API documentation](https://www.ctl.io/api-docs/v2/#public-ip).
    14  
    15  ## Example Usage
    16  
    17  ```hcl
    18  # Provision a public ip
    19  resource "clc_public_ip" "backdoor" {
    20    server_id           = "${clc_server.node.0.id}"
    21    internal_ip_address = "${clc_server.node.0.private_ip_address}"
    22  
    23    ports {
    24      protocol = "ICMP"
    25      port     = -1
    26    }
    27  
    28    ports {
    29      protocol = "TCP"
    30      port     = 22
    31    }
    32  
    33    ports {
    34      protocol = "TCP"
    35      port     = 2000
    36      port_to  = 9000
    37    }
    38  
    39    source_restrictions {
    40      cidr = "85.39.22.15/30"
    41    }
    42  }
    43  
    44  output "ip" {
    45    value = "clc_public_ip.backdoor.id"
    46  }
    47  ```
    48  
    49  ## Argument Reference
    50  
    51  The following arguments are supported:
    52  
    53  * `server_id` - (Required, string) The name or ID of the server to bind IP to.
    54  * `internal_ip_address` - (Required, string) The internal IP of the
    55    NIC to attach to. If not provided, a new internal NIC will be
    56    provisioned and used.
    57  * `ports` - (Optional) See [Ports](#ports) below for details.
    58  * `source_restrictions` - (Optional) See
    59    [SourceRestrictions](#source_restrictions) below for details.
    60  
    61  
    62  <a id="ports"></a>
    63  ## Ports
    64  
    65  `ports` is a block within the configuration that may be
    66  repeated to specify open ports on the target IP. Each
    67  `ports` block supports the following:
    68  
    69  * `protocol` (Required, string) One of "tcp", "udp", "icmp".
    70  * `port` (Required, int) The port to open. If defining a range, demarks starting port
    71  * `portTo` (Optional, int) Given a port range, demarks the ending port.
    72  
    73  
    74  <a id="source_restrictions"></a>
    75  ## SourceRestrictions
    76  
    77  `source_restrictions` is a block within the configuration that may be
    78  repeated to restrict ingress traffic on specified CIDR blocks. Each
    79  `source_restrictions` block supports the following:
    80  
    81  * `cidr` (Required, string) The IP or range of IPs in CIDR notation.