Skip to content

Commit b89caf1

Browse files
committed
Specify placement when creating SSH firewall rule.
1 parent d2821a0 commit b89caf1

3 files changed

Lines changed: 17 additions & 7 deletions

File tree

CHANGES.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changes
22

3+
## v0.9.1
4+
5+
Bug fixes:
6+
7+
* Specify firewall rule placement when exposing deployed server.
8+
39
## v0.9
410

511
New features:
@@ -13,7 +19,6 @@ New features:
1319
* The driver can now use the new `--ddcloud-mcp-endpoint` command-line argument (environment: `MCP_ENDPOINT`) to designate a custom end-point URI for the CloudControl API.
1420
* The driver will now generate a new SSH keypair if one was not already configured via command-line arguments.
1521

16-
1722
Breaking changes:
1823

1924
* The following command-line arguments have changed to be consistent with their corresponding environment variables:

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
VERSION = 0.9
1+
VERSION = 0.9.1
22

33
default: fmt build test
44

55
fmt:
66
go fmt github.com/DimensionDataResearch/docker-machine-driver-ddcloud/...
77

8+
clean:
9+
rm -rf _bin
10+
811
# Peform a development (current-platform-only) build.
912
dev: version fmt
1013
go build -o _bin/docker-machine-driver-ddcloud
@@ -26,9 +29,9 @@ build-mac64:
2629

2730
# Produce archives for a GitHub release.
2831
dist: build
29-
zip -9 _bin/windows-amd64.zip _bin/windows-amd64/docker-machine-driver-ddcloud.exe
30-
zip -9 _bin/linux-amd64.zip _bin/linux-amd64/docker-machine-driver-ddcloud
31-
zip -9 _bin/darwin-amd64.zip _bin/darwin-amd64/docker-machine-driver-ddcloud
32+
zip -9 _bin/docker-machine-driver-ddcloud-v$(VERSION)-windows-amd64.zip _bin/windows-amd64/docker-machine-driver-ddcloud.exe
33+
zip -9 _bin/docker-machine-driver-ddcloud-v$(VERSION)-linux-amd64.zip _bin/linux-amd64/docker-machine-driver-ddcloud
34+
zip -9 _bin/docker-machine-driver-ddcloud-v$(VERSION)-darwin-amd64.zip _bin/darwin-amd64/docker-machine-driver-ddcloud
3235

3336
test: fmt
3437
go test -v github.com/DimensionDataResearch/docker-machine-driver-ddcloud/...

client.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ package main
88
import (
99
"errors"
1010
"fmt"
11-
"github.com/DimensionDataResearch/go-dd-cloud-compute/compute"
12-
"github.com/docker/machine/libmachine/log"
1311
"strings"
1412
"time"
13+
14+
"github.com/DimensionDataResearch/go-dd-cloud-compute/compute"
15+
"github.com/docker/machine/libmachine/log"
1516
)
1617

1718
// CloudControl client retry
@@ -594,6 +595,7 @@ func (driver *Driver) createSSHFirewallRule() error {
594595
ruleConfiguration.MatchSourceAddress(driver.ClientPublicIPAddress)
595596
ruleConfiguration.MatchDestinationAddress(driver.IPAddress)
596597
ruleConfiguration.MatchDestinationPort(driver.SSHPort)
598+
ruleConfiguration.PlaceFirst()
597599

598600
client, err := driver.getCloudControlClient()
599601
if err != nil {

0 commit comments

Comments
 (0)