Implement new stackit_network resource and datasource (#366)

* Copy file from DNS zone resource

* Implement resource

* Implement datasource

* Add examples

* Implement acceptance test; Some fixes

* Add docs

* Fix linter

* Fixes after review
This commit is contained in:
João Palet 2024-05-20 17:17:39 +01:00 committed by GitHub
parent 940b15e4b8
commit 76b8e5692d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 1216 additions and 4 deletions

View file

@ -39,6 +39,7 @@ var (
ArgusCustomEndpoint = os.Getenv("TF_ACC_ARGUS_CUSTOM_ENDPOINT")
DnsCustomEndpoint = os.Getenv("TF_ACC_DNS_CUSTOM_ENDPOINT")
IaaSCustomEndpoint = os.Getenv("TF_ACC_IAAS_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")
@ -89,6 +90,21 @@ func DnsProviderConfig() string {
)
}
func IaaSProviderConfig() string {
if IaaSCustomEndpoint == "" {
return `
provider "stackit" {
region = "eu01"
}`
}
return fmt.Sprintf(`
provider "stackit" {
iaas_custom_endpoint = "%s"
}`,
IaaSCustomEndpoint,
)
}
func LoadBalancerProviderConfig() string {
if LoadBalancerCustomEndpoint == "" {
return `