Skip to content

Commit

Permalink
Enable service networking connections in GA (hashicorp#838)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored and emilymye committed Jun 15, 2019
1 parent 3654a14 commit 9116f51
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion google-beta/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import (
"google.golang.org/api/pubsub/v1"
runtimeconfig "google.golang.org/api/runtimeconfig/v1beta1"
"google.golang.org/api/servicemanagement/v1"
servicenetworking "google.golang.org/api/servicenetworking/v1beta"
"google.golang.org/api/servicenetworking/v1"
"google.golang.org/api/serviceusage/v1"
"google.golang.org/api/sourcerepo/v1"
"google.golang.org/api/spanner/v1"
Expand Down
8 changes: 4 additions & 4 deletions google-beta/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ func Provider() terraform.ResourceProvider {

// Handwritten Products / Versioned / Atypical Entries
// start beta-only products
IAPCustomEndpointEntryKey: IAPCustomEndpointEntry,
ServiceNetworkingCustomEndpointEntryKey: ServiceNetworkingCustomEndpointEntry,
IAPCustomEndpointEntryKey: IAPCustomEndpointEntry,
// end beta-only products
CloudBillingCustomEndpointEntryKey: CloudBillingCustomEndpointEntry,
ComposerCustomEndpointEntryKey: ComposerCustomEndpointEntry,
Expand All @@ -121,6 +120,7 @@ func Provider() terraform.ResourceProvider {
RuntimeconfigCustomEndpointEntryKey: RuntimeconfigCustomEndpointEntry,
IAMCustomEndpointEntryKey: IAMCustomEndpointEntry,
ServiceManagementCustomEndpointEntryKey: ServiceManagementCustomEndpointEntry,
ServiceNetworkingCustomEndpointEntryKey: ServiceNetworkingCustomEndpointEntry,
ServiceUsageCustomEndpointEntryKey: ServiceUsageCustomEndpointEntry,
BigQueryCustomEndpointEntryKey: BigQueryCustomEndpointEntry,
CloudFunctionsCustomEndpointEntryKey: CloudFunctionsCustomEndpointEntry,
Expand Down Expand Up @@ -390,7 +390,6 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
config.TpuBasePath = d.Get(TpuCustomEndpointEntryKey).(string)

config.IAPBasePath = d.Get(IAPCustomEndpointEntryKey).(string)
config.ServiceNetworkingBasePath = d.Get(ServiceNetworkingCustomEndpointEntryKey).(string)
config.CloudBillingBasePath = d.Get(CloudBillingCustomEndpointEntryKey).(string)
config.ComposerBasePath = d.Get(ComposerCustomEndpointEntryKey).(string)
config.ComputeBetaBasePath = d.Get(ComputeBetaCustomEndpointEntryKey).(string)
Expand All @@ -406,6 +405,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
config.RuntimeconfigBasePath = d.Get(RuntimeconfigCustomEndpointEntryKey).(string)
config.IAMBasePath = d.Get(IAMCustomEndpointEntryKey).(string)
config.ServiceManagementBasePath = d.Get(ServiceManagementCustomEndpointEntryKey).(string)
config.ServiceNetworkingBasePath = d.Get(ServiceNetworkingCustomEndpointEntryKey).(string)
config.ServiceUsageBasePath = d.Get(ServiceUsageCustomEndpointEntryKey).(string)
config.BigQueryBasePath = d.Get(BigQueryCustomEndpointEntryKey).(string)
config.CloudFunctionsBasePath = d.Get(CloudFunctionsCustomEndpointEntryKey).(string)
Expand Down Expand Up @@ -451,7 +451,6 @@ func ConfigureBasePaths(c *Config) {
// Handwritten Products / Versioned / Atypical Entries
// start beta-only products
c.IAPBasePath = IAPDefaultBasePath
c.ServiceNetworkingBasePath = ServiceNetworkingDefaultBasePath
// end beta-only products
c.CloudBillingBasePath = CloudBillingDefaultBasePath
c.ComposerBasePath = ComposerDefaultBasePath
Expand All @@ -467,6 +466,7 @@ func ConfigureBasePaths(c *Config) {
c.RuntimeconfigBasePath = RuntimeconfigDefaultBasePath
c.IAMBasePath = IAMDefaultBasePath
c.ServiceManagementBasePath = ServiceManagementDefaultBasePath
c.ServiceNetworkingBasePath = ServiceNetworkingDefaultBasePath
c.ServiceUsageBasePath = ServiceUsageDefaultBasePath
c.BigQueryBasePath = BigQueryDefaultBasePath
c.CloudFunctionsBasePath = CloudFunctionsDefaultBasePath
Expand Down
2 changes: 1 addition & 1 deletion google-beta/provider_handwritten_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ var ServiceManagementCustomEndpointEntry = &schema.Schema{
}, ServiceManagementDefaultBasePath),
}

var ServiceNetworkingDefaultBasePath = "https://servicenetworking.googleapis.com/v1beta/"
var ServiceNetworkingDefaultBasePath = "https://servicenetworking.googleapis.com/v1/"
var ServiceNetworkingCustomEndpointEntryKey = "service_networking_custom_endpoint"
var ServiceNetworkingCustomEndpointEntry = &schema.Schema{
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion google-beta/resource_service_networking_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"

"github.com/hashicorp/terraform/helper/schema"
servicenetworking "google.golang.org/api/servicenetworking/v1beta"
"google.golang.org/api/servicenetworking/v1"
)

func resourceServiceNetworkingConnection() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion google-beta/service_networking_operation.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package google

import (
servicenetworking "google.golang.org/api/servicenetworking/v1beta"
"google.golang.org/api/servicenetworking/v1"
)

type ServiceNetworkingOperationWaiter struct {
Expand Down
2 changes: 1 addition & 1 deletion website/docs/provider_reference.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ be used for configuration are below:
* `resource_manager_v2beta1_custom_endpoint` (`GOOGLE_RESOURCE_MANAGER_V2BETA1_CUSTOM_ENDPOINT`) - `https://cloudresourcemanager.googleapis.com/v2beta1/`
* `runtimeconfig_custom_endpoint` (`GOOGLE_RUNTIMECONFIG_CUSTOM_ENDPOINT`) - `https://runtimeconfig.googleapis.com/v1beta1/`
* `service_management_custom_endpoint` (`GOOGLE_SERVICE_MANAGEMENT_CUSTOM_ENDPOINT`) - `https://servicemanagement.googleapis.com/v1/`
* `service_networking_custom_endpoint` (`GOOGLE_SERVICE_NETWORKING_CUSTOM_ENDPOINT`) - `https://servicenetworking.googleapis.com/v1/`
* `service_usage_custom_endpoint` (`GOOGLE_SERVICE_USAGE_CUSTOM_ENDPOINT`) - `https://serviceusage.googleapis.com/v1/`
* `source_repo_custom_endpoint` (`GOOGLE_SOURCE_REPO_CUSTOM_ENDPOINT`) - `https://sourcerepo.googleapis.com/v1/`
* `spanner_custom_endpoint` (`GOOGLE_SPANNER_CUSTOM_ENDPOINT`) - `https://spanner.googleapis.com/v1/`
Expand All @@ -261,7 +262,6 @@ The following keys are available exclusively in the `google-beta` provider:
* `iap_custom_endpoint` (`GOOGLE_IAP_CUSTOM_ENDPOINT`) - `https://iap.googleapis.com/v1beta1/`
* `monitoring_custom_endpoint` (`GOOGLE_MONITORING_CUSTOM_ENDPOINT`) - `https://monitoring.googleapis.com/v3/`
* `security_scanner_custom_endpoint` (`GOOGLE_SECURITY_SCANNER_CUSTOM_ENDPOINT`) - `https://websecurityscanner.googleapis.com/v1beta/`
* `service_networking_custom_endpoint` (`GOOGLE_SERVICE_NETWORKING_CUSTOM_ENDPOINT`) - `https://servicenetworking.googleapis.com/v1beta/`

-> Note that some endpoints are a versioned variant of another. These exist in
cases where the `google` provider uses multiple distinct endpoints, and both
Expand Down
3 changes: 0 additions & 3 deletions website/docs/r/service_networking_connection.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ description: |-

# google\_service\_networking\_connection

~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider.
See [Provider Versions](https://terraform.io/docs/providers/google/provider_versions.html) for more details on beta resources.

Manages a private VPC connection with a GCP service provider. For more information see
[the official documentation](https://cloud.google.com/vpc/docs/configure-private-services-access#creating-connection)
and
Expand Down

0 comments on commit 9116f51

Please sign in to comment.