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.606.tar.gz
(15.6 MB
view details)
Built Distribution
File details
Details for the file cdk_cr_constructs-2.1.606.tar.gz
.
File metadata
- Download URL: cdk_cr_constructs-2.1.606.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 | bca22bcf13188068017ecb6bdf8dd9df385f911af3945fb76c141f2c0e830a2d |
|
MD5 | 182d1814896a1ec14c9a9af90cb95f28 |
|
BLAKE2b-256 | 52c77187eb8087d6a45c15b6d36dfff6b00165b12eea9e25b5802cdc30d2b20e |
File details
Details for the file cdk_cr_constructs-2.1.606-py3-none-any.whl
.
File metadata
- Download URL: cdk_cr_constructs-2.1.606-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 | 2ae4120dbed8a1b996b7e5e7beec9301fd683ceafbccb7b5c1eb8f8777e3f6c1 |
|
MD5 | 4cd0efbbb5b45118d57101ae65bc4b49 |
|
BLAKE2b-256 | 85b70451799df94322b48b95d23ff1d1c8d7fbf137e6f930df654baeca321b8d |