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.614.tar.gz
(15.6 MB
view details)
Built Distribution
File details
Details for the file cdk_cr_constructs-2.1.614.tar.gz
.
File metadata
- Download URL: cdk_cr_constructs-2.1.614.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 | 0fcc1193dde115e8c91e045e69294af2f128b875658ad73abb47544d45b6db7c |
|
MD5 | ec4ba6f780be7ecb54f0d1317a90e51c |
|
BLAKE2b-256 | dd73f144a519c7f04ed85766df84ab88ea95ad6cd007ca7dea8d498b8ce40735 |
File details
Details for the file cdk_cr_constructs-2.1.614-py3-none-any.whl
.
File metadata
- Download URL: cdk_cr_constructs-2.1.614-py3-none-any.whl
- Upload date:
- Size: 15.6 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 | 2728f5f35317ef39a25af7fcbce9db53bef3c26a92ec3af7016b8e42740316c1 |
|
MD5 | bb68acdfa7c3d56a3ad8fd07a3b3969c |
|
BLAKE2b-256 | e83a6c935d1022892e565558ed17a3d5461bcd36e9418938a5e00ae5f7a5f9b0 |