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.609.tar.gz
(15.6 MB
view details)
Built Distribution
File details
Details for the file cdk_cr_constructs-2.1.609.tar.gz
.
File metadata
- Download URL: cdk_cr_constructs-2.1.609.tar.gz
- Upload date:
- Size: 15.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 945cfd81e5d6c326e67d96d3104cd8a5dd0c14f2d1f7705219d7f28f9718e099 |
|
MD5 | 7a5fcfd8b9a6fed35cdedbe98c116b37 |
|
BLAKE2b-256 | c8d352133e26bbf6983868cfb5c591e02e6f211fe452da984aebb2f90adb7dcc |
File details
Details for the file cdk_cr_constructs-2.1.609-py3-none-any.whl
.
File metadata
- Download URL: cdk_cr_constructs-2.1.609-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 | d96038eced56f0b558173113a21c684f6bae48aad5157db8f8682cdd58544ff9 |
|
MD5 | d89a0bf4de0e3fd64101ebfd81a7b328 |
|
BLAKE2b-256 | 7338184e8cb6e8bca0bb2472e60a3cb4bb6de40333e6ea44c48c1381877be187 |