aws cdk library for custom resource constructs.
Project description
cdk-cr-constructs
This Construct is collect custom resource
Example for CustomResourceGetEIP
import { App, Stack, CfnOutput, Duration, aws_iam } from 'aws-cdk-lib';
import { CustomResourceGetEIP } from 'cdk-cr-constructs';
const env = {
region: process.env.CDK_DEFAULT_REGION,
account: process.env.CDK_DEFAULT_ACCOUNT,
};
const app = new App();
const stack = new Stack(app, 'testing-stack', { env });
const getIps = new CustomResourceGetEIP(stack, 'CustomResourceGetEIP', {
/**
* Discovery us-east-1 Elastic Ips.
*/
regions: ['us-east-1'],
/**
* Add Company Ips.
*/
companyIps: ['1.2.3.4'],
});
const role = new aws_iam.Role(stack, 'DemoRole', {
assumedBy: new aws_iam.AccountRootPrincipal(),
});
/**
* Example create an assume role, allow all action from ip address.
*/
role.addToPolicy(new aws_iam.PolicyStatement({
effect: aws_iam.Effect.ALLOW,
resources: ['*'],
actions: ['*'],
conditions: {
IpAddress: {
'aws:SourceIp': getIps.ipList(),
},
},
}));
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cdk_cr_constructs-2.1.603.tar.gz
(15.5 MB
view details)
Built Distribution
File details
Details for the file cdk_cr_constructs-2.1.603.tar.gz
.
File metadata
- Download URL: cdk_cr_constructs-2.1.603.tar.gz
- Upload date:
- Size: 15.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c24072d5c53a5e1dad748c19a21eaaef3668a799f979734ec483b47b0b6b83f |
|
MD5 | 0a34cd4dcad4f762d8ffd021d58a2945 |
|
BLAKE2b-256 | 7a623b580048cb79bb0c37338d6c988fb0070d5d1959dbfcb6bdb0640fd555e2 |
File details
Details for the file cdk_cr_constructs-2.1.603-py3-none-any.whl
.
File metadata
- Download URL: cdk_cr_constructs-2.1.603-py3-none-any.whl
- Upload date:
- Size: 15.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 099ed2cc00bc539ae854f161521bbe5e22f1ee709b79cb1d3e46436198763964 |
|
MD5 | 5e97c8acddd8fc25932a778699c54963 |
|
BLAKE2b-256 | 0317eb53622a6782a8096087f264aa97a21e147ae157d1c924ab4830222ea4e2 |