Skip to main content

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.633.tar.gz (15.6 MB view details)

Uploaded Source

Built Distribution

cdk_cr_constructs-2.1.633-py3-none-any.whl (15.6 MB view details)

Uploaded Python 3

File details

Details for the file cdk_cr_constructs-2.1.633.tar.gz.

File metadata

  • Download URL: cdk_cr_constructs-2.1.633.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

Hashes for cdk_cr_constructs-2.1.633.tar.gz
Algorithm Hash digest
SHA256 7dd6271ea7b914dc8f7b8f25b06990c92c641831e84fcb678bf96cf84ce19a24
MD5 6726f42ff6d113e96f32ce8e6997b431
BLAKE2b-256 c812da8a3c2ed3755c1af24560cfbb41e02c4fa221387afd68f71d8948be8e70

See more details on using hashes here.

File details

Details for the file cdk_cr_constructs-2.1.633-py3-none-any.whl.

File metadata

File hashes

Hashes for cdk_cr_constructs-2.1.633-py3-none-any.whl
Algorithm Hash digest
SHA256 83cf9185d4aa5f5a43ed9ca5a8808875cf403bc16df172bd9808c4ba0f18b79c
MD5 b76ee5dcbccb0c799af64d99aec17106
BLAKE2b-256 d516a106f845eda96dfefe415bb310ab6914b75f7e608aa1ce7eabc08e9309a8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page