Commit Graph

72 Commits

Author SHA1 Message Date
Chris Stephens
404e7297f0 Remove vendor code for UUIDs
This doesn't appear to be used anywhere within this project.
Additionally Hashicorp has their own [uuid library](https://github.com/hashicorp/go-uuid)
which is used internally.
2018-09-05 14:22:13 -07:00
Chris Stephens
abcd2179de Updating the GCP dns api client. 2018-09-05 14:13:53 -07:00
Paddy Carver
f946490db2 Update logging vendor.
Update the vendored version of our logging helper, so we get requests
printed.
2018-08-31 10:13:52 -07:00
emily
96b17536b9
Initial TF commits needed for cloud composer support (#1926)
* add cloud composer vendor

* init composer client and resource map
2018-08-22 15:59:05 -07:00
Dana Hoffman
9b7f435ec3
Revert "revendor hashicorp/terraform (#1923)" (#1925)
This reverts commit 654350d3d3.
2018-08-22 12:46:58 -07:00
Dana Hoffman
654350d3d3
revendor hashicorp/terraform (#1923)
`govendor fetch github.com/hashicorp/terraform/...@v0.11.8`

I figured this was a good time to do it since we just had a release. I verified that everything still compiles and that a few tests are passing- I don't expect anything else to change, but if there are any weird failures that this exposes we'll catch them in CI with plenty of time before the next release.
2018-08-22 12:13:40 -07:00
Dana Hoffman
d1bf585724
Add support for binary authorization in GKE (#1884)
* revendor container/v1beta1

* add support for binauthz in gke

* update description
2018-08-16 17:51:03 -07:00
Riley Karson
8506527a80 Add support for boot_disk_type to google_dataproc_cluster (#1855) 2018-08-15 23:00:11 -07:00
emily
9d15f6162f
Vendor update to compute (#1756) 2018-07-12 10:47:18 -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
f6f062d696
Merge pull request #1620 from terraform-providers/paddy_update_vendor
Update schema to 0.11.7.
2018-06-11 13:08:54 -07:00
Vincent Roseberry
32d965062d
Support update for DNS Managed Zone (#1617)
* vendor google.golang.org/api/dns/v1beta2

* Support update for DNS Managed Zone
2018-06-08 09:27:08 -07:00
Paddy
5117943e38 Add missing dependency. 2018-06-07 18:20:29 -07:00
Paddy Carver
709d537a1c Update schema to 0.11.7.
Update our helper/schema to v0.11.7, and update all its dependencies to
their latest, as well.
2018-06-07 15:38:10 -07:00
Dana Hoffman
dc46348d67
Add support for custom request headers in backend services (#1537)
* revendor compute beta apis

* changes to subnetwork iam from api revendoring

* add support for custom request headers in backend services
2018-05-29 13:29:40 -07:00
Dana Hoffman
974c3f7646
Add GKE Shared VPC support (#1528)
All this needed was to allow setting the network/subnetwork to a self link.

~WIP for now because I want to run the tests in CI.~ Tests are passing.
2018-05-23 16:47:17 -07:00
Dana Hoffman
20616e424d
Use new serviceusage API for google_project_service[s] (#1522)
* vendor service usage api

* use serviceusage api instead of servicemanagement for project services

* add bigquery-json to test

* add import for project service

* add serviceusage_operation.go
2018-05-22 17:45:22 -07:00
Dana Hoffman
bc8f3046ad
initial tf changes needed to support redis (#1513) 2018-05-21 12:01:06 -07:00
Paddy
cd7364d649
Merge pull request #1503 from terraform-providers/paddy_app_engine_app
Add App Engine Application support
2018-05-18 17:12:34 -07:00
Paddy Carver
e74ab9d507 Vendor. 2018-05-18 16:08:15 -07:00
Dan Couture
4f7a6c828f Add new google_cloudbuild_trigger resource (#1357) 2018-05-07 12:53:34 -07:00
Nick Jacques
0d309b1e56 Update ssl_policy to use v1 API (#1368)
* Update compute/v1 to latest

* Update ssl_policy resource and test to v1 API
2018-04-24 14:43:00 -07:00
Nathan McKinley
d3bbfbd22b
Add DNS PTR record to Compute Instance (#1349) 2018-04-20 11:14:38 -07:00
Janos Lenart
1840363c74 Adding private_cluster (#1250)
* Updated google.golang.org/api/container/v1beta1

* Added support for private_cluster and master_ipv4_cidr

This is to implement #1174. See
https://groups.google.com/forum/#!topic/google-cloud-sdk-announce/GGW3SQSANIc

* Added simple test for private_cluster and master_ipv4_cidr

* Review replies

* Added some documentation for private_cluster
2018-03-30 10:10:25 -07:00
Dana Hoffman
fde96ca9d9
Add new google_compute_security_policy resource (#1242)
* revendor compute/v0.beta

* add new `google_compute_security_policy` resource

* docs updates for security policy

* Add link to official docs
2018-03-21 16:52:23 -07:00
Dana Hoffman
6d8a8b1747
Add more beta scaffolding for GKE resources (#1139)
* vendor container/v1beta1

* revendor container/v1beta1

* add beta scaffolding for gke resources

* fix json unmarshal error

* fix issues with trying to convert interface instead of struct

* same fixes but for node pool

* move setid calls back
2018-03-06 17:44:05 -08:00
Simon Pizonka
fec2f0bc02 Add support for Google Cloud IoT Core registry (#970) 2018-01-24 13:03:09 -08:00
Lawrence Jones
9f42aeb652 PostgreSQL high availability (#1001)
* Update sqladmin api

Pull in updates to the generated sqladmin api and update callers for
the change in the StorageAutoResize setting

* Add support for availability_type setting

Allow specifying ZONAL or REGIONAL to allow for PostgreSQL HA
setup.

* vendor: update sqladmin/v1beta4

* Test setting AvailabilityType for PostgreSQL

Add tests that cover the creation of a Postgres database with
AvailabilityType set to REGIONAL, and correct some small issues that
were preventing compilation.

* Fix breaking change w/ disk_autoresize in cloudsql

95e5582766

The cloudsql admin client changed the way it handles StorageAutoResize
as a parameter, in order to be more explicit about when the server has
ommitted the field. This changed the type from being bool to *bool, and
we need to modify provider code so that we supply the right value to the
api client.
2018-01-24 09:23:48 -08:00
Vincent Roseberry
c9826b1452
Support subnetwork IP CIDR range expansion (#945)
* Vendor schema/helper/customdiff

* Support subnetwork IP CIDR range expansion

* Change wording
2018-01-17 12:58:37 -08:00
Nathan McKinley
f50d4a19b4
New Resource: Dataflow Job (#855)
Add support for Google Dataflow jobs

Note: A dataflow job exists when it is in a nonterminal state, and does not exist if it
is in a terminal state (or a non-running state which can only transition into terminal
states).  See doc for more detail.
2018-01-10 14:38:15 -08:00
sarunask
f07c332849 Cloud functions (#899)
* Initial commit

* Adding google_cloudfunction_function resource

* Some FMT updates

* Working Cloud Function Create/Delete/Get
Create is limited to gs:// source now.

* Fixed tests import

* Terraform now is able to apply and destroy function

* Fully working Basic test

* Added:
1. Allowed region check
2. readTimeout helper

* Found better solution for conflicting values

* Adding description

* Adding full basic test

* dded Update functionality

* Made few more optional params

* Added test for Labels

* Added update tests

* Added storage_* members and made function source deploy from storage bucket object

* Adding comments

* Adding tests for PubSub

* Adding tests for Bucket

* Adding Data provider

* Fixing bug which allowed to miss error

* Amending Operation retrieval

* Fixing vet errors and vendoring cloudfunctions/v1

* Fixing according to comments

* Fixing according to comments round #2

* Fixing tabs to space

* Fixing tabs to space and some comments #3

* Re-done update to include labels in one update with others

* Adding back default values. In case of such scenario, when user creates function with some values for "timeout" or "available_memory_mb", and then disables those attributes. Terraform plan then gives:
No changes. Infrastructure is up-to-date.
This is an error. By adding const we would avoid this error.

* Fixed MixedCase and more tabs
2018-01-10 13:25:43 -08:00
Vincent Roseberry
0569f41f3c
Upgrade terraform core to v0.11.2 (#940) 2018-01-10 10:52:15 -08:00
Nathan McKinley
a767b11593
Revendor servicemanagement API. (#921) 2018-01-04 17:26:30 -08:00
Vincent Roseberry
293728929f
Add update support for routing mode in google_compute_network (#857)
* Fetch latest compute v1 client

* Add update support for rounting in google_compute_network
2017-12-14 14:28:58 -08:00
Vincent Roseberry
433fdcc49f
Storage bucket doesn't remove lifecycle rules properly (#850)
* Update storage client

* Read lifecycle from API and improve acceptance tests
2017-12-13 16:46:48 -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
454384fc70
All beta fields in compute firewall are GA (#768)
* Upgrade compute v1 client
* Upgrade gensupport
* Use v1 API now that all beta features are in GA for `google_compute_firewall`
2017-11-20 15:38:47 -08:00
Vincent Roseberry
ab68b06af5
Add new resource to support IAM custom project roles. (#709)
* Upgrade iam client to latest version
* Add new resource to support IAM custom roles.
* Add documentation
2017-11-10 11:01:33 -08:00
Dana Hoffman
06356c2fc7
Revendor hashicorp/terraform (#697)
* revendor hashicorp/terraform @0.10.1

* revendor hashicorp/go-plugin
2017-11-07 11:29:51 -08:00
Nicki Watt
96ac8fc8a4 Add google_dataproc_cluster resource (#252)
* Add google_dataproc_cluster resource

* Add google_dataproc_cluster tests

* Add google_dataproc_cluster docs

* Removed google_dataproc_job ref (to be added in separate PR)

* Added delete_autogen_bucket attribute

* Refactored / simplified wait mechanism

* Changes based on review

* go fmt

* Add  cluster_config enclosing config block

* Review updates - primarily re restructuring hierarchy

* Removed rogue import

* docs - alignment

* Changes for review

* Refactoring into expandXXX methods

* Refactoring of flattenXXX methods to be explicit
2017-10-30 16:41:37 -07:00
Dana Hoffman
7b69c31f6a
Add labels to google_storage_bucket (#652)
* revendor storage

* revendor gensupport

* revendor bigquery

* add support for storage bucket labels

* bucket label docs
2017-10-30 15:48:26 -07:00
Michael Parker
f2fc78d082 Adds support for creating KMS KeyRing resources (#518)
* Instantiate the cloudkms client

* Implement Create and Read for the kms key ring resource

* Expose the kms key ring resource

* Create acceptance test for creating a KeyRing, fix read to use KeyRing ID

* Add cloudkms library to vendor

* Address style comments

* Use fully-qualified keyring name in read operation

* Remove call to SetId during read operation

* Set ID as entire resource string

* Spin up a new project for acceptance test

* Use Getenv for billing and org environment variables

* And test and logs around removal from state

* Add comments

* Fixes formatting

* Log warning instead of info

* Use a single line for cloudkms client actions

* Add resource import test

* Add ability to import resource, update helper functions to use keyRingId struct

* Use shorter terraform ID for easier import

* Update import test to use the same config as the basic test

* Update KeyRing name regex to be consistent with API docs

* Add documentation page for resource

* Add KeyRing documentation to sidebar

* Adds unit tests around parsing the KeyRing import id

* Allow for project in id to be autopopulated from config

* Throw error in import if project provider is not provided for location/name format

* Consistent variable names

* Use tabs in resource config instead of spaces

* Remove "-x" suffix for docs

* Set project attribute on import if different from the project config
2017-10-27 09:40:01 -07:00
David Quarles
7bac0a2db6 update container/v1 API (#624) 2017-10-25 13:52:00 -07:00
Sébastien GLON
94e0b746df Add support for google_service_account_key (#472)
* Initial support for google service account keys

* Add vendor for vault and encryption

* Add change for PR comment

* Add doc and improvement fo public key management

* adding waiter for compatibility with issue google/google-api-go-client#234

* improvement

* Add test with pgp_key

* Perform doc anf format

* remove test if public_key exists

* Add link on doc

* correct pr
2017-10-25 12:43:20 -07:00
Vincent Roseberry
87f3a58cb2 Add support for org policies at the organization level (#523)
* Fetch latest resource manager client
* Add new resource to manage Org Policy at the organization level.
* Update documentation
2017-10-05 13:20:16 -07:00
Joe Selman
475ddb1b5b Add kubernetes dashboard addon (#464)
* Update google.golang.org/api/container/v1

* Add support for kubernetes_dashboard addon

* Fix tab/spaces issue in string
2017-10-03 09:29:27 -07:00
Vincent Roseberry
b5e1bf4a82 Remove alias ip range from beta feature for compute instance 2017-09-28 10:48:28 -07:00
Joe Selman
3d5eccc1c6 Add stackdriver project sink support (#432)
* Vendor cloud logging api

* Add logging sink support

* Remove typo

* Set Filter simpler

* Rename typ, typName to resourceType, resourceId

* Handle notFoundError

* Use # instead of // for hcl comments

* Cleanup test code

* Change testAccCheckLoggingProjectSink to take a provided api object

* Fix whitespace change after merge conflict
2017-09-14 19:15:14 -07:00
Vincent Roseberry
167abea500 Create, update, move and delete a GCP folders. (#416)
* Initialize resourcemanager v2beta1 client
* Create new google_folder resource supporting create, move, update and delete operations.
* Add documentation for folders
2017-09-14 11:19:58 -07:00
Dana Hoffman
2d733a1600 Add new google_compute_shared_vpc resource (#396)
* Revendor compute apis

* Add new resource for shared VPC host

* add test for disabled

* add docs for shared vpc host resource

* make project required

* Add new resource google_compute_shared_vpc

* Remove google_compute_shared_vpc_host

* Add docs for shared vpc resource

* Remove docs for shared vpc host resource

* fix typos in shared vpc docs

* move helper fn to utils.go
2017-09-13 10:36:07 +08:00