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.619.tar.gz
(15.6 MB
view details)
Built Distribution
File details
Details for the file cdk_cr_constructs-2.1.619.tar.gz
.
File metadata
- Download URL: cdk_cr_constructs-2.1.619.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 | 870b397d8f893182533d54e6d72c59e22fe085fac462b0991e0de6c981d6dd9d |
|
MD5 | 6ace563e56311aab665d8c33a9fcc64a |
|
BLAKE2b-256 | 58ae6b7a8266e9a16b963cf7f77e930f5ce7d8da346feda5ceaada59642a7d28 |
File details
Details for the file cdk_cr_constructs-2.1.619-py3-none-any.whl
.
File metadata
- Download URL: cdk_cr_constructs-2.1.619-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 | eb45c82cc653750e871bfa291facf5127270e48d4401f4a718eb60c30f97e2ee |
|
MD5 | a185a6099592c09b5144623971ed7de5 |
|
BLAKE2b-256 | 762137137d79aa686f0db117acfa0debcc86c958004b43c4ef4570f8626e8c5d |