Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ru-9 region #141

Merged
merged 1 commit into from
Nov 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions selectel/mks.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const (
ru3MKSClusterV1Endpoint = "https://ru-3.mks.selcloud.ru/v1"
ru7MKSClusterV1Endpoint = "https://ru-7.mks.selcloud.ru/v1"
ru8MKSClusterV1Endpoint = "https://ru-8.mks.selcloud.ru/v1"
ru9MKSClusterV1Endpoint = "https://ru-9.mks.selcloud.ru/v1"
)

func getMKSClusterV1Endpoint(region string) (endpoint string) {
Expand All @@ -37,6 +38,8 @@ func getMKSClusterV1Endpoint(region string) (endpoint string) {
endpoint = ru7MKSClusterV1Endpoint
case ru8Region:
endpoint = ru8MKSClusterV1Endpoint
case ru9Region:
endpoint = ru9MKSClusterV1Endpoint
}

return
Expand Down
1 change: 1 addition & 0 deletions selectel/mks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ func TestGetMKSClusterV1Endpoint(t *testing.T) {
ru3Region: ru3MKSClusterV1Endpoint,
ru7Region: ru7MKSClusterV1Endpoint,
ru8Region: ru8MKSClusterV1Endpoint,
ru9Region: ru9MKSClusterV1Endpoint,
}

for region, expected := range expectedEndpoints {
Expand Down
2 changes: 2 additions & 0 deletions selectel/regions.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const (
ru3Region = "ru-3"
ru7Region = "ru-7"
ru8Region = "ru-8"
ru9Region = "ru-9"
)

func expandVPCV2Regions(rawRegions *schema.Set) []string {
Expand Down Expand Up @@ -40,6 +41,7 @@ func validateRegion(region string) error {
ru3Region: {},
ru7Region: {},
ru8Region: {},
ru9Region: {},
}

_, isValid := valid[region]
Expand Down
1 change: 1 addition & 0 deletions selectel/regions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func TestValidateRegionOk(t *testing.T) {
ru3Region,
ru7Region,
ru8Region,
ru9Region,
}

for _, region := range validRegions {
Expand Down
1 change: 1 addition & 0 deletions selectel/resource_selectel_mks_cluster_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func resourceMKSClusterV1() *schema.Resource {
ru3Region,
ru7Region,
ru8Region,
ru9Region,
}, false),
},
"kube_version": {
Expand Down