Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions cloudscale/resource_cloudscale_load_balancer_health_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,22 @@ func getLoadBalancerHealthMonitorSchema(t SchemaType) map[string]*schema.Schema
},
"delay_s": {
Type: schema.TypeInt,
Optional: true,
Optional: t.isResource(),
Computed: true,
},
"timeout_s": {
Type: schema.TypeInt,
Optional: true,
Optional: t.isResource(),
Computed: true,
},
"up_threshold": {
Type: schema.TypeInt,
Optional: true,
Optional: t.isResource(),
Computed: true,
},
"down_threshold": {
Type: schema.TypeInt,
Optional: true,
Optional: t.isResource(),
Computed: true,
},
"type": {
Expand All @@ -79,28 +79,28 @@ func getLoadBalancerHealthMonitorSchema(t SchemaType) map[string]*schema.Schema
"http_expected_codes": {
Type: schema.TypeList,
Elem: &schema.Schema{Type: schema.TypeString},
Optional: true,
Optional: t.isResource(),
Computed: true,
},
"http_method": {
Type: schema.TypeString,
Optional: true,
Optional: t.isResource(),
Computed: true,
},
"http_url_path": {
Type: schema.TypeString,
Optional: true,
Optional: t.isResource(),
Computed: true,
},
"http_version": {
Type: schema.TypeString,
Optional: true,
Optional: t.isResource(),
Computed: true,
ForceNew: true,
ForceNew: t.isResource(),
},
"http_host": {
Type: schema.TypeString,
Optional: true,
Optional: t.isResource(),
Computed: true,
},
"tags": &TagsSchema,
Expand Down
8 changes: 4 additions & 4 deletions cloudscale/resource_cloudscale_load_balancer_listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,23 @@ func getLoadBalancerListenerSchema(t SchemaType) map[string]*schema.Schema {
},
"timeout_client_data_ms": {
Type: schema.TypeInt,
Optional: true,
Optional: t.isResource(),
Computed: true,
},
"timeout_member_connect_ms": {
Type: schema.TypeInt,
Optional: true,
Optional: t.isResource(),
Computed: true,
},
"timeout_member_data_ms": {
Type: schema.TypeInt,
Optional: true,
Optional: t.isResource(),
Computed: true,
},
"allowed_cidrs": {
Type: schema.TypeList,
Elem: &schema.Schema{Type: schema.TypeString},
Optional: true,
Optional: t.isResource(),
Computed: true,
},
"tags": &TagsSchema,
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/custom_image.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ The following arguments can be used to look up a custom image:
* `id` - (Optional) The UUID of a custom image.
* `name` - (Optional) The human-readable name of a custom image.
* `slug` - (Optional) A string identifying a custom image.
* `firmware_type` - (Optional) The firmware type that will be used for servers created with the custom image. Options include `bios` and `uefi`.

## Attributes Reference

Expand All @@ -50,5 +51,4 @@ In addition to the arguments listed above, the following computed attributes are
* `size_gb` - The size in GB of the custom image.
* `checksums` - The checksums of the custom image as map.
* `user_data_handling` - How user_data will be handled when creating a server. Options include `pass-through` and `extend-cloud-config`.
* `firmware_type` - The firmware type that will be used for servers created with the custom image. Options include `bios` and `uefi`.
* `zone_slugs` - The zones in which the custom image will be available. Options include `lpg1` and `rma1`.
4 changes: 2 additions & 2 deletions docs/data-sources/load_balancer.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ data "cloudscale_load_balancer" "lb1" {
The following arguments can be used to look up a load balancer:

* `id` - (Optional) The UUID of the load balancer.
* `name` - (Optional) Name of the load balancer.
* `zone_slug` - (Optional) The slug of the zone in which the load balancer exists. Options include `lpg1` and `rma1`.

## Attributes Reference
Expand All @@ -27,11 +28,10 @@ In addition to the arguments listed above, the following computed attributes are

* `href` - The cloudscale.ch API URL of the current resource.
* `flavor_slug` - The slug (name) of the flavor to use for the new load balancer. Possible values can be found in our [API documentation](https://www.cloudscale.ch/en/api/v1#load-balancer-flavors).
* `name` - Name of the new load balancer.
* `status` - The current status of the load balancer.
* `vip_addresses` - A list of VIP address objects. This attributes needs to be specified if the load balancer should be assigned a VIP address in a subnet on a private network. If the VIP address should be created on the public network, this attribute should be omitted. Each VIP address object has the following attributes:
* `version` - The IP version, either `4` or `6`.
* `subnet_href` - The cloudscale.ch API URL of the subnet the VIP address is part of.
* `subnet_uuid` - The UUID of the subnet this VIP address should be part of.
* `subnet_cidr` - The cidr of the subnet the VIP address is part of.
* `address` - An VIP address that has been assigned to this load balancer.
* `address` - An VIP address that has been assigned to this load balancer.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* `address` - An VIP address that has been assigned to this load balancer.
* `address` - A VIP address that has been assigned to this load balancer.

nit: not sure though

Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ The following arguments can be used to look up a load balancer listener:
In addition to the arguments listed above, the following computed attributes are exported:

* `href` - The cloudscale.ch API URL of the current resource.
* `pool_href` = The cloudscale.ch API URL of the listener's load balancer pool.
* `pool_name` = The load balancer pool name of the listener.
* `pool_href` - The cloudscale.ch API URL of the listener's load balancer pool.
* `pool_name` - The load balancer pool name of the listener.
* `delay_s` - The delay between two successive checks in seconds.
* `timeout_s` - The maximum time allowed for an individual check in seconds.
* `up_threshold` - The number of checks that need to be successful before the `monitor_status` of a pool member changes to `"up"`.
Expand All @@ -37,4 +37,4 @@ In addition to the arguments listed above, the following computed attributes are
* `http_method` - The HTTP method used for the check. Options include `"CONNECT"`, `"DELETE"`, `"GET"`, `"HEAD"`, `"OPTIONS"`, `"PATCH"`, `"POST"`, `"PUT"` and `"TRACE"`.
* `http_url_path` - The URL used for the check.
* `http_version` - The HTTP version used for the check. Options include `"1.0"` and `"1.1"`.
* `http_host` - The server name in the HTTP Host: header used for the check.
* `http_host` - The server name in the HTTP Host: header used for the check.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ The following arguments can be used to look up a load balancer listener:
In addition to the arguments listed above, the following computed attributes are exported:

* `href` - The cloudscale.ch API URL of the current resource.
* `pool_href` = The cloudscale.ch API URL of the listener's load balancer pool.
* `pool_name` = The load balancer pool name of the listener.
* `protocol` = The protocol used for receiving traffic. Options include `"tcp"`.
* `protocol_port` = The port on which traffic is received.
* `timeout_client_data_ms` = Client inactivity timeout in milliseconds.
* `timeout_member_connect_ms` = Pool member connection timeout in milliseconds.
* `timeout_member_data_ms` = Pool member inactivity timeout in milliseconds.
* `allowed_cidrs` = Restrict the allowed source IPs for this listener. `[]` means that any source IP is allowed. If the list is non-empty, traffic from source IPs not included is denied.
* `pool_href` - The cloudscale.ch API URL of the listener's load balancer pool.
* `pool_name` - The load balancer pool name of the listener.
* `protocol` - The protocol used for receiving traffic. Options include `"tcp"`.
* `protocol_port` - The port on which traffic is received.
* `timeout_client_data_ms` - Client inactivity timeout in milliseconds.
* `timeout_member_connect_ms` - Pool member connection timeout in milliseconds.
* `timeout_member_data_ms` - Pool member inactivity timeout in milliseconds.
* `allowed_cidrs` - Restrict the allowed source IPs for this listener. `[]` means that any source IP is allowed. If the list is non-empty, traffic from source IPs not included is denied.
13 changes: 11 additions & 2 deletions docs/data-sources/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ The following arguments can be used to look up a server:
* `id` - (Optional) The UUID of a server.
* `name` - (Optional) Name of the server.
* `zone_slug` - (Optional) The slug of the zone in which the server exists. Options include `lpg1` and `rma1`.
* `status` - (Optional) The desired state of a server. Can be `running` (default) or `stopped`.

## Attributes Reference

Expand All @@ -32,22 +33,30 @@ In addition to the arguments listed above, the following computed attributes are
* `ssh_host_keys` - A list of SSH host keys (strings) of this server.
* `flavor_slug` - The slug (name) of the flavor used by this server.
* `image_slug` - The slug (name) of the image (or custom image) used by the server.
* `volumes` - A list of volume objects attached to this server. Each volume object has three attributes:
* `volumes` - A list of volume objects attached to this server. Each volume object has the following attributes:
* `device_path` - (Deprecated) The path (string) to the volume on your server (e.g. `/dev/vda`). This attribute is always null and will be removed in a future major version.
* `size_gb` - The size (int) of the volume in GB. Typically matches `volume_size_gb` or `bulk_volume_size_gb`.
* `type` - A string. Either `ssd` or `bulk`.
* `uuid` - The UUID of the volume.
* `server_groups` - A list of server group objects this server is associated with. Each object has the following attributes:
* `href` - The cloudscale.ch API URL of the server group.
* `name` - The name of the server group.
* `uuid` - The UUID of the server group.
* `public_ipv4_address` - The first `public` IPv4 address of this server. The returned IP address may be `""` if the server does not have a public IPv4.
* `private_ipv4_address` - The first `private` IPv4 address of this server. The returned IP address may be `""` if the server does not have private networking enabled.
* `public_ipv6_address` - The first `public` IPv6 address of this server. The returned IP address may be `""` if the server does not have a public IPv6.
* `interfaces` - A list of interface objects attached to this server. Each interface object has the following attributes:
* `network_name` - The name of the network the interface is attached to.
* `network_href` - The cloudscale.ch API URL of the network the interface is attached to.
* `network_uuid` - The UUID of the network the interface is attached to.
* `type` - Either `public` or `private`. Public interfaces are connected to the Internet, while private interfaces are not.
* `no_address` - `true` if no address is configured on this interface.
* `addresses` - A list of address objects:
* `address` - The IP address assigned to this interface.
* `subnet_uuid` - The UUID of the subnet this address is part of.
* `gateway` - An IPv4 or IPv6 address that represents the default gateway for this interface.
* `prefix_length` - The prefix length for this IP address, typically 24 for IPv4 and 128 for IPv6.
* `reverse_ptr` - The PTR record (reverse DNS pointer) for this IP address. If you use an FQDN as your server name it will automatically be used here.
* `version` - The IP version, either `4` or `6`.
* `subnet_cidr` - The cidr of the subnet the address is part of.
* `subnet_href` - The cloudscale.ch API URL of the subnet the address is part of.
* `status` - The state of a server.
1 change: 0 additions & 1 deletion docs/data-sources/volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ The following arguments can be used to look up a volume:
In addition to the arguments listed above, the following computed attributes are exported:

* `href` - The cloudscale.ch API URL of the current resource.
* `size_gb` - The volume size in GB. Valid values are multiples of 1 for type "ssd" and multiples of 100 for type "bulk".
* `server_uuids` - A list of server UUIDs.
3 changes: 1 addition & 2 deletions docs/data-sources/volume_snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ The following arguments can be used to look up a volume snapshot:
In addition to the arguments listed above, the following computed attributes are exported:

* `href` - The cloudscale.ch API URL of the current resource.
* `source_volume_uuid` - The UUID of the source volume.
* `source_volume_name` - The name of the source volume.
* `source_volume_href` - The cloudscale.ch API URL of the source volume.
* `size_gb` - The size of the snapshot in GB.
* `status` - The current status of the volume snapshot.
* `status` - The current status of the volume snapshot.
1 change: 0 additions & 1 deletion docs/resources/load_balancer_health_monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ resource "cloudscale_load_balancer_health_monitor" "lb1-health-monitor" {

The following arguments are supported when creating new load balancer health monitor:

* `name` - (Required) Name of the new load balancer health monitor.
* `pool_uuid` - (Required) The pool of the health monitor.

* `type` - (Required) The type of the health monitor. Options include: `"ping"`, `"tcp"`, `"http"`, `"https"` and `"tls-hello"`.
Expand Down
7 changes: 6 additions & 1 deletion docs/resources/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,15 @@ In addition to the arguments listed above, the following computed attributes are
* `href` - The cloudscale.ch API URL of the current resource.
* `ssh_fingerprints` - A list of SSH host key fingerprints (strings) of this server.
* `ssh_host_keys` - A list of SSH host keys (strings) of this server.
* `volumes` - A list of volume objects attached to this server. Each volume object has three attributes:
* `volumes` - A list of volume objects attached to this server. Each volume object has the following attributes:
* `device_path` - (Deprecated) The path (string) to the volume on your server (e.g. `/dev/vda`). This attribute is always null and will be removed in a future major version.
* `size_gb` - The size (int) of the volume in GB. Typically matches `volume_size_gb` or `bulk_volume_size_gb`.
* `type` - A string. Either `ssd` or `bulk`.
* `uuid` - The UUID of the volume.
* `server_groups` - A list of server group objects this server is associated with. Each object has the following attributes:
* `href` - The cloudscale.ch API URL of the server group.
* `name` - The name of the server group.
* `uuid` - The UUID of the server group.
* `public_ipv4_address` - The first `public` IPv4 address of this server. The returned IP address may be `""` if the server does not have a public IPv4.
* `private_ipv4_address` - The first `private` IPv4 address of this server. The returned IP address may be `""` if the server does not have private networking enabled.
* `public_ipv6_address` - The first `public` IPv6 address of this server. The returned IP address may be `""` if the server does not have a public IPv6.
Expand Down