mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-12 17:32:38 -04:00
* no-op commit * [Mongo SDK Plugin] (enos): Add MongoDB plugin test framework for Enos (#13576) * Add modular database infrastructure for Enos testing Infrastructure Changes: - Created generic database_container module supporting PostgreSQL, MongoDB, MySQL - Consolidated database configs in enos-globals.hcl with dynamic port generation - Refactored set_up_external_integration_target to use generic module with for_each - Updated enos-scenario-plugin.hcl to pass database_configs from globals Test Organization: - Reorganized test structure: moved postgres/ and mongodb/ into database/ directory - Maintains existing production-ready test helpers - Structure: plugins/database/{postgres,mongodb}/ for better organization Benefits: - Easy to add new databases (just add to database_configs in globals) - No code duplication across database types - Consistent patterns for all database testing - Supports both Docker containers and external database URLs --------- Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
58 lines
1.2 KiB
HCL
58 lines
1.2 KiB
HCL
# Copyright IBM Corp. 2016, 2026
|
|
# SPDX-License-Identifier: BUSL-1.1
|
|
|
|
variable "database_type" {
|
|
description = "Type of database to create (postgres, mongodb, mysql)"
|
|
type = string
|
|
validation {
|
|
condition = contains(["postgres", "mongodb", "mysql"], var.database_type)
|
|
error_message = "database_type must be one of: postgres, mongodb, mysql"
|
|
}
|
|
}
|
|
|
|
variable "db_version" {
|
|
description = "Database version to use"
|
|
type = string
|
|
}
|
|
|
|
variable "username" {
|
|
description = "Database username"
|
|
type = string
|
|
}
|
|
|
|
variable "password" {
|
|
description = "Database password"
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
variable "database" {
|
|
description = "Database name"
|
|
type = string
|
|
}
|
|
|
|
variable "port" {
|
|
description = "Database port"
|
|
type = number
|
|
}
|
|
|
|
variable "host" {
|
|
description = "Host configuration with public_ip"
|
|
type = object({
|
|
public_ip = string
|
|
private_ip = string
|
|
ipv6 = optional(string)
|
|
})
|
|
}
|
|
|
|
variable "instance_name" {
|
|
description = "Unique instance name for the container (defaults to 'default')"
|
|
type = string
|
|
default = "default"
|
|
}
|
|
|
|
variable "depends_on_modules" {
|
|
description = "List of modules this depends on"
|
|
type = list(any)
|
|
default = []
|
|
}
|