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.637.tar.gz
(15.6 MB
view details)
Built Distribution
File details
Details for the file cdk_cr_constructs-2.1.637.tar.gz
.
File metadata
- Download URL: cdk_cr_constructs-2.1.637.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 | 5d780a11a2b9a9ca64042d02daec03fe5f2db04fc8908da45f0f472bfed0e9d0 |
|
MD5 | 134cc4334f445f15017fddd2e49a3eda |
|
BLAKE2b-256 | f406ee2edbab5d8037bae44a7671316a01c56846f3926907ef58b5f0c68f69a6 |
File details
Details for the file cdk_cr_constructs-2.1.637-py3-none-any.whl
.
File metadata
- Download URL: cdk_cr_constructs-2.1.637-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 | 14f7ab865682ef029664626c0a5b9152bc24901b808d552f66e377c2d501c518 |
|
MD5 | f149984a7783c5b9f7f20eb3fd97cf7c |
|
BLAKE2b-256 | dc50f8fa0c9ad2789214a0bfd694f26c4849700c09b2f13661df7e83a02234ab |