Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #695 from JupiterOne/KNO-402
Browse files Browse the repository at this point in the history
adding raw data field
  • Loading branch information
mikiodehartj1 authored Jun 4, 2024
2 parents b475c04 + a2ec42f commit 4c3ec5f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ exports[`#createSecretEntity should convert to entity 1`] = `
"expiresAt": undefined,
"name": "sample-secret-name",
"nextRotationTime": undefined,
"replication.automatic.customerManagedEncryption.kmsKeyName": undefined,
"replication.userManaged.replicas.location": undefined,
"rotationPeriod": undefined,
"topicNames": undefined,
"ttl": undefined,
Expand Down Expand Up @@ -53,6 +55,8 @@ exports[`#createSecretVersionEntity should convert to entity 1`] = `
"expiresAt": undefined,
"name": "projects/j1-gc-integration-dev-v3/secrets/sample-secret-name/versions/1",
"nextRotationTime": undefined,
"replication.automatic.customerManagedEncryption.kmsKeyName": undefined,
"replication.userManaged.replicas.location": undefined,
"rotationPeriod": undefined,
"topicNames": undefined,
"ttl": undefined,
Expand Down
6 changes: 6 additions & 0 deletions src/steps/secret-manager/converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ export function createSecretEntity(data: secretmanager_v1.Schema$Secret) {
rotationPeriod: data.rotation?.rotationPeriod,
topicNames: data.topics?.map((t) => t.name!),
ttl: data.ttl,
'replication.automatic.customerManagedEncryption.kmsKeyName':
data.replication?.automatic?.customerManagedEncryption?.kmsKeyName,
'replication.userManaged.replicas.location':
data.replication?.userManaged?.replicas
?.filter((replica) => typeof replica.location === 'string')
.map((replica) => replica.location || ''),
},
},
});
Expand Down

0 comments on commit 4c3ec5f

Please sign in to comment.