Skip to content

Commit

Permalink
replace refactor words
Browse files Browse the repository at this point in the history
  • Loading branch information
vsantos committed Jun 17, 2024
1 parent 16a1742 commit 6728032
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 48 deletions.
8 changes: 4 additions & 4 deletions docs/provider/aws-parameter-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ Optionally, it is possible to configure additional options for the parameter suc
{% include 'aws-pm-push-secret-with-metadata.yaml' %}
```

`parameterStoreType` takes three options. `String`, `StringList`, and `SecureString`, where `String` is the _default_.
`parameterStore.type` takes three options. `String`, `StringList`, and `SecureString`, where `String` is the _default_.

`parameterStoreKeyID` takes a KMS Key `$ID` or `$ARN` (in case a key source is created in another account) as a string, where `alias/aws/ssm` is the _default_. This property is only used if `parameterStoreType` is set as `SecureString`.
`parameterStore.keyID` takes a KMS Key `$ID` or `$ARN` (in case a key source is created in another account) as a string, where `alias/aws/ssm` is the _default_. This property is only used if `parameterStore.type` is set as `SecureString`.

`parameterStoreTier` takes two options. `Standard` or `Advanced`, where `Standard` is the _default_.
`parameterStore.tier` takes two options. `Standard` or `Advanced`, where `Standard` is the _default_.

`parameterStorePolicies` takes a list of parameter policies. This property is only used if `parameterStoreTier` is set as `Advanced`. To have access to all options regarding policies please use the following official guide: [Assigning parameter policies](https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html)
`parameterStore.policies` takes a list of parameter policies. This property is only used if `parameterStore.tier` is set as `Advanced`. To have access to all options regarding policies please use the following official guide: [Assigning parameter policies](https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html)

#### Check successful secret sync

Expand Down
47 changes: 24 additions & 23 deletions docs/snippets/aws-pm-push-secret-with-metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,27 @@ spec:
remoteRef:
remoteKey: my-first-parameter # Remote reference (where the secret is going to be pushed)
metadata:
parameterStoreType: "SecureString"
parameterStoreKeyID: "bb123123-b2b0-4f60-ac3a-44a13f0e6b6c"
parameterStoreTier: "Advanced"
parameterStorePolicies:
- type: "Expiration"
version: "1.0"
attributes:
timestamp: "2024-12-02T21:34:33.000Z"
- type: "ExpirationNotification"
version: "1.0"
attributes:
before: "2"
unit: "Days"
- type: "ExpirationNotification"
version: "1.0"
attributes:
before: "30"
unit: "Days"
- type: "NoChangeNotification"
version: "1.0"
attributes:
after: "30"
unit: "Days"
parameterStore:
type: "SecureString"
keyID: "bb123123-b2b0-4f60-ac3a-44a13f0e6b6c"
tier: "Advanced"
policies:
- type: "Expiration"
version: "1.0"
attributes:
timestamp: "2024-12-02T21:34:33.000Z"
- type: "ExpirationNotification"
version: "1.0"
attributes:
before: "2"
unit: "Days"
- type: "ExpirationNotification"
version: "1.0"
attributes:
before: "30"
unit: "Days"
- type: "NoChangeNotification"
version: "1.0"
attributes:
after: "30"
unit: "Days"
44 changes: 23 additions & 21 deletions pkg/provider/aws/parameterstore/parameterstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,27 +438,29 @@ func TestPushSecret(t *testing.T) {
metadata: &apiextensionsv1.JSON{
Raw: []byte(`
{
"parameterStoreType": "SecureString",
"parameterStoreKeyID": "arn:aws:kms:sa-east-1:00000000000:key/bb123123-b2b0-4f60-ac3a-44a13f0e6b6c",
"parameterStoreTier": "Advanced",
"parameterStorePolicies": [
{
"type": "Expiration",
"version": "1.0",
"attributes": {
"timestamp": "2024-12-02T21:34:33.000Z"
}
},
{
"type": "ExpirationNotification",
"version": "1.0",
"attributes": {
"before": "2",
"unit": "Days"
}
}
]
}
"parameterStore": {
"type": "SecureString",
"keyID": "arn:aws:kms:sa-east-1:00000000000:key/bb123123-b2b0-4f60-ac3a-44a13f0e6b6c",
"tier": "Advanced",
"policies": [
{
"type": "Expiration",
"version": "1.0",
"attributes": {
"timestamp": "2024-12-02T21:34:33.000Z"
}
},
{
"type": "ExpirationNotification",
"version": "1.0",
"attributes": {
"before": "2",
"unit": "Days"
}
}
]
}
}
`),
},
client: fakeps.Client{
Expand Down

0 comments on commit 6728032

Please sign in to comment.