Commit Graph

89 Commits

Author SHA1 Message Date
Miriam Lauter
bc927db71a Add support for Shielded VMs to compute_instance and compute_instance_template (#3209) (#3531) 2019-05-16 10:18:53 -07:00
Zach Berger
04035dbccc Add support for creating instances with CMEK (#3481)
* Add support for creating instances with CMEK

* Add documentation for specifying KMS key.

* Address review comments.

* Fix ConflictsWith for kms_key_self_link

* Guard on disk values being set

* Address KmsKey self link issues

* Create resources needed for tests.

* Fix test comparison
2019-05-13 13:32:20 -07:00
The Magician
267b37a9b9 Add node_affinities to instance/template (#3553)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-05-06 13:10:01 -07:00
The Magician
5ce5686d49 Retry instance metadata on fingerprint mismatch. (#3372)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-04-24 14:01:47 -07:00
The Magician
55c7a8b332 Hard remove broken Removed fields, fix 0.12 configs (#3437)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-04-15 18:14:01 -07:00
The Magician
5c925718d1 012 instance from template (#3434)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-04-15 14:21:24 -07:00
The Magician
f0941f7138 Remove 'Set' from fields where it doesn't do anything (#3364)
<!-- This change is generated by MagicModules. -->
Original Author: @chrisst
2019-04-02 13:58:53 -07:00
The Magician
23db6b0c12 Fix golangci-lint errors (#3059)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-02-14 16:00:35 -08:00
The Magician
f9903ee041 google_compute_instance change a removed field from optional -> computed (#3010)
<!-- This change is generated by MagicModules. -->
/cc @rileykarson
2019-02-06 16:22:35 -08:00
The Magician
ced540ceca Add hostname field to compute_instance (#2952)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-01-29 09:44:21 -08:00
The Magician
c605b0bc4b [Terraform]: Apply gofmt -s to all files managed by MM (#2676)
<!-- This change is generated by MagicModules. -->
/cc @rileykarson
2018-12-20 17:22:22 -08:00
The Magician
caa1bd9664 send scheduling block with automaticrestart if there is none in cfg (#2638) 2018-12-20 17:22:22 -08:00
The Magician
77e87d0f9b Remove google_compute_instance*.address (#2595)
<!-- This change is generated by MagicModules. -->
/cc @rileykarson
2018-12-20 17:22:22 -08:00
Chris Stephens
ae09a200c7 deprecate address as originally intended 2018-12-20 17:22:22 -08:00
Chris Stephens
b8de3fd850 Deprecate network fields (#2235)
* removing old removed network fields

* Remove ipv4range option
2018-12-20 17:22:22 -08:00
Chris Stephens
a0e2d50331 Change deprecated fields back to 'Removed' (#2241)
* Change deprecated fields back to 'Removed'

To provide a better user experience we're going to mark the fields as removed
so that users will get a more accurate error message. We will follow up a while
later to actually remove them from schema.
2018-12-20 17:22:22 -08:00
Chris Stephens
50fe1b6c83 Remove address and create_timeout from instance (#2219) 2018-12-20 17:22:22 -08:00
Riley Karson
8c42015451 Make google_compute_instance metadata authoritative. (#2208) 2018-12-20 17:22:22 -08:00
Riley Karson
a4a453dc1b
Deprecate assigned_nat_ip in compute_instance family (#2155)
Part of #2143
2018-10-02 16:07:28 -07:00
Riley Karson
41d47ec8bb
Deprecate address in compute_instance family, undeprecate network_ip (#2096)
Also remove a duplicate instance test I noticed for ephemeral ips.
2018-09-26 11:19:25 -07:00
Nathan McKinley
f05d62c89e
Enable multiple alias IP ranges for compute instance. (#2029)
* Enable multiple alias IP ranges for compute instance.
2018-09-11 17:37:35 -07:00
emily
83406c3c5f
fix possible error from nil check (#1942) 2018-08-27 16:22:06 -07:00
Walker
c810e4b408 provider: Ensures schema.TypeMap elements are schema.Schema (#1835) 2018-08-14 16:53:39 -07:00
Dana Hoffman
547245bada allow setting instance scheduling booleans to false 2018-07-16 13:54:47 -07:00
Dana Hoffman
a6198a0b60
prereqs for regional disks (#1753)
In testing an upcoming `google_compute_region_disk` resource, I had to make these changes. Checking them in separately so that when the magician runs, these changes will already be a part of TF.
2018-07-10 17:10:05 -07:00
Dana Hoffman
7e04cee958
add new compute_instance_from_template resource (#1652)
This was done as its own resource as suggested in slack, since we don't have the option of making all fields Computed in google_compute_instance. There's precedent in the aws provider for this sort of thing (see ami_copy, ami_from_instance).

When I started working on this I assumed I could do it in the compute_instance resource and so I went ahead and reordered the schema to make it easier to work with in the future. Now it's not quite relevant, but I left it in as its own commit that can be looked at separately from the other changes.

Fixes #1582.
2018-06-28 16:09:23 -07:00
Paddy Carver
53cc357b4c Fix network_tier tests.
Make network_tier computed, so when it's not specified we don't get a
permadiff.

Always store v1 self_links, so we don't get a permadiff.
2018-06-05 17:49:33 -07:00
Dana Hoffman
2f5c77cd7f add support for network tiers (#1530)
* add support for network tiers

* Update resource_compute_forwarding_rule.go
2018-06-05 12:35:44 -07:00
Dana Hoffman
8907321d60
Roll forward beta scaffolding PR (#1453)
* Revert "Merge pull request #1434 from terraform-providers/paddy_revert_beta"

This reverts commit 118cd71201, reversing
changes made to d59fcbbc59.

* add ConvertSelfLinkToV1 calls to places where beta links are stored
2018-05-09 11:24:40 -07:00
Paddy Carver
aa2626b490 Revert "remove switch statements between api versions for compute"
This reverts commit bf1b3a24e8c1cac832e74d9d0e145c7010a4c2f1.
2018-05-04 07:51:45 -07:00
Dana Hoffman
30409d315e
Remove switch statements between api versions for compute (#1422) 2018-05-03 12:24:21 -07:00
Nathan McKinley
0a02d8eaef
Fix failing compute tests which use AccessConfigs (#1383) 2018-04-25 13:26:24 -07:00
Nathan McKinley
d3bbfbd22b
Add DNS PTR record to Compute Instance (#1349) 2018-04-20 11:14:38 -07:00
Dana Hoffman
8ad6f15478
fix error introduced when attached disks are deleted out of band (#1301)
* fix error introduced when attached disks are deleted out of band

* add comment about nil check
2018-04-06 17:40:49 -07:00
Nick Jacques
8ada4ffdb2 Add deletion_protection wrapper for deleting instance (#1211) 2018-03-16 14:09:21 -07:00
Nick Jacques
46a3d2fd47 Add deletion protection to resource_compute_instance (#1205) 2018-03-16 11:57:42 -07:00
Dana Hoffman
313eb0fb89
Check set equality for service account scope changes (#1130)
* add debug printfs

* more logs for debugging

* check set equality for service acct scope changes

* revert changes to region igm

* style things
2018-02-27 14:29:00 -08:00
Dana Hoffman
2e665f2f35
add support for updating alias ips in instances (#1084) 2018-02-14 15:48:47 -05:00
Nathan McKinley
f7851162a4
Don't set metadata_startup_script in some cases. (#1081) 2018-02-13 23:55:37 -08:00
Chase
e1323489ba Feature: select compute instance attached disk mode (#947) 2018-02-12 10:56:06 -08:00
Dana Hoffman
3b753cefa2
Add update support for machine type, min cpu platform, and service accounts (#1005)
* Add update support for compute instance fields that require the machine to be stopped

* add warnings in docs about stopping the instance before updating

* add allow_stopping_for_update field
2018-01-24 12:50:39 -08:00
Jacob Straszynski
939ba6d365 skip guest accelerators if count is 0. (#866)
* skip guest accelerators if count is 0.

Instances in instance groups in google will fail to provision, despite
requesting 0 GPUs. This came up for me when trying to provision
a similar instance group in all available regions, but only asking for
GPU's in those that support them by parameterizing the `count` and
setting it to 0.

This might be a violation of some terraform principles. For example,
testing locally with this change `terraform` did not recognize that
indeed my infra needed to be re-deployed (from it's pov, I assume it
believes this because inputs hadn't changed). Additionally, there may be
valid reasons for creating an instance template with 0 gpu's that can be
tuned upwards.

* Add guest accelerator skip test for instances.

* do not leave empty pointers to guest accelerators.

* attempt to clear guest accelerator diff

* conditionally customize diff for guest accels
2018-01-23 11:51:36 -08:00
Vincent Roseberry
681cc72f38
Read compute instance boot disk initialization params from API (#948)
* read boot disk initialization param from API

* make fmt

* Mark the initialize_params list as computed to support boot source

* Ensure private family test follow naming pattern

* Improve docs
2018-01-17 13:23:24 -08:00
Vincent Roseberry
d0f5fec463
Standardize resource name extraction from self_link/uri (#939)
* Standardize resource name extraction from self_link/uri

* remove rebase artifact

* style improvement

* Fix merge issue
2018-01-17 10:45:28 -08:00
James McGill
bc266979d4 Revert "Ensure Elem is always either a *Schema or *Resource (#929)" (#950)
This reverts commit a3352655ac.
2018-01-12 10:09:06 -08:00
James McGill
a3352655ac Ensure Elem is always either a *Schema or *Resource (#929)
* Ensure Elem is always either a *Schema or *Resource

* Revert vendor file
2018-01-08 12:48:26 -08:00
Vincent Roseberry
dab491d28d
Make zone field consistent and truly optional for all resources (#914) 2018-01-03 16:18:40 -05:00
Vincent Roseberry
c1d9bb24c9
Support import in compute instance (#873) 2017-12-19 14:33:30 -08:00
Vincent Roseberry
d2289c2ca1
Add configurable timeouts to google_compute_instance (#856) 2017-12-13 17:03:15 -08:00
Nathan McKinley
114b646fae
Enable 'zone' to be specified at the provider level instead of per-resource. (#816)
- Fetch Zone attribute any place where it *was* being fetched from the schema by
	combination schema / provider-level attribute.
- Allow region to be unspecified if zone is specified.
- Switch one example to using provider-level zone as an example.
- Make provider-level zone optional.  (Individual resources will fail if they can't find a zone.)
- Add tests for getZone and getRegion.
2017-12-06 14:30:04 -08:00