Skip to content

Commit

Permalink
Add integrations product. Create Client resource. (#10186) (#17640)
Browse files Browse the repository at this point in the history
[upstream:d874e11de524dddb932b70f4ef1bc7905fb41846]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Mar 20, 2024
1 parent e129d19 commit 17fa00e
Show file tree
Hide file tree
Showing 13 changed files with 659 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/10186.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
google_integrations_client
```
5 changes: 5 additions & 0 deletions .teamcity/components/inputs/services_beta.kt
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,11 @@ var ServicesListBeta = mapOf(
"displayName" to "Integrationconnectors",
"path" to "./google-beta/services/integrationconnectors"
),
"integrations" to mapOf(
"name" to "integrations",
"displayName" to "Applicationintegration",
"path" to "./google-beta/services/integrations"
),
"kms" to mapOf(
"name" to "kms",
"displayName" to "Kms",
Expand Down
5 changes: 5 additions & 0 deletions .teamcity/components/inputs/services_ga.kt
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,11 @@ var ServicesListGa = mapOf(
"displayName" to "Integrationconnectors",
"path" to "./google/services/integrationconnectors"
),
"integrations" to mapOf(
"name" to "integrations",
"displayName" to "Applicationintegration",
"path" to "./google/services/integrations"
),
"kms" to mapOf(
"name" to "kms",
"displayName" to "Kms",
Expand Down
1 change: 1 addition & 0 deletions google/fwmodels/provider_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ type ProviderModel struct {
IapCustomEndpoint types.String `tfsdk:"iap_custom_endpoint"`
IdentityPlatformCustomEndpoint types.String `tfsdk:"identity_platform_custom_endpoint"`
IntegrationConnectorsCustomEndpoint types.String `tfsdk:"integration_connectors_custom_endpoint"`
IntegrationsCustomEndpoint types.String `tfsdk:"integrations_custom_endpoint"`
KMSCustomEndpoint types.String `tfsdk:"kms_custom_endpoint"`
LoggingCustomEndpoint types.String `tfsdk:"logging_custom_endpoint"`
LookerCustomEndpoint types.String `tfsdk:"looker_custom_endpoint"`
Expand Down
6 changes: 6 additions & 0 deletions google/fwprovider/framework_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,12 @@ func (p *FrameworkProvider) Schema(_ context.Context, _ provider.SchemaRequest,
transport_tpg.CustomEndpointValidator(),
},
},
"integrations_custom_endpoint": &schema.StringAttribute{
Optional: true,
Validators: []validator.String{
transport_tpg.CustomEndpointValidator(),
},
},
"kms_custom_endpoint": &schema.StringAttribute{
Optional: true,
Validators: []validator.String{
Expand Down
10 changes: 10 additions & 0 deletions google/fwtransport/framework_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ type FrameworkProviderConfig struct {
IapBasePath string
IdentityPlatformBasePath string
IntegrationConnectorsBasePath string
IntegrationsBasePath string
KMSBasePath string
LoggingBasePath string
LookerBasePath string
Expand Down Expand Up @@ -277,6 +278,7 @@ func (p *FrameworkProviderConfig) LoadAndValidateFramework(ctx context.Context,
p.IapBasePath = data.IapCustomEndpoint.ValueString()
p.IdentityPlatformBasePath = data.IdentityPlatformCustomEndpoint.ValueString()
p.IntegrationConnectorsBasePath = data.IntegrationConnectorsCustomEndpoint.ValueString()
p.IntegrationsBasePath = data.IntegrationsCustomEndpoint.ValueString()
p.KMSBasePath = data.KMSCustomEndpoint.ValueString()
p.LoggingBasePath = data.LoggingCustomEndpoint.ValueString()
p.LookerBasePath = data.LookerCustomEndpoint.ValueString()
Expand Down Expand Up @@ -1029,6 +1031,14 @@ func (p *FrameworkProviderConfig) HandleDefaults(ctx context.Context, data *fwmo
data.IntegrationConnectorsCustomEndpoint = types.StringValue(customEndpoint.(string))
}
}
if data.IntegrationsCustomEndpoint.IsNull() {
customEndpoint := transport_tpg.MultiEnvDefault([]string{
"GOOGLE_INTEGRATIONS_CUSTOM_ENDPOINT",
}, transport_tpg.DefaultBasePaths[transport_tpg.IntegrationsBasePathKey])
if customEndpoint != nil {
data.IntegrationsCustomEndpoint = types.StringValue(customEndpoint.(string))
}
}
if data.KMSCustomEndpoint.IsNull() {
customEndpoint := transport_tpg.MultiEnvDefault([]string{
"GOOGLE_KMS_CUSTOM_ENDPOINT",
Expand Down
6 changes: 6 additions & 0 deletions google/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,11 @@ func Provider() *schema.Provider {
Optional: true,
ValidateFunc: transport_tpg.ValidateCustomEndpoint,
},
"integrations_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: transport_tpg.ValidateCustomEndpoint,
},
"kms_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -1002,6 +1007,7 @@ func ProviderConfigure(ctx context.Context, d *schema.ResourceData, p *schema.Pr
config.IapBasePath = d.Get("iap_custom_endpoint").(string)
config.IdentityPlatformBasePath = d.Get("identity_platform_custom_endpoint").(string)
config.IntegrationConnectorsBasePath = d.Get("integration_connectors_custom_endpoint").(string)
config.IntegrationsBasePath = d.Get("integrations_custom_endpoint").(string)
config.KMSBasePath = d.Get("kms_custom_endpoint").(string)
config.LoggingBasePath = d.Get("logging_custom_endpoint").(string)
config.LookerBasePath = d.Get("looker_custom_endpoint").(string)
Expand Down
6 changes: 4 additions & 2 deletions google/provider/provider_mmv1_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ import (
"github.com/hashicorp/terraform-provider-google/google/services/iap"
"github.com/hashicorp/terraform-provider-google/google/services/identityplatform"
"github.com/hashicorp/terraform-provider-google/google/services/integrationconnectors"
"github.com/hashicorp/terraform-provider-google/google/services/integrations"
"github.com/hashicorp/terraform-provider-google/google/services/kms"
"github.com/hashicorp/terraform-provider-google/google/services/logging"
"github.com/hashicorp/terraform-provider-google/google/services/looker"
Expand Down Expand Up @@ -395,9 +396,9 @@ var handwrittenIAMDatasources = map[string]*schema.Resource{
}

// Resources
// Generated resources: 396
// Generated resources: 397
// Generated IAM resources: 234
// Total generated resources: 630
// Total generated resources: 631
var generatedResources = map[string]*schema.Resource{
"google_folder_access_approval_settings": accessapproval.ResourceAccessApprovalFolderSettings(),
"google_organization_access_approval_settings": accessapproval.ResourceAccessApprovalOrganizationSettings(),
Expand Down Expand Up @@ -846,6 +847,7 @@ var generatedResources = map[string]*schema.Resource{
"google_identity_platform_tenant_oauth_idp_config": identityplatform.ResourceIdentityPlatformTenantOauthIdpConfig(),
"google_integration_connectors_connection": integrationconnectors.ResourceIntegrationConnectorsConnection(),
"google_integration_connectors_endpoint_attachment": integrationconnectors.ResourceIntegrationConnectorsEndpointAttachment(),
"google_integrations_client": integrations.ResourceIntegrationsClient(),
"google_kms_crypto_key": kms.ResourceKMSCryptoKey(),
"google_kms_crypto_key_version": kms.ResourceKMSCryptoKeyVersion(),
"google_kms_ekm_connection": kms.ResourceKMSEkmConnection(),
Expand Down
Loading

0 comments on commit 17fa00e

Please sign in to comment.