Skip to content

Commit

Permalink
feat: Allow to use secret with key-value pairs
Browse files Browse the repository at this point in the history
BREAKING CHANGE: API to define credentials changed
  • Loading branch information
Hi-Fi committed Jun 18, 2022
1 parent 5b8a3cc commit 1926616
Show file tree
Hide file tree
Showing 20 changed files with 1,992 additions and 1,282 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto-approve.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions .github/workflows/build.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/pull-request-lint.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions .github/workflows/release-v1-main.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions .github/workflows/release.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .github/workflows/upgrade-main.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .github/workflows/upgrade-v1-main.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .projenrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ const project = new awscdk.AwsCdkConstructLibrary({
repository: 'https://github.com/cdklabs/cdk-ecr-deployment', /* The repository is the location where the actual code for your package lives. */
gitignore: [
'cdk.out/',
'lambda/cdk-ecr-deployment-handler',
'lambda/out/',
], /* Additional entries to .gitignore. */
npmignore: [
'/cdk.out',
Expand Down
63 changes: 56 additions & 7 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ Name|Description

Name|Description
----|-----------
[ICredentials](#cdk-ecr-deployment-icredentials)|Credentials to autenticate to used container registry.
[IImageName](#cdk-ecr-deployment-iimagename)|*No description*
[IPlainText](#cdk-ecr-deployment-iplaintext)|Plain text credentials.
[ISecret](#cdk-ecr-deployment-isecret)|Secrets Manager provided credentials.



Expand All @@ -36,11 +39,11 @@ __Implements__: [IImageName](#cdk-ecr-deployment-iimagename)


```ts
new DockerImageName(name: string, creds?: string)
new DockerImageName(name: string, creds?: ICredentials)
```

* **name** (<code>string</code>) *No description*
* **creds** (<code>string</code>) *No description*
* **creds** (<code>[ICredentials](#cdk-ecr-deployment-icredentials)</code>) *No description*



Expand All @@ -50,7 +53,7 @@ new DockerImageName(name: string, creds?: string)
Name | Type | Description
-----|------|-------------
**uri** | <code>string</code> | The uri of the docker image.
**creds**? | <code>string</code> | __*Optional*__
**creds**? | <code>[ICredentials](#cdk-ecr-deployment-icredentials)</code> | __*Optional*__



Expand Down Expand Up @@ -113,12 +116,12 @@ __Implements__: [IImageName](#cdk-ecr-deployment-iimagename)


```ts
new S3ArchiveName(p: string, ref?: string, creds?: string)
new S3ArchiveName(p: string, ref?: string, creds?: ICredentials)
```

* **p** (<code>string</code>) *No description*
* **ref** (<code>string</code>) *No description*
* **creds** (<code>string</code>) *No description*
* **creds** (<code>[ICredentials](#cdk-ecr-deployment-icredentials)</code>) *No description*



Expand All @@ -128,7 +131,7 @@ new S3ArchiveName(p: string, ref?: string, creds?: string)
Name | Type | Description
-----|------|-------------
**uri** | <code>string</code> | The uri of the docker image.
**creds**? | <code>string</code> | __*Optional*__
**creds**? | <code>[ICredentials](#cdk-ecr-deployment-icredentials)</code> | __*Optional*__



Expand All @@ -152,6 +155,21 @@ Name | Type | Description



## interface ICredentials <a id="cdk-ecr-deployment-icredentials"></a>


Credentials to autenticate to used container registry.

### Properties


Name | Type | Description
-----|------|-------------
**plainText**? | <code>[IPlainText](#cdk-ecr-deployment-iplaintext)</code> | Plain text authentication.<br/>__*Optional*__
**secretManager**? | <code>[ISecret](#cdk-ecr-deployment-isecret)</code> | Secrets Manager stored authentication.<br/>__*Optional*__



## interface IImageName <a id="cdk-ecr-deployment-iimagename"></a>

__Implemented by__: [DockerImageName](#cdk-ecr-deployment-dockerimagename), [S3ArchiveName](#cdk-ecr-deployment-s3archivename)
Expand All @@ -164,7 +182,38 @@ __Implemented by__: [DockerImageName](#cdk-ecr-deployment-dockerimagename), [S3A
Name | Type | Description
-----|------|-------------
**uri** | <code>string</code> | The uri of the docker image.
**creds**? | <code>string</code> | The credentials of the docker image.<br/>__*Optional*__
**creds**? | <code>[ICredentials](#cdk-ecr-deployment-icredentials)</code> | The credentials of the docker image.<br/>__*Optional*__



## interface IPlainText <a id="cdk-ecr-deployment-iplaintext"></a>


Plain text credentials.

### Properties


Name | Type | Description
-----|------|-------------
**password** | <code>string</code> | Password to registry.
**userName** | <code>string</code> | Username to registry.



## interface ISecret <a id="cdk-ecr-deployment-isecret"></a>


Secrets Manager provided credentials.

### Properties


Name | Type | Description
-----|------|-------------
**secret** | <code>[aws_secretsmanager.ISecret](#aws-cdk-lib-aws-secretsmanager-isecret)</code> | Reference to secret where credentials are stored.
**passwordKey**? | <code>string</code> | Key containing password.<br/>__*Optional*__
**usenameKey**? | <code>string</code> | Key containing username.<br/>__*Optional*__



Loading

0 comments on commit 1926616

Please sign in to comment.