Commit Graph

1646 Commits

Author SHA1 Message Date
Philip Cristiano
54ea8bb732 examples: Fix credentials key (#821)
This is out of date and now uses `credentials` as the key
2017-12-06 10:15:42 -08:00
Vincent Roseberry
d4e297ec44
Add google_kms_key_ring_iam_policy resource and improve iam docs (#814)
* Add google_kms_key_ring_iam_policy resource and improve iam docs
* Delete iam_binding and iam_member specific doc page for key ring
2017-12-06 09:33:21 -08:00
Daniel Compton
7f703c954e Explain that compute_url_map needs self link for test.service (#818) 2017-12-05 11:26:45 -08:00
Vincent Roseberry
c9a06ebc58
Update CHANGELOG.md 2017-12-01 12:04:54 -08:00
Vincent Roseberry
0d2c0d72f3
Update CHANGELOG.md 2017-12-01 12:04:46 -08:00
Vincent Roseberry
12baa8766b
Add support for min_cpu_platform to instance_template (#808)
* Add support for min_cpu_platform to instance_template

* Set value in initializer

* Extract test min cpu platform value in a const
2017-12-01 12:03:19 -08:00
Paddy
41a952cdfa
Update CHANGELOG.md 2017-11-30 14:30:09 -08:00
Paddy
63df11e22b
Merge pull request #807 from terraform-providers/paddy_729_ns
Only handle root NS records special.
2017-11-30 14:28:42 -08:00
Vincent Roseberry
e2aefd246a
Move KMS resources docs into its own sub-menu (#812) 2017-11-30 13:12:06 -08:00
tf-release-bot
7f9ca83142 Cleanup after v1.3.0 release 2017-11-30 18:06:22 +00:00
tf-release-bot
3ea4835c6f
v1.3.0 2017-11-30 18:02:26 +00:00
Vincent Roseberry
aff87e976c
Add explanation for member field (#809) 2017-11-30 09:10:24 -08:00
Paddy
400a764f38 Clean up silly variable use. 2017-11-29 17:17:33 -08:00
Paddy
bb8725e513 Only handle root NS records special.
We introduced special handling for NS records in 1.2.0 under the
assumption that ALL NS records can't be deleted. This isn't actually
true. Only NS records for the naked domain of the managed zone can't be
removed; all other NS records can be. Because of this, 1.2.0 contains a
bug where all NS records are removed.

This update fixes the situation to only use special handling on NS
records that are for the naked root domain of the managed zone, and
treat all subdomain NS records as normal records. It also adds a test to
ensure this functionality.

Fixes #729.
2017-11-29 16:21:01 -08:00
Paddy
79573e2469
Update CHANGELOG.md 2017-11-29 15:53:31 -08:00
Dana Hoffman
15e8bd4a68
Update CHANGELOG.md 2017-11-29 15:52:35 -08:00
Paddy
645dfa473e
Merge pull request #805 from terraform-providers/paddy_legacy_ipv4
Unremove ipv4_range on networks.
2017-11-29 15:51:41 -08:00
Dana Hoffman
0ef0367273
give disk_autoresize a default (#806) 2017-11-29 15:51:00 -08:00
Dana Hoffman
10819a1821
update docs to say GKE or Kubernetes instead of container (#804)
* update docs to say GKE or Kubernetes instead of container

* use GKE in more places
2017-11-29 15:40:27 -08:00
Paddy
c9fb64ed57 Unremove ipv4_range on networks.
We removed ipv4_range, but the API still exists, it's just deprecated.
This breaks configs for users that haven't migrated off yet. I added it
back, added some tests to use it, included it in the docs, and basically
tried to put things back the way they were. The main difference now is
that the auto_create_subnetworks field defaults to true, and we want to
keep that behaviour to avoid a breaking change. So now if users want to
use the lagacy API, they need to set auto_create_subnetworks to false
explicitly.
2017-11-29 15:03:36 -08:00
Vincent Roseberry
8f701c6ebb
Remove getNetworkName method and use ParseNetworkFieldValue instead (#802) 2017-11-29 10:54:10 -08:00
Konrad Rotkiewicz
2f1b3a739c add empty value for ip version for global address (#799) 2017-11-29 10:07:40 -08:00
Vincent Roseberry
c812b83fa7
Detect changes to local file or changes made outside of Terraform to the file stored on the server. (#798)
* Detect changes to local file or changes made outside of Terraform to the file stored on the server.
* Add comment about why the detect_md5hash field is optional and not computed
2017-11-29 10:03:03 -08:00
Dana Hoffman
50afa7b199
compute instance helpers / metadata cleanup (#797)
* get rid of getSubnetworkLink and getProjectAndRegionFromSubnetworkLink

* dedupe metadata flatteners

* update flattenMetadata comment
2017-11-29 09:47:42 -08:00
Vincent Roseberry
1ee386b33b
Fix service_account_id field validation in service account key (#795) 2017-11-28 14:37:46 -08:00
Dana Hoffman
3ec37d2864
Update CHANGELOG.md 2017-11-28 10:01:50 -08:00
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
Vincent Roseberry
c30fdf702d
Update CHANGELOG.md 2017-11-27 18:00:55 -08:00
Vincent Roseberry
d4c5a718a5
Validate account_id length in google_service_account (#793)
* Add validation method for RFC1035 names
2017-11-27 17:58:11 -08:00
Vincent Roseberry
f441685699
Update CHANGELOG.md 2017-11-27 16:32:51 -08:00
Vincent Roseberry
6c5d6b72e0
Store project and region in state (#784)
* Store project and region in state

* Delete unused project in runtimeconfig_variable
2017-11-27 16:32:20 -08:00
Vincent Roseberry
9930daa2af
Always use a function to create a test config (#785) 2017-11-27 16:32:00 -08:00
Vincent Roseberry
9791dad88e
Update CHANGELOG.md 2017-11-27 16:25:37 -08:00
Vincent Roseberry
a9fd5fddcb
Detect changes to cloud storage object when using source field. (#789)
* Detect server or local changes to bucket object when using source field

* Improve tests by removing global err and tf vars

* Address Dana's comments
2017-11-27 16:25:32 -08:00
Dana Hoffman
4794245a1e
Update CHANGELOG.md 2017-11-27 15:15:26 -08:00
David Quarles
d57db91143 add support for ip aliasing in google_container_cluster (#654)
* add support for ip aliasing in `google_container_cluster`

* [review] cleanup galore, infer feature enablement from `ip_allocation_policy`

* [review] cleanup, round 2

* add nil check back (when reading ip allocation policy from API)
2017-11-27 18:15:03 -05:00
Vincent Roseberry
96726bdc48
Update CHANGELOG.md 2017-11-27 14:53:55 -08:00
Vincent Roseberry
10f764aa9b
Add new resource google_folder_organization_policy (#747)
* Add new resource google_folder_organization_policy
* Add documentation
2017-11-27 14:53:01 -08:00
Dana Hoffman
c69fc07a6d
Update CHANGELOG.md 2017-11-27 12:40:41 -08:00
Sébastien GLON
39f22ef924 [WIP] Add container cluster network policy addon (#630)
* replalce TypeList by TypeSet

* Add network policy

* test improvement

* correct test

* Add cluster network polocy enabled

* Replalce network_policy addons by global network_policy enabled

* Update node_config.go

* Update resource_container_cluster.go

* clean

* clean

* Correct PR

* COrrect PR

* pr

* fix test to use same name

* add more documentation
2017-11-27 15:40:07 -05:00
Vincent Roseberry
40c20047b1
Revert "Added support for updating a cloud storage object using source field (#362)" (#787)
This reverts commit 5ba87f3d9e.
2017-11-24 11:10:58 -08:00
Rodrigue Cloutier
5ba87f3d9e Added support for updating a cloud storage object using source field (#362) 2017-11-24 10:25:53 -08:00
Vincent Roseberry
e15e7742bf
Update CHANGELOG.md 2017-11-23 11:28:21 -08:00
James Turley
6f4a7926ba IAM resources for KMS KeyRIng and CryptoKey (#781)
* Add IAM bindings and member resources for KMS KeyRings

* Add IAM bindings and member resources for KMS CryptoKeys

* Docs for key ring and crypto key IAM resources

* Exctract KMS policy conversions to helper functions

* Split iam_binding and iam_member tests for KMS

* Docs for kms IAM member resources

* Run KMS IAM tests in own project
2017-11-23 11:26:43 -08:00
Dana Hoffman
7a080b83b4
Update CHANGELOG.md 2017-11-21 15:07:26 -08:00
James McGill
ca545e2171 Set UseLegacySql to true for compatibility with the BigQuery API (#724)
* Set UseLegacySql to true for compatibility with the BigQuery API

* make gofmt happy
2017-11-21 15:06:59 -08:00
Vincent Roseberry
ac0948e7d6
Refactored authoritative IAM policy logic to be reusable (#776) 2017-11-21 14:58:02 -08:00
Vincent Roseberry
db4273652d
Update CHANGELOG.md 2017-11-21 14:32:34 -08:00
Vincent Roseberry
e70d1fc44b
Add IAM binding and member support for organizations (#775) 2017-11-21 14:30:48 -08:00
Vincent Roseberry
fdfa9a5eb0
Fix Iam Binding to not rely on project specific code (#774) 2017-11-21 13:00:05 -08:00