Remove leftover Postgresql code and documentation (#527)

* Remove leftover postgresql code

* Remove examples

* revert go.mod

* Revert loadbalancer doc
This commit is contained in:
Vicente Pinto 2024-09-04 16:16:24 +01:00 committed by GitHub
parent a58940981e
commit fe777fd9bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 19 additions and 71 deletions

View file

@ -29,7 +29,6 @@ type ProviderData struct {
ObservabilityCustomEndpoint string
OpenSearchCustomEndpoint string
PostgresFlexCustomEndpoint string
PostgreSQLCustomEndpoint string
RabbitMQCustomEndpoint string
RedisCustomEndpoint string
ResourceManagerCustomEndpoint string

View file

@ -48,10 +48,10 @@ func (r *credentialDataSource) Configure(ctx context.Context, req datasource.Con
var apiClient *objectstorage.APIClient
var err error
if providerData.PostgreSQLCustomEndpoint != "" {
if providerData.ObjectStorageCustomEndpoint != "" {
apiClient, err = objectstorage.NewAPIClient(
config.WithCustomAuth(providerData.RoundTripper),
config.WithEndpoint(providerData.PostgreSQLCustomEndpoint),
config.WithEndpoint(providerData.ObjectStorageCustomEndpoint),
)
} else {
apiClient, err = objectstorage.NewAPIClient(

View file

@ -330,7 +330,7 @@ func testAccCheckPostgresFlexDestroy(s *terraform.State) error {
instancesToDestroy := []string{}
for _, rs := range s.RootModule().Resources {
if rs.Type != "stackit_postgresql_instance" {
if rs.Type != "stackit_postgresqlflex_instance" {
continue
}
// instance terraform ID: = "[project_id],[instance_id]"

View file

@ -54,7 +54,6 @@ var (
OpenSearchCustomEndpoint = os.Getenv("TF_ACC_OPENSEARCH_CUSTOM_ENDPOINT")
ObservabilityCustomEndpoint = os.Getenv("TF_ACC_OBSERVABILITY_CUSTOM_ENDPOINT")
ObjectStorageCustomEndpoint = os.Getenv("TF_ACC_OBJECTSTORAGE_CUSTOM_ENDPOINT")
PostgreSQLCustomEndpoint = os.Getenv("TF_ACC_POSTGRESQL_CUSTOM_ENDPOINT")
PostgresFlexCustomEndpoint = os.Getenv("TF_ACC_POSTGRESFLEX_CUSTOM_ENDPOINT")
RabbitMQCustomEndpoint = os.Getenv("TF_ACC_RABBITMQ_CUSTOM_ENDPOINT")
RedisCustomEndpoint = os.Getenv("TF_ACC_REDIS_CUSTOM_ENDPOINT")
@ -221,21 +220,6 @@ func OpenSearchProviderConfig() string {
)
}
func PostgreSQLProviderConfig() string {
if PostgreSQLCustomEndpoint == "" {
return `
provider "stackit" {
region = "eu01"
}`
}
return fmt.Sprintf(`
provider "stackit" {
postgresql_custom_endpoint = "%s"
}`,
PostgreSQLCustomEndpoint,
)
}
func PostgresFlexProviderConfig() string {
if PostgresFlexCustomEndpoint == "" {
return `

View file

@ -93,7 +93,6 @@ type providerModel struct {
ArgusCustomEndpoint types.String `tfsdk:"argus_custom_endpoint"`
DNSCustomEndpoint types.String `tfsdk:"dns_custom_endpoint"`
IaaSCustomEndpoint types.String `tfsdk:"iaas_custom_endpoint"`
PostgreSQLCustomEndpoint types.String `tfsdk:"postgresql_custom_endpoint"`
PostgresFlexCustomEndpoint types.String `tfsdk:"postgresflex_custom_endpoint"`
MongoDBFlexCustomEndpoint types.String `tfsdk:"mongodbflex_custom_endpoint"`
LoadBalancerCustomEndpoint types.String `tfsdk:"loadbalancer_custom_endpoint"`
@ -138,7 +137,6 @@ func (p *Provider) Schema(_ context.Context, _ provider.SchemaRequest, resp *pro
"objectstorage_custom_endpoint": "Custom endpoint for the Object Storage service",
"observability_custom_endpoint": "Custom endpoint for the Observability service",
"opensearch_custom_endpoint": "Custom endpoint for the OpenSearch service",
"postgresql_custom_endpoint": "Custom endpoint for the PostgreSQL service",
"postgresflex_custom_endpoint": "Custom endpoint for the PostgresFlex service",
"redis_custom_endpoint": "Custom endpoint for the Redis service",
"server_backup_custom_endpoint": "Custom endpoint for the Server Backup service",
@ -198,10 +196,6 @@ func (p *Provider) Schema(_ context.Context, _ provider.SchemaRequest, resp *pro
Optional: true,
Description: descriptions["iaas_custom_endpoint"],
},
"postgresql_custom_endpoint": schema.StringAttribute{
Optional: true,
Description: descriptions["postgresql_custom_endpoint"],
},
"postgresflex_custom_endpoint": schema.StringAttribute{
Optional: true,
Description: descriptions["postgresflex_custom_endpoint"],
@ -329,9 +323,6 @@ func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest,
if !(providerConfig.IaaSCustomEndpoint.IsUnknown() || providerConfig.IaaSCustomEndpoint.IsNull()) {
providerData.IaaSCustomEndpoint = providerConfig.IaaSCustomEndpoint.ValueString()
}
if !(providerConfig.PostgreSQLCustomEndpoint.IsUnknown() || providerConfig.PostgreSQLCustomEndpoint.IsNull()) {
providerData.PostgreSQLCustomEndpoint = providerConfig.PostgreSQLCustomEndpoint.ValueString()
}
if !(providerConfig.PostgresFlexCustomEndpoint.IsUnknown() || providerConfig.PostgresFlexCustomEndpoint.IsNull()) {
providerData.PostgresFlexCustomEndpoint = providerConfig.PostgresFlexCustomEndpoint.ValueString()
}