Onboard Load Balancer (part 3: add remaining CRUD login and datasource) (#116)

* Finish implementation for CRUD functionality

* Register resource in the provider

* Adjustments to resource

* Implement data source

* Unregister resource and data source from provider

* Fix external_address schema field

* Remove oneOf validators from datasource
This commit is contained in:
João Palet 2023-10-31 12:52:18 +01:00 committed by GitHub
parent 245e10a8e8
commit b804dc789e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 468 additions and 52 deletions

View file

@ -37,6 +37,7 @@ var (
ArgusCustomEndpoint = os.Getenv("TF_ACC_ARGUS_CUSTOM_ENDPOINT")
DnsCustomEndpoint = os.Getenv("TF_ACC_DNS_CUSTOM_ENDPOINT")
LoadBalancerCustomEndpoint = os.Getenv("TF_ACC_LOADBALANCER_CUSTOM_ENDPOINT")
LogMeCustomEndpoint = os.Getenv("TF_ACC_LOGME_CUSTOM_ENDPOINT")
MariaDBCustomEndpoint = os.Getenv("TF_ACC_MARIADB_CUSTOM_ENDPOINT")
MongoDBFlexCustomEndpoint = os.Getenv("TF_ACC_MONGODBFLEX_CUSTOM_ENDPOINT")
@ -77,6 +78,21 @@ func DnsProviderConfig() string {
)
}
func LoadBalancerProviderConfig() string {
if LogMeCustomEndpoint == "" {
return `
provider "stackit" {
region = "eu01"
}`
}
return fmt.Sprintf(`
provider "stackit" {
loadbalancer_custom_endpoint = "%s"
}`,
LoadBalancerCustomEndpoint,
)
}
func LogMeProviderConfig() string {
if LogMeCustomEndpoint == "" {
return `