Skip to content

Commit

Permalink
Magic Modules generated documentation cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
nat-henderson authored and modular-magician committed Jul 9, 2018
1 parent b2140c9 commit 0c1189a
Show file tree
Hide file tree
Showing 19 changed files with 211 additions and 72 deletions.
10 changes: 9 additions & 1 deletion website/docs/r/compute_address.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ resource "google_compute_address" "internal_with_subnet_and_address" {

The following arguments are supported:


* `name` -
(Required)
Name of the resource. The name must be 1-63 characters long, and
Expand All @@ -83,33 +84,38 @@ The following arguments are supported:
following characters must be a dash, lowercase letter, or digit,
except the last character, which cannot be a dash.


- - -


* `address` -
(Optional)
The static external IP address represented by this resource. Only
IPv4 is supported. An address may only be specified for INTERNAL
address types. The IP address must be inside the specified subnetwork,
if any.

* `address_type` -
(Optional)
The type of address to reserve, either INTERNAL or EXTERNAL.
If unspecified, defaults to EXTERNAL.

* `description` -
(Optional)
An optional description of this resource.

* `network_tier` -
(Optional)
The networking tier used for configuring this address. This field can
take the following values: PREMIUM or STANDARD. If this field is not
specified, it is assumed to be PREMIUM.

* `subnetwork` -
(Optional)
The URL of the subnetwork in which to reserve the address. If an IP
address is specified, it must be within the subnetwork's IP range.
This field can only be used with INTERNAL type with
GCE_ENDPOINT/DNS_RESOLVER purposes.

* `region` -
(Optional)
The Region in which the created address should reside.
Expand All @@ -122,8 +128,10 @@ The following arguments are supported:

In addition to the arguments listed above, the following computed attributes are exported:


* `creation_timestamp` -
Creation timestamp in RFC3339 text format.

* `users` -
The URLs of the resources that are using this address.
* `self_link` - The URI of the created resource.
Expand Down
24 changes: 17 additions & 7 deletions website/docs/r/compute_autoscaler.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -94,105 +94,112 @@ resource "google_compute_autoscaler" "foobar" {

The following arguments are supported:


* `name` -
(Required)
Name of the resource. The name must be 1-63 characters long and match
the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the
first character must be a lowercase letter, and all following
characters must be a dash, lowercase letter, or digit, except the last
character, which cannot be a dash.

* `autoscaling_policy` -
(Required)
The configuration parameters for the autoscaling algorithm. You can
define one or more of the policies for an autoscaler: cpuUtilization,
customMetricUtilizations, and loadBalancingUtilization.

If none of these are specified, the default will be to autoscale based
on cpuUtilization to 0.6 or 60%. Structure is documented below.

* `target` -
(Required)
URL of the managed instance group that this autoscaler will scale.

The `autoscaling_policy` block supports:

* `min_replicas` -
(Required)
The minimum number of replicas that the autoscaler can scale down
to. This cannot be less than 0. If not provided, autoscaler will
choose a default value depending on maximum number of instances
allowed.

* `max_replicas` -
(Required)
The maximum number of instances that the autoscaler can scale up
to. This is required when creating or updating an autoscaler. The
maximum number of replicas should not be lower than minimal number
of replicas.

* `cooldown_period` -
(Optional)
The number of seconds that the autoscaler should wait before it
starts collecting information from a new instance. This prevents
the autoscaler from collecting information when the instance is
initializing, during which the collected usage would not be
reliable. The default time autoscaler waits is 60 seconds.

Virtual machine initialization times might vary because of
numerous factors. We recommend that you test how long an
instance may take to initialize. To do this, create an instance
and time the startup process.

* `cpu_utilization` -
(Optional)
Defines the CPU utilization policy that allows the autoscaler to
scale based on the average CPU utilization of a managed instance
group. Structure is documented below.

* `metric` -
(Optional)
Defines the CPU utilization policy that allows the autoscaler to
scale based on the average CPU utilization of a managed instance
group. Structure is documented below.

* `load_balancing_utilization` -
(Optional)
Configuration parameters of autoscaling based on a load balancer. Structure is documented below.
The `cpu_utilization` block supports:

* `target` -
(Required)
The target CPU utilization that the autoscaler should maintain.
Must be a float value in the range (0, 1]. If not specified, the
default is 0.6.

If the CPU level is below the target utilization, the autoscaler
scales down the number of instances until it reaches the minimum
number of instances you specified or until the average CPU of
your instances reaches the target utilization.

If the average CPU is above the target utilization, the autoscaler
scales up until it reaches the maximum number of instances you
specified or until the average utilization reaches the target
utilization.

The `metric` block supports:

* `name` -
(Required)
The identifier (type) of the Stackdriver Monitoring metric.
The metric cannot have negative values.

The metric must have a value type of INT64 or DOUBLE.

* `target` -
(Required)
The target value of the metric that autoscaler should
maintain. This must be a positive value. A utilization
metric scales number of virtual machines handling requests
to increase or decrease proportionally to the metric.

For example, a good metric to use as a utilizationTarget is
www.googleapis.com/compute/instance/network/received_bytes_count.
The autoscaler will work to keep this value constant for each
of the instances.

* `type` -
(Required)
Defines how target utilization value is expressed for a
Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND,
or DELTA_PER_MINUTE.

The `load_balancing_utilization` block supports:

* `target` -
(Required)
Fraction of backend capacity utilization (set in HTTP(s) load
Expand All @@ -202,9 +209,11 @@ The `autoscaling_policy` block supports:

- - -


* `description` -
(Optional)
An optional description of this resource.

* `zone` -
(Optional)
URL of the zone where the instance group resides.
Expand All @@ -216,6 +225,7 @@ The `autoscaling_policy` block supports:

In addition to the arguments listed above, the following computed attributes are exported:


* `creation_timestamp` -
Creation timestamp in RFC3339 text format.
* `self_link` - The URI of the created resource.
Expand Down
6 changes: 5 additions & 1 deletion website/docs/r/compute_backend_bucket.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ resource "google_storage_bucket" "image_bucket" {

The following arguments are supported:


* `bucket_name` -
(Required)
Cloud Storage bucket name.

* `name` -
(Required)
Name of the resource. Provided by the client when the resource is
Expand All @@ -69,13 +71,14 @@ The following arguments are supported:
characters must be a dash, lowercase letter, or digit, except the
last character, which cannot be a dash.


- - -


* `description` -
(Optional)
An optional textual description of the resource; provided by the
client when the resource is created.

* `enable_cdn` -
(Optional)
If true, enable Cloud CDN for this BackendBucket.
Expand All @@ -87,6 +90,7 @@ The following arguments are supported:

In addition to the arguments listed above, the following computed attributes are exported:


* `creation_timestamp` -
Creation timestamp in RFC3339 text format.
* `self_link` - The URI of the created resource.
Expand Down
32 changes: 25 additions & 7 deletions website/docs/r/compute_disk.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ resource "google_compute_disk" "default" {

The following arguments are supported:


* `name` -
(Required)
Name of the resource. Provided by the client when the resource is
Expand All @@ -76,26 +77,28 @@ The following arguments are supported:
characters must be a dash, lowercase letter, or digit, except the last
character, which cannot be a dash.


- - -


* `description` -
(Optional)
An optional description of this resource. Provide this property when
you create the resource.

* `labels` -
(Optional)
Labels to apply to this disk. A list of key->value pairs.

* `size` -
(Optional)
Size of the persistent disk, specified in GB. You can specify this
field when creating a persistent disk using the sourceImage or
sourceSnapshot parameter, or specify it alone to create an empty
persistent disk.

If you specify this field along with sourceImage or sourceSnapshot,
the value of sizeGb must not be less than the size of the sourceImage
or the size of the snapshot.

* `image` -
(Optional)
The image from which to initialize this disk. This can be
Expand All @@ -107,42 +110,44 @@ The following arguments are supported:
[google_compute_image data source](/docs/providers/google/d/datasource_compute_image.html).
For instance, the image `centos-6-v20180104` includes its family name `centos-6`.
These images can be referred by family name here.

* `type` -
(Optional)
URL of the disk type resource describing which disk type to use to
create the disk. Provide this when creating the disk.

* `zone` -
(Optional)
A reference to the zone where the disk resides.

* `disk_encryption_key` -
(Optional)
Encrypts the disk using a customer-supplied encryption key.

After you encrypt a disk with a customer-supplied key, you must
provide the same key if you use the disk later (e.g. to create a disk
snapshot or an image, or to attach the disk to a virtual machine).

Customer-supplied encryption keys do not protect access to metadata of
the disk.

If you do not provide an encryption key when creating the disk, then
the disk will be encrypted using an automatically generated key and
you do not need to provide a key to use the disk later. Structure is documented below.

* `source_image_encryption_key` -
(Optional)
The customer-supplied encryption key of the source image. Required if
the source image is protected by a customer-supplied encryption key. Structure is documented below.

* `snapshot` -
(Optional)
The source snapshot used to create this disk. You can provide this as
a partial or full URL to the resource. For example, the following are
valid values:

* https://www.googleapis.com/compute/v1/projects/project/global/
snapshots/snapshot
* projects/project/global/snapshots/snapshot
* global/snapshots/snapshot
* snapshot

* `source_snapshot_encryption_key` -
(Optional)
The customer-supplied encryption key of the source snapshot. Required
Expand All @@ -152,59 +157,72 @@ The following arguments are supported:
If it is not provided, the provider project is used.

The `disk_encryption_key` block supports:

* `raw_key` -
(Optional)
Specifies a 256-bit customer-supplied encryption key, encoded in
RFC 4648 base64 to either encrypt or decrypt this resource.

* `sha256` -
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied
encryption key that protects this resource.

The `source_image_encryption_key` block supports:

* `raw_key` -
(Optional)
Specifies a 256-bit customer-supplied encryption key, encoded in
RFC 4648 base64 to either encrypt or decrypt this resource.

* `sha256` -
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied
encryption key that protects this resource.

The `source_snapshot_encryption_key` block supports:

* `raw_key` -
(Optional)
Specifies a 256-bit customer-supplied encryption key, encoded in
RFC 4648 base64 to either encrypt or decrypt this resource.

* `sha256` -
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied
encryption key that protects this resource.


* (Deprecated) `disk_encryption_key_raw`: This is an alias for
`disk_encryption_key.raw_key`. It is deprecated to enhance
consistency with `source_image_encryption_key` and
`source_snapshot_encryption_key`.

## Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:


* `label_fingerprint` -
The fingerprint used for optimistic locking of this resource. Used
internally during updates.

* `creation_timestamp` -
Creation timestamp in RFC3339 text format.

* `last_attach_timestamp` -
Last attach timestamp in RFC3339 text format.

* `last_detach_timestamp` -
Last dettach timestamp in RFC3339 text format.

* `users` -
Links to the users of the disk (attached instances) in form:
project/zones/zone/instances/instance

* `source_image_id` -
The ID value of the image used to create this disk. This value
identifies the exact image that was used to create this persistent
disk. For example, if you created the persistent disk from an image
that was later deleted and recreated under the same name, the source
image ID would identify the exact version of the image that was used.

* `source_snapshot_id` -
The unique ID of the snapshot used to create this disk. This value
identifies the exact snapshot that was used to create this persistent
Expand Down
Loading

0 comments on commit 0c1189a

Please sign in to comment.