Skip to content

Commit cf43d9d

Browse files
[CLOUDGA-25427] Remove GOOGLECLOUD integration Feature flag and add documentation (#146)
Remove GCP integration FF
1 parent 7c17d25 commit cf43d9d

File tree

5 files changed

+47
-11
lines changed

5 files changed

+47
-11
lines changed

docs/resources/integration.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,28 @@ resource "ybm_integration" "victoriametrics" {
8282
}
8383
```
8484

85+
To create GoogleCloud integration
86+
87+
```terraform
88+
resource "ybm_integration" "gcp" {
89+
config_name = "gcp-example"
90+
type = "GOOGLECLOUD"
91+
googlecloud_spec = {
92+
type = "service_account"
93+
project_id = "<project_id>"
94+
private_key_id = "<private_key_id>"
95+
private_key = "<private_key>"
96+
client_email = "<client_email>"
97+
client_id = "<client_id>"
98+
auth_uri = "<auth_uri>"
99+
token_uri = "<token_uri>"
100+
auth_provider_x509_cert_url = "<auth_provider_x509_cert_url>"
101+
client_x509_cert_url = "<client_x509_cert_url>"
102+
universe_domain = "<universe_domain>"
103+
}
104+
}
105+
```
106+
85107
<!-- schema generated by tfplugindocs -->
86108
## Schema
87109

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
resource "ybm_integration" "gcp" {
2+
config_name = "gcp-example"
3+
type = "GOOGLECLOUD"
4+
googlecloud_spec = {
5+
type = "service_account"
6+
project_id = "<project_id>"
7+
private_key_id = "<private_key_id>"
8+
private_key = "<private_key>"
9+
client_email = "<client_email>"
10+
client_id = "<client_id>"
11+
auth_uri = "<auth_uri>"
12+
token_uri = "<token_uri>"
13+
auth_provider_x509_cert_url = "<auth_provider_x509_cert_url>"
14+
client_x509_cert_url = "<client_x509_cert_url>"
15+
universe_domain = "<universe_domain>"
16+
}
17+
}

managed/fflags/feature_flags.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,13 @@ import (
1313
type FeatureFlag string
1414

1515
const (
16-
GOOGLECLOUD_INTEGRATION_ENABLED FeatureFlag = "GOOGLECLOUD_INTEGRATION_ENABLED"
17-
CONNECTION_POOLING FeatureFlag = "CONNECTION_POOLING"
18-
DR FeatureFlag = "DR"
16+
CONNECTION_POOLING FeatureFlag = "CONNECTION_POOLING"
17+
DR FeatureFlag = "DR"
1918
)
2019

2120
var flagEnabled = map[FeatureFlag]bool{
22-
GOOGLECLOUD_INTEGRATION_ENABLED: false,
23-
CONNECTION_POOLING: false,
24-
DR: false,
21+
CONNECTION_POOLING: false,
22+
DR: false,
2523
}
2624

2725
func (f FeatureFlag) String() string {

managed/resource_integration.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
1717
"github.com/hashicorp/terraform-plugin-framework/types"
1818
"github.com/hashicorp/terraform-plugin-log/tflog"
19-
"github.com/yugabyte/terraform-provider-ybm/managed/fflags"
2019
planmodifier "github.com/yugabyte/terraform-provider-ybm/managed/plan_modifier"
2120
openapiclient "github.com/yugabyte/yugabytedb-managed-go-client-internal"
2221
)
@@ -329,10 +328,6 @@ func (r resourceIntegration) Create(ctx context.Context, req tfsdk.CreateResourc
329328
resp.Diagnostics.AddError(GetApiErrorDetails(err), "")
330329
return
331330
}
332-
if *telemetrySinkTypeEnum == openapiclient.TELEMETRYPROVIDERTYPEENUM_GOOGLECLOUD && !fflags.IsFeatureFlagEnabled(fflags.GOOGLECLOUD_INTEGRATION_ENABLED) {
333-
resp.Diagnostics.AddError("Invalid integration type", "Integration of type GOOGLECLOUD is currently not supported")
334-
return
335-
}
336331

337332
apiClient := r.p.client
338333

templates/resources/integration.md.tmpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,8 @@ To create VictoriaMetrics integration
3131

3232
{{ tffile "examples/resources/ybm_integration/victoriametrics-integration.tf" }}
3333

34+
To create GoogleCloud integration
35+
36+
{{ tffile "examples/resources/ybm_integration/googlecloud-integration.tf" }}
37+
3438
{{ .SchemaMarkdown | trimspace }}

0 commit comments

Comments
 (0)