Skip to content

Commit

Permalink
feat(dbaas): session support (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
villevsv-upcloud authored Sep 28, 2023
1 parent 106d26f commit a456582
Show file tree
Hide file tree
Showing 13 changed files with 691 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ See updating [Changelog example here](https://keepachangelog.com/en/1.0.0/)
### Added
- gateway: add read-only `addresses` field
- kubernetes: `control_plane_ip_filter` field to `upcloud_kubernetes_cluster` resource
- dbaas: `upcloud_managed_database_mysql_sessions`, `upcloud_managed_database_postgresql_sessions` and `upcloud_managed_database_redis_sessions` data sources

### Changed
- kubernetes: remove node group maximum value validation. The maximum number of nodes (in the cluster) is determined by the cluster plan and the validation is done on the API side.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Use data source to gather a list of the active sessions for a Managed MySQL Database

# Create a Managed MySQL resource
resource "upcloud_managed_database_mysql" "example" {
name = "mysql-example1"
plan = "1x1xCPU-2GB-25GB"
zone = "fi-hel1"
}

# Read the active sessions of the newly created service
data "upcloud_managed_database_mysql_sessions" "example" {
service = upcloud_managed_database_mysql.example.id
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Use data source to gather a list of the active sessions for a Managed PostgreSQL Database

# Create a Managed PostgreSQL resource
resource "upcloud_managed_database_postgresql" "example" {
name = "mysql-example1"
plan = "1x1xCPU-2GB-25GB"
zone = "fi-hel1"
}

# Read the active sessions of the newly created service
data "upcloud_managed_database_postgresql_sessions" "example" {
service = upcloud_managed_database_postgresql.example.id
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Use data source to gather a list of the active sessions for a Managed Redis Database

# Create a Managed Redis resource
resource "upcloud_managed_database_redis" "example" {
name = "example"
plan = "1x1xCPU-2GB"
zone = "fi-hel2"
}

# Read the active sessions of the newly created service
data "upcloud_managed_database_redis_sessions" "example" {
service = upcloud_managed_database_redis.example.id
}
File renamed without changes.
Loading

0 comments on commit a456582

Please sign in to comment.