Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add network attachment to gce instance #15933

Merged
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
3 changes: 3 additions & 0 deletions .changelog/8829.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
google_compute_instance
```
19 changes: 11 additions & 8 deletions website/docs/r/compute_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ is desired, you will need to modify your state file manually using
For instance, the image `centos-6-v20180104` includes its family name `centos-6`.
These images can be referred by family name here.

* `labels` - (Optional) A set of key/value label pairs assigned to the disk. This
* `labels` - (Optional) A set of key/value label pairs assigned to the disk. This
field is only applicable for persistent disks.

* `resource_manager_tags` - (Optional) A tag is a key-value pair that can be attached to a Google Cloud resource. You can use tags to conditionally allow or deny policies based on whether a resource has a specific tag. This value is not returned by the API. In Terraform, this value cannot be updated and changing it will recreate the resource.
Expand Down Expand Up @@ -285,6 +285,7 @@ is desired, you will need to modify your state file manually using
network is in auto subnet mode, specifying the subnetwork is optional. If the network is
in custom subnet mode, specifying the subnetwork is required.


* `subnetwork_project` - (Optional) The project in which the subnetwork belongs.
If the `subnetwork` is a self_link, this field is ignored in favor of the project
defined in the subnetwork self_link. If the `subnetwork` is a name and this
Expand All @@ -306,6 +307,8 @@ is desired, you will need to modify your state file manually using

* `nic_type` - (Optional) The type of vNIC to be used on this interface. Possible values: GVNIC, VIRTIO_NET.

* `network_attachment` - (Optional) [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html) The URL of the network attachment that this interface should connect to in the following format: `projects/{projectNumber}/regions/{region_name}/networkAttachments/{network_attachment_name}`.

* `stack_type` - (Optional) The stack type for this network interface to identify whether the IPv6 feature is enabled or not. Values are IPV4_IPV6 or IPV4_ONLY. If not specified, IPV4_ONLY will be used.

* `ipv6_access_config` - (Optional) An array of IPv6 access configurations for this interface.
Expand All @@ -331,14 +334,14 @@ specified, then this instance will have no external IPv6 Internet access. Struct

<a name="nested_ipv6_access_config"></a>The `ipv6_access_config` block supports:

* `external_ipv6` - (Optional) The first IPv6 address of the external IPv6 range associated
with this instance, prefix length is stored in externalIpv6PrefixLength in ipv6AccessConfig.
To use a static external IP address, it must be unused and in the same region as the instance's zone.
* `external_ipv6` - (Optional) The first IPv6 address of the external IPv6 range associated
with this instance, prefix length is stored in externalIpv6PrefixLength in ipv6AccessConfig.
To use a static external IP address, it must be unused and in the same region as the instance's zone.
If not specified, Google Cloud will automatically assign an external IPv6 address from the instance's subnetwork.

* `external_ipv6_prefix_length` - (Optional) The prefix length of the external IPv6 range.

* `name` - (Optional) The name of this access configuration. In ipv6AccessConfigs, the recommended name
* `name` - (Optional) The name of this access configuration. In ipv6AccessConfigs, the recommended name
is "External IPv6".

* `network_tier` - (Optional) The service-level to be provided for IPv6 traffic when the
Expand Down Expand Up @@ -390,12 +393,12 @@ specified, then this instance will have no external IPv6 Internet access. Struct

* `min_node_cpus` - (Optional) The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.

* `provisioning_model` - (Optional) Describe the type of preemptible VM. This field accepts the value `STANDARD` or `SPOT`. If the value is `STANDARD`, there will be no discount. If this is set to `SPOT`,
* `provisioning_model` - (Optional) Describe the type of preemptible VM. This field accepts the value `STANDARD` or `SPOT`. If the value is `STANDARD`, there will be no discount. If this is set to `SPOT`,
`preemptible` should be `true` and `automatic_restart` should be
`false`. For more info about
`SPOT`, read [here](https://cloud.google.com/compute/docs/instances/spot)
* `instance_termination_action` - (Optional) Describe the type of termination action for VM. Can be `STOP` or `DELETE`. Read more on [here](https://cloud.google.com/compute/docs/instances/create-use-spot)

* `instance_termination_action` - (Optional) Describe the type of termination action for VM. Can be `STOP` or `DELETE`. Read more on [here](https://cloud.google.com/compute/docs/instances/create-use-spot)

* `max_run_duration` - (Optional) [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html) The duration of the instance. Instance will run and be terminated after then, the termination action could be defined in `instance_termination_action`. Only support `DELETE` `instance_termination_action` at this point. Structure is [documented below](#nested_max_run_duration).
<a name="nested_max_run_duration"></a>The `max_run_duration` block supports:
Expand Down