Skip to content

Commit 01d7886

Browse files
committed
chore(kms): Update to new SDK version
Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>
1 parent a371de2 commit 01d7886

8 files changed

Lines changed: 10 additions & 10 deletions

File tree

docs/stackit_kms_key_create.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ stackit kms key create [flags]
4141
--import-only States whether versions can be created or only imported
4242
--keyring-id string ID of the KMS key ring
4343
--name string The display name to distinguish multiple keys
44-
--protection string The underlying system that is responsible for protecting the key material. (one of: [software])
44+
--protection string The underlying system that is responsible for protecting the key material. (one of: [software, hsm])
4545
--purpose string Purpose of the key. (one of: [symmetric_encrypt_decrypt, asymmetric_encrypt_decrypt, message_authentication_code, asymmetric_sign_verify])
4646
```
4747

docs/stackit_kms_wrapping-key_create.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ stackit kms wrapping-key create [flags]
2828
-h, --help Help for "stackit kms wrapping-key create"
2929
--keyring-id string ID of the KMS key ring
3030
--name string The display name to distinguish multiple wrapping keys
31-
--protection string The underlying system that is responsible for protecting the key material. (one of: [software])
31+
--protection string The underlying system that is responsible for protecting the key material. (one of: [software, hsm])
3232
--purpose string Purpose of the key. (one of: [wrap_symmetric_key, wrap_asymmetric_key])
3333
```
3434

internal/cmd/kms/key/create/create.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var (
4444
)
4545
protectionFlag = flags.StringEnumFlag(
4646
"protection",
47-
kms.AllowedProtectionEnumValues,
47+
[]string{"software", "hsm"},
4848
"The underlying system that is responsible for protecting the key material.")
4949
)
5050

@@ -57,7 +57,7 @@ type inputModel struct {
5757
Name *string
5858
ImportOnly bool // Default false
5959
Purpose kms.Purpose
60-
Protection kms.Protection
60+
Protection string
6161
}
6262

6363
func NewCmd(params *types.CmdParams) *cobra.Command {

internal/cmd/kms/key/create/create_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const (
2323
testPurpose = kms.PURPOSE_ASYMMETRIC_ENCRYPT_DECRYPT
2424
testDescription = "my key description"
2525
testImportOnly = "true"
26-
testProtection = kms.PROTECTION_SOFTWARE
26+
testProtection = "software"
2727
)
2828

2929
type testCtxKey struct{}

internal/cmd/kms/key/describe/describe_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func TestOutputResult(t *testing.T) {
167167
Id: testKeyID,
168168
ImportOnly: true,
169169
KeyRingId: testKeyRingID,
170-
Protection: kms.PROTECTION_SOFTWARE,
170+
Protection: "software",
171171
Purpose: kms.PURPOSE_SYMMETRIC_ENCRYPT_DECRYPT,
172172
State: kms.KEYSTATE_ACTIVE,
173173
},

internal/cmd/kms/wrappingkey/create/create.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var (
4343
)
4444
protectionFlag = flags.StringEnumFlag(
4545
"protection",
46-
kms.AllowedProtectionEnumValues,
46+
[]string{"software", "hsm"},
4747
"The underlying system that is responsible for protecting the key material.")
4848
)
4949

@@ -55,7 +55,7 @@ type inputModel struct {
5555
Description *string
5656
Name *string
5757
Purpose kms.WrappingPurpose
58-
Protection kms.Protection
58+
Protection string
5959
}
6060

6161
func NewCmd(params *types.CmdParams) *cobra.Command {

internal/cmd/kms/wrappingkey/create/create_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const (
2222
testDisplayName = "my-key"
2323
testPurpose = kms.WRAPPINGPURPOSE_WRAP_ASYMMETRIC_KEY
2424
testDescription = "my key description"
25-
testProtection = kms.PROTECTION_SOFTWARE
25+
testProtection = "software"
2626
)
2727

2828
type testCtxKey struct{}

internal/cmd/kms/wrappingkey/describe/describe_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func TestOutputResult(t *testing.T) {
158158
Algorithm: kms.WRAPPINGALGORITHM_RSA_2048_OAEP_SHA256,
159159
ExpiresAt: testTime,
160160
KeyRingId: testKeyRingID,
161-
Protection: kms.PROTECTION_SOFTWARE,
161+
Protection: "software",
162162
PublicKey: utils.Ptr("-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQ...\n-----END PUBLIC KEY-----"),
163163
Purpose: kms.WRAPPINGPURPOSE_WRAP_ASYMMETRIC_KEY,
164164
},

0 commit comments

Comments
 (0)