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.630.tar.gz
(15.6 MB
view details)
Built Distribution
File details
Details for the file cdk_cr_constructs-2.1.630.tar.gz
.
File metadata
- Download URL: cdk_cr_constructs-2.1.630.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 | 963bd37ad2e52bc79586218cd1bfff0293f105ddebc310e7bc1477b2aaca0fe2 |
|
MD5 | 3e5142d16b597df0d9f752b199f1ced4 |
|
BLAKE2b-256 | 77d2dbdb38e5908460c60c1c6dd9c88cec373323d1e7741a7816e06c84486fef |
File details
Details for the file cdk_cr_constructs-2.1.630-py3-none-any.whl
.
File metadata
- Download URL: cdk_cr_constructs-2.1.630-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 | 5df8886ef3fa1ecce0011d8d2ecbe667184054c49271afedf29438c88536adb8 |
|
MD5 | 807078749da2de313c933f138953e781 |
|
BLAKE2b-256 | 7159e7088559db7ca8e78f63a376cf43c4362e246cb7ea93e4b5fec3da6cc69e |