Skip to content

Commit 56ff448

Browse files
tsimacekTomas Simacek
and
Tomas Simacek
authored
v0.7.0 release (#6)
Upgrade cbs_array_azure to 6.3.5 and cbs_array_aws to 6.2.13, mark jit_approval deprecated in favor of jit_approval_group_object_ids Co-authored-by: Tomas Simacek <tsimacek@pruestorage.com>
1 parent 1ec907b commit 56ff448

32 files changed

+1057
-542
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
name: Set up Go
3131
uses: actions/setup-go@v2
3232
with:
33-
go-version: 1.14
33+
go-version: 1.18
3434
-
3535
name: Import GPG key
3636
id: import_gpg

.goreleaser.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
# Visit https://goreleaser.com for documentation on how to customize this
44
# behavior.
5+
6+
dist: .build/goreleaser-dist
7+
58
before:
69
hooks:
710
# this is just an example and not a requirement for provider building/publishing

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 0.7.0 (Oct 19, 2022)
2+
3+
* Update Purity version of cbs_array_azure to 6.3.5
4+
* Update Purity version of cbs_array_aws to 6.2.13
5+
* Add support for JIT approvals using `jit_approval_group_object_ids` parameter, refer to the [documentation](docs/resources/array_azure.md)
6+
* Marking `jit_approval` as Deprecated, will be removed in future major release
7+
18
## 0.6.0 (Aug 3, 2021)
29

310
* Update Purity version of cbs_array_azure from 6.1.7 to 6.1.8

Makefile

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
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))))
3+
export SRC_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
44
SHELL=/bin/bash -eEuo pipefail # Set sane shell options
55
MAKEFLAGS += -j4
66
TMPBIN=/tmp/bin
77
TEST_GPG_FINGERPRINT=47F12A8402BBC3906D7C3FAB78C24746203D8F4E
88
export GNUPGHOME := /tmp/gnupg
99
export PATH := $(TMPBIN):$(PATH)
10+
export PS_HTTP_TRACE_LOGGING := 1
11+
12+
-include */Makefile.mk
1013

1114
default: build
1215

@@ -15,11 +18,10 @@ setup-basic:
1518

1619

1720
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
21+
@curl -sfLO https://github.com/goreleaser/goreleaser/releases/download/v1.9.2/goreleaser_Linux_x86_64.tar.gz
22+
@mkdir -p $(TMPBIN)
23+
@tar -C $(TMPBIN) -xf goreleaser_Linux_x86_64.tar.gz
24+
@rm goreleaser_Linux_x86_64.tar.gz
2325

2426
# CI="" for goreleaser will prevent extra control characters from cluttering
2527
# the logs. See https://github.com/goreleaser/goreleaser/blob/b43a2e95ec03261a847fdf9239100d9d36adc60c/cmd/root.go#L15
@@ -50,25 +52,13 @@ install-dev-clean:
5052
@rm -rvf $(DEV_PKGDIR)
5153

5254

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-
5955
# 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
6056
# the full unfiltered log is in .build-logs/acc-mock
6157

6258
test-vet:
6359
@go vet ./cbs
6460
@go vet -tags mock ./cbs
6561

66-
# Tests that should run on each pull request
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
71-
7262
tidy:
7363
@go get -u
7464
@go mod tidy -v

auth/bootstrap_impl.go

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

auth/bootstrap_interface.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818

1919
package auth
2020

21+
import "context"
22+
2123
type Bootstrapper interface {
22-
GenerateSecretPayload(host string, pureuserPrivateKey []byte) ([]byte, error)
24+
GenerateSecretPayload(ctx context.Context, host string, pureuserPrivateKey []byte) ([]byte, error)
2325
}
2426

2527
type SecretPayload struct {

auth/mock_bootstrap.go renamed to auth/bootstrap_mock.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build mock
1+
//go:build mock
22

33
/*
44
@@ -25,6 +25,7 @@
2525
package auth
2626

2727
import (
28+
"context"
2829
"encoding/json"
2930
)
3031

@@ -34,7 +35,7 @@ func NewBootstrapService() Bootstrapper {
3435

3536
type mockBootstrapService struct{}
3637

37-
func (b *mockBootstrapService) GenerateSecretPayload(host string, pureuserPrivateKey []byte) ([]byte, error) {
38+
func (b *mockBootstrapService) GenerateSecretPayload(ctx context.Context, host string, pureuserPrivateKey []byte) ([]byte, error) {
3839
mockPayload := SecretPayload{
3940
UserName: "mockUser",
4041
Issuer: "mockIssuer",

0 commit comments

Comments
 (0)