Object Storage: implement bucket (#45)
* Add object storage dependency * Add object storage * Add object storage * Implement bucket resource * Add map fields test * Fix typos * Implement data source * Add Object Storage bucket * Fix typo * Implement Object Storage acc tests * Go mod tidy * Reword description * Fix typos * Fix typo * Implement check destroy * Add region in check destroy * Add timeout in check destroy --------- Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
This commit is contained in:
parent
175ce93f85
commit
d926e2d559
9 changed files with 740 additions and 3 deletions
|
|
@ -40,6 +40,7 @@ var (
|
|||
LogMeCustomEndpoint = os.Getenv("TF_ACC_LOGME_CUSTOM_ENDPOINT")
|
||||
MariaDBCustomEndpoint = os.Getenv("TF_ACC_MARIADB_CUSTOM_ENDPOINT")
|
||||
OpenSearchCustomEndpoint = os.Getenv("TF_ACC_OPENSEARCH_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")
|
||||
|
|
@ -104,6 +105,21 @@ func MariaDBProviderConfig() string {
|
|||
)
|
||||
}
|
||||
|
||||
func ObjectStorageProviderConfig() string {
|
||||
if ObjectStorageCustomEndpoint == "" {
|
||||
return `
|
||||
provider "stackit" {
|
||||
region = "eu01"
|
||||
}`
|
||||
}
|
||||
return fmt.Sprintf(`
|
||||
provider "stackit" {
|
||||
objectstorage_custom_endpoint = "%s"
|
||||
}`,
|
||||
ObjectStorageCustomEndpoint,
|
||||
)
|
||||
}
|
||||
|
||||
func OpenSearchProviderConfig() string {
|
||||
if OpenSearchCustomEndpoint == "" {
|
||||
return `
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue