Skip to content

Commit eb74248

Browse files
committed
v0.6.0 release (upgrade Azure array version to 6.1.8. Deactivation for Azure. Fix for #3)
1 parent 38976cd commit eb74248

File tree

1,404 files changed

+15941
-1771
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,404 files changed

+15941
-1771
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
**/.terraform.lock.hcl
2222

2323
/.build/
24+
/.build-logs/
2425
**/.vscode/
25-

.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ builds:
1616
flags:
1717
- -trimpath
1818
ldflags:
19-
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
19+
- '-s -w -X github.dev.purestorage.com/FlashArray/terraform-provider-cbs/version.ProviderVersion={{.Version}}'
2020
goos:
2121
- freebsd
2222
- windows

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 0.6.0 (Aug 3, 2021)
2+
3+
* Update Purity version of cbs_array_azure from 6.1.7 to 6.1.8
4+
* Deactivation now supported for Azure
5+
* Better handling of SecureString fields, fixes issue #3
6+
* Simplified Azure networking parameters
7+
* Multiple Azure parameters were changed as part of deactivation and networking work, as always refer to the [documentation](docs/resources/array_azure.md)
8+
19
## 0.5.0 (July 20, 2021)
210

311
* Update Purity version of cbs_array_azure from 6.1.6 to 6.1.7

Makefile

Lines changed: 53 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,39 @@
11
DEV_PKGDIR := $(HOME)/.terraform.d/plugins/terraform.purestorage.com/flasharray/cbs/
22
DEV_GOBIN := $(DEV_PKGDIR)/99.99/linux_amd64/
3+
SRC_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
4+
SHELL=/bin/bash -eEuo pipefail # Set sane shell options
5+
MAKEFLAGS += -j4
6+
TMPBIN=/tmp/bin
7+
TEST_GPG_FINGERPRINT=47F12A8402BBC3906D7C3FAB78C24746203D8F4E
8+
export GNUPGHOME := /tmp/gnupg
9+
export PATH := $(TMPBIN):$(PATH)
310

411
default: build
512

13+
setup-basic:
14+
@mkdir -p .build-logs/
15+
16+
17+
setup-goreleaser:
18+
@curl -sfLO https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh
19+
@bash goreleaser.sh -b $(TMPBIN) &> /dev/null
20+
@rm goreleaser.sh
21+
# Replace with just this after go 1.16:
22+
# @GOBIN=$(TMPBIN) go install github.com/goreleaser/goreleaser@latest
23+
24+
# CI="" for goreleaser will prevent extra control characters from cluttering
25+
# the logs. See https://github.com/goreleaser/goreleaser/blob/b43a2e95ec03261a847fdf9239100d9d36adc60c/cmd/root.go#L15
26+
test-goreleaser-release: setup-goreleaser setup-basic
27+
@mkdir -p $(GNUPGHOME)
28+
@chmod 0700 $(GNUPGHOME)
29+
@gpg --batch --delete-secret-keys $(TEST_GPG_FINGERPRINT) &>/dev/null || true
30+
@gpg --batch --delete-keys $(TEST_GPG_FINGERPRINT) &>/dev/null || true
31+
@gpg --import < testing/private-key.gpg >> .build-logs/goreleaser-release 2>&1
32+
@GPG_FINGERPRINT=$(TEST_GPG_FINGERPRINT) CI="" goreleaser release --debug --snapshot --rm-dist >> .build-logs/goreleaser-release 2>&1
33+
34+
test-goreleaser-check: setup-goreleaser setup-basic
35+
@CI="" goreleaser check >> .build-logs/goreleaser-check 2>&1
36+
637
build:
738
go build
839

@@ -16,22 +47,32 @@ install-dev:
1647
GOBIN=$(DEV_GOBIN) go install
1748

1849
install-dev-clean:
19-
rm -rvf $(DEV_PKGDIR)
50+
@rm -rvf $(DEV_PKGDIR)
2051

21-
test-acc-mock:
22-
set -a; . testing/mock.env; go test --tags mock,mock_trace ./cbs -v -timeout 120m
52+
53+
# This part just helps reduce noise, we
54+
55+
test-everything-with-mocks: setup-basic
56+
@set -a; . testing/mock.env; TF_LOG=TRACE TF_LOG_PATH="$(SRC_DIR)/.build-logs/terraform" go test --tags mock ./... -v -timeout 120m \
57+
2>&1 | tee .build-logs/acc-mock | grep -vE '^=== RUN|^--- PASS:|^--- SKIP:|^=== PAUSE|^=== CONT|^PASS|^ok|\[no test files\]'
58+
59+
# The redirections and tee/grep stuff above is to help reduce console noise, we filter out all of the nominal messages, so its easier to see any errors
60+
# the full unfiltered log is in .build-logs/acc-mock
2361

2462
test-vet:
25-
go vet ./cbs
26-
go vet -tags mock ./cbs
63+
@go vet ./cbs
64+
@go vet -tags mock ./cbs
2765

2866
# Tests that should run on each pull request
29-
test-pull-request: test-vet test-acc-mock
67+
test-pull-request: test-vet test-everything-with-mocks test-goreleaser-release test-goreleaser-check
68+
69+
reset-mock-db:
70+
@rm -v .build/test.db
3071

3172
tidy:
32-
go get -u
33-
go mod tidy -v
34-
go fmt ./cbs
35-
go fix ./cbs
36-
go clean ./cbs
37-
go clean --tags mock ./cbs
73+
@go get -u
74+
@go mod tidy -v
75+
@go fmt ./cbs
76+
@go fix ./cbs
77+
@go clean ./cbs
78+
@go clean --tags mock ./cbs

auth/bootstrap_interface.go

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
3+
Copyright 2021, Pure Storage Inc.
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
17+
*/
18+
19+
package auth
20+
21+
type Bootstrapper interface {
22+
GenerateSecretPayload(host string, pureuserPrivateKey []byte) ([]byte, error)
23+
}
24+
25+
type SecretPayload struct {
26+
UserName string `json:"user_name"`
27+
Issuer string `json:"issuer"`
28+
ClientID string `json:"client_id"`
29+
KeyID string `json:"key_id"`
30+
RestPrivateKey string `json:"rest_private_key"`
31+
}

0 commit comments

Comments
 (0)