terraform-provider-google/website/docs/r
Nic Cope 94a405d179 Add Alias IP and Guest Accelerator support to Instance Templates (#639)
* Move AliasIpRange helpers into utils

To reflect the fact they'll be used by multiple resources.

* Pass Config to build helpers, not meta

It's the only thing meta is used for.

* Refactor getNetwork util methods to return early for the happy path.

* Update compute APIs

compute.Instance.MinCpuPlatform is now GA.

* Fix panic in TestComputeInstanceMigrateState

This seemed to be a pre-existing issue, i.e. I could repro it in master.

--- FAIL: TestComputeInstanceMigrateState (0.00s)
panic: interface conversion: interface {} is nil, not *google.Config [recovered]
        panic: interface conversion: interface {} is nil, not *google.Config

goroutine 85 [running]:
testing.tRunner.func1(0xc4205d60f0)
        /usr/local/Cellar/go/1.9.1/libexec/src/testing/testing.go:711 +0x2d2
panic(0x203acc0, 0xc4205d2080)
        /usr/local/Cellar/go/1.9.1/libexec/src/runtime/panic.go:491 +0x283
github.com/terraform-providers/terraform-provider-google/google.migrateStateV3toV4(0xc4205f2000, 0x0, 0x0, 0x0, 0x48, 0xc4205f2000)
        /Users/negz/control/go/src/github.com/terraform-providers/terraform-provider-google/google/resource_compute_instance_migrate.go:182 +0x2405
github.com/terraform-providers/terraform-provider-google/google.resourceComputeInstanceMigrateState(0x2, 0xc4205f2000, 0x0, 0x0, 0x0, 0x0, 0xe0000000000)
        /Users/negz/control/go/src/github.com/terraform-providers/terraform-provider-google/google/resource_compute_instance_migrate.go:48 +0x21a
github.com/terraform-providers/terraform-provider-google/google.runInstanceMigrateTest(0xc4205d60f0, 0x2260816, 0x8, 0x227d23a, 0x20, 0x2, 0xc4205ec0f0, 0xc4205ec120, 0x0,
 0x0)
        /Users/negz/control/go/src/github.com/terraform-providers/terraform-provider-google/google/resource_compute_instance_migrate_test.go:803 +0xc1
github.com/terraform-providers/terraform-provider-google/google.TestComputeInstanceMigrateState(0xc4205d60f0)
        /Users/negz/control/go/src/github.com/terraform-providers/terraform-provider-google/google/resource_compute_instance_migrate_test.go:71 +0xc84
testing.tRunner(0xc4205d60f0, 0x22d81c0)
        /usr/local/Cellar/go/1.9.1/libexec/src/testing/testing.go:746 +0xd0
created by testing.(*T).Run
        /usr/local/Cellar/go/1.9.1/libexec/src/testing/testing.go:789 +0x2de
FAIL    github.com/terraform-providers/terraform-provider-google/google 0.035s

* Use only the v1 API for resource_compute_instance

Alias IP ranges, Accelerators, and min CPU platform are now GA.

* Move common instance code into utils.go

Methods used by both resource_compute_instance and
resource_compute_instance_template are currently spread between their respective
files, and utils.go.

This commit moves them all into utils.go for the sake of consistency. It may be
worth considering an instance_common.go file or similar.

* Unify compute_instance and compute_instance_template network_interface and service_account code

This has the side effect of enabling Alias IP range support for
compute_instance_templates.

* Add tests for compute instance template Alias IP ranges

* Mark instance template region as computed

We compute it from the subnet its network interfaces are in. Note this
is not new behaviour - I believe it was erroneously missing the computed
flag.

* Support guest accelerators for instance templates

Since most of the code is already there.

* Add a test for using 'address' rather than 'network_ip' for instance templates

* Don't mark assigned_nat_ip as deprecated

* Remove network_interface schema fields that don't make sense for a compute instance template

* Add newline after count in instance template docs

* Don't try to dedupe guest accelerator expansion code

The API calls to Google to create guest accelerators take different values
for instances and instance templates. Instance templates don't have a zone
and can thus *only* be passed a guest accelerator name.

* Use ParseNetworkFieldValue instead of getNetworkLink

* Add support for parsing regional fields, and subnetworks specifically

Currently unused because subnetworks may have a separate project from that
of the instance using them, which complicates looking up the project field.

* Fall back to provider region when parsing regional field values

Also slightly refactors getXFromSchema field helper functions for readability.

* Revert to assigned_nat_ip in compute instance docs

* Add beta scaffolding to compute instance and compute instance template

Note these resources don't currently use beta features - this is futureproofing.

* Fix indentation in comment about instance template alias IP ranges

* Consolidate metadata helper functions in metadata.go

* Move compute instance (and template) related helpers into their own file
2017-11-28 10:01:27 -08:00
..
bigquery_dataset.html.markdown Fix BigQuery Dataset doc (#407) 2017-09-12 11:26:19 -07:00
bigquery_table.html.markdown add docs for bigquery views (#771) 2017-11-21 09:53:03 -08:00
bigtable_instance.html.markdown Add support for instance_type to google_bigtable_instance. (#313) 2017-08-11 14:43:00 -07:00
bigtable_table.html.markdown Changed _ to - in sidebar_current for bigtable instance and table. 2017-07-05 12:50:41 -07:00
compute_address.html.markdown Give addresses beta support, add internal addresses (#594) 2017-11-07 13:38:26 -08:00
compute_autoscaler.html.markdown Fix autoscaler and org policies docs (#584) 2017-10-13 10:14:21 -07:00
compute_backend_bucket.html.markdown Add import support for google_compute_backend_bucket (#736) 2017-11-13 15:59:34 -08:00
compute_backend_service.html.markdown fix default for connection_draining_timeout_sec (#548) 2017-10-06 12:03:16 -07:00
compute_disk.html.markdown Add configurable timeouts for disks (#717) 2017-11-10 10:21:14 -08:00
compute_firewall.html.markdown Mention support for all protocols in firewall (#769) 2017-11-20 16:39:37 -08:00
compute_forwarding_rule.html.markdown Forwarding rule network field supports name in addition of self_link (#487) 2017-10-06 09:33:42 -07:00
compute_global_address.html.markdown global_address ipv6 uses v1 api 2017-09-26 15:57:22 -07:00
compute_global_forwarding_rule.html.markdown Add import support to global forwarding rule (#653) 2017-10-31 11:28:55 -07:00
compute_health_check.html.markdown Fix read method + test/document import for google_compute_health_check (#155) 2017-06-26 18:25:22 +03:00
compute_http_health_check.html.markdown Update docs to mark compute_http(s)_health_check as legacy resources 2017-10-27 13:34:28 +13:00
compute_https_health_check.html.markdown Update docs to mark compute_http(s)_health_check as legacy resources 2017-10-27 13:34:28 +13:00
compute_image.html.markdown 1.0.0 Deprecations, pt 2 2017-09-29 16:04:52 -07:00
compute_instance_group_manager.html.markdown Expand docs for auto_healing_policies in Instance Group Managers 2017-10-27 12:02:50 +13:00
compute_instance_group.html.markdown Fix the description of the compute instance group as it is targeting unmanaged instances (#713) 2017-11-09 14:20:40 -08:00
compute_instance_template.html.markdown Add Alias IP and Guest Accelerator support to Instance Templates (#639) 2017-11-28 10:01:27 -08:00
compute_instance.html.markdown Add Alias IP and Guest Accelerator support to Instance Templates (#639) 2017-11-28 10:01:27 -08:00
compute_network_peering.html.markdown Add new resource google_compute_network_peering (#259) 2017-07-28 09:51:29 -07:00
compute_network.html.markdown Update docs to reflect removal and deprecations. 2017-09-28 15:51:31 -07:00
compute_project_metadata_item.html.markdown Revert "Revert metadata item changes (#225)" (#257) 2017-07-28 10:49:02 -07:00
compute_project_metadata.html.markdown Add links to official docs across compute Terraform Google Provider docs (#264) 2017-07-28 11:05:48 -07:00
compute_region_autoscaler.html.markdown Fix autoscaler and org policies docs (#584) 2017-10-13 10:14:21 -07:00
compute_region_backend_service.html.markdown update region backend service docs (#650) 2017-10-30 13:27:14 -07:00
compute_region_instance_group_manager.html.markdown Expand docs for auto_healing_policies in Instance Group Managers 2017-10-27 12:02:50 +13:00
compute_route.html.markdown Fix import for compute_route (#565) 2017-10-13 11:05:22 -07:00
compute_router_interface.html.markdown Add links to official docs across compute Terraform Google Provider docs (#264) 2017-07-28 11:05:48 -07:00
compute_router_peer.html.markdown Add links to official docs across compute Terraform Google Provider docs (#264) 2017-07-28 11:05:48 -07:00
compute_router.html.markdown Add google_compute_network_peering docs page to the sidebar and fix the labels for all resources (#269) 2017-08-07 10:13:55 -07:00
compute_shared_vpc_host_project.html.markdown website: revised documentation for Compute Shared VPC resources (#725) 2017-11-13 12:48:18 -08:00
compute_shared_vpc_service_project.html.markdown website: revised documentation for Compute Shared VPC resources (#725) 2017-11-13 12:48:18 -08:00
compute_snapshot.html.markdown Add label support to google_compute_snapshot (#570) 2017-10-13 15:36:03 -07:00
compute_ssl_certificate.html.markdown Add import support for ssl certificate, http/s proxy and url map (#678) 2017-11-09 10:16:57 -08:00
compute_subnetwork.html.markdown Add link to beta section for subnetwork beta parameters (#336) 2017-08-17 10:45:55 -07:00
compute_target_http_proxy.html.markdown Add import support for ssl certificate, http/s proxy and url map (#678) 2017-11-09 10:16:57 -08:00
compute_target_https_proxy.html.markdown Add import support for ssl certificate, http/s proxy and url map (#678) 2017-11-09 10:16:57 -08:00
compute_target_pool.html.markdown Add support to google_compute_target_pool for health checks self_link (#702) 2017-11-08 09:11:17 -08:00
compute_target_ssl_proxy.html.markdown Add new resource google_compute_target_ssl_proxy (#569) 2017-10-13 11:02:42 -07:00
compute_target_tcp_proxy.html.markdown Add import support to google_compute_target_tcp_proxy (#534) 2017-10-05 14:29:53 -07:00
compute_url_map.html.markdown Add import support for ssl certificate, http/s proxy and url map (#678) 2017-11-09 10:16:57 -08:00
compute_vpn_gateway.html.markdown Transfer google provider website 2017-06-09 10:58:02 -04:00
compute_vpn_tunnel.html.markdown r/compute_vpn_tunnel: Mark 'shared_secret' as sensitive 2017-10-10 12:57:52 +01:00
container_cluster.html.markdown add support for ip aliasing in google_container_cluster (#654) 2017-11-27 18:15:03 -05:00
container_node_pool.html.markdown Add support for google_container_node_pool management (#669) 2017-11-21 12:56:29 -08:00
dataproc_cluster.html.markdown Add google_dataproc_cluster resource (#252) 2017-10-30 16:41:37 -07:00
dataproc_job.html.markdown Add google_dataproc_job resource (#253) 2017-11-21 09:32:43 -08:00
dns_managed_zone.markdown Add new data source: google_dns_managed_zone (#268) 2017-07-31 09:27:18 -07:00
dns_record_set.markdown Merge pull request #359 from terraform-providers/paddy_95_dns_ns 2017-11-07 16:46:38 -08:00
google_folder_iam_policy.html.markdown Assign IAM policy to folder. (#447) 2017-09-25 11:30:45 -07:00
google_folder_organization_policy.html.markdown Add new resource google_folder_organization_policy (#747) 2017-11-27 14:53:01 -08:00
google_folder.html.markdown Fix broken link to GCP Resource Manager's folder API doc. (#562) 2017-10-10 09:38:40 -07:00
google_kms_crypto_key_iam_binding.html.markdown IAM resources for KMS KeyRIng and CryptoKey (#781) 2017-11-23 11:26:43 -08:00
google_kms_crypto_key_iam_member.html.markdown IAM resources for KMS KeyRIng and CryptoKey (#781) 2017-11-23 11:26:43 -08:00
google_kms_crypto_key.html.markdown Adds support for creating KMS CryptoKeys resources (#692) 2017-11-14 13:21:25 -08:00
google_kms_key_ring_iam_binding.html.markdown IAM resources for KMS KeyRIng and CryptoKey (#781) 2017-11-23 11:26:43 -08:00
google_kms_key_ring_iam_member.html.markdown IAM resources for KMS KeyRIng and CryptoKey (#781) 2017-11-23 11:26:43 -08:00
google_kms_key_ring.html.markdown Adds support for creating KMS KeyRing resources (#518) 2017-10-27 09:40:01 -07:00
google_organization_iam_binding.md Add IAM binding and member support for organizations (#775) 2017-11-21 14:30:48 -08:00
google_organization_iam_custom_role.html.markdown Add new resource to support IAM custom organization roles (#735) 2017-11-13 16:05:16 -08:00
google_organization_iam_member.md Add IAM binding and member support for organizations (#775) 2017-11-21 14:30:48 -08:00
google_organization_policy.html.markdown Add documentation for import in google_folder_organization_policy (#746) 2017-11-17 09:24:48 -08:00
google_project_iam_binding.html.markdown Newlines, but really this time. 2017-07-27 14:39:28 -07:00
google_project_iam_custom_role.html.markdown Fix wrong filename for project custom role documentation (#734) 2017-11-13 14:57:58 -08:00
google_project_iam_member.html.markdown Newlines, but really this time. 2017-07-27 14:39:28 -07:00
google_project_iam_policy.html.markdown Update docs to reflect removal and deprecations. 2017-09-28 15:51:31 -07:00
google_project_service.html.markdown Add new google_project_service resource for fine-grained service control. (#668) 2017-11-07 15:19:57 -08:00
google_project_services.html.markdown Add new google_project_service resource for fine-grained service control. (#668) 2017-11-07 15:19:57 -08:00
google_project.html.markdown Update google_project docs to reflect that the id field has been removed (#530) 2017-10-04 16:19:43 -07:00
google_service_account_key.html.markdown Correction and clarification of service_account_key docs (#721) 2017-11-10 11:07:05 -08:00
google_service_account.html.markdown Make google_service_account resource importable (#606) 2017-10-25 12:33:21 -07:00
logging_billing_account_sink.html.markdown fix link format (#673) 2017-11-03 09:45:48 -07:00
logging_folder_sink.html.markdown fix link format (#673) 2017-11-03 09:45:48 -07:00
logging_project_sink.html.markdown Make google_logging_project_sink resource importable (#688) 2017-11-07 14:40:22 -08:00
pubsub_subscription.html.markdown Add example in docs for creating a subscription with a topic in another project (#651) 2017-10-30 15:08:50 -07:00
pubsub_topic.html.markdown Pubsub importable (#392) 2017-09-11 09:46:27 -07:00
runtimeconfig_config.html.markdown Add support for Google RuntimeConfig (#315) 2017-08-14 14:16:11 -07:00
runtimeconfig_variable.html.markdown Add support for Google RuntimeConfig (#315) 2017-08-14 14:16:11 -07:00
sourcerepo_repository.html.markdown Rename file. 2017-08-17 14:24:22 -07:00
spanner_database.html.markdown Add Google Spanner Support (google_spanner_database) (#271) 2017-08-14 09:53:11 -07:00
spanner_instance.html.markdown Add Google Spanner Support (google_spanner_instance) (#270) 2017-08-14 09:30:41 -07:00
sql_database_instance.html.markdown Explain that sql_database_instance maintenance windows are specified in UTC 2017-10-21 22:55:02 +13:00
sql_database.html.markdown Document Beta Features in index.html (#280) 2017-08-10 13:28:52 -07:00
sql_user.html.markdown Update existing resource's import docs to be consistent. 2017-06-13 17:02:27 -07:00
storage_bucket_acl.html.markdown chore(docs): add undocumented attributes 2017-06-30 12:36:47 +02:00
storage_bucket_object.html.markdown Update docs to reflect removal and deprecations. 2017-09-28 15:51:31 -07:00
storage_bucket.html.markdown Add labels to google_storage_bucket (#652) 2017-10-30 15:48:26 -07:00
storage_object_acl.html.markdown fixing example of google_storage_object_acl (#642) 2017-11-02 10:50:54 -07:00