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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cdk_cr_constructs-2.1.327-py3-none-any.whl (13.9 MB view details)

Uploaded Python 3

File details

Details for the file cdk-cr-constructs-2.1.327.tar.gz.

File metadata

  • Download URL: cdk-cr-constructs-2.1.327.tar.gz
  • Upload date:
  • Size: 13.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for cdk-cr-constructs-2.1.327.tar.gz
Algorithm Hash digest
SHA256 e47cbd1463ff00e3d7b0bc0ef8f238b948c44b1b43248a719f83ad7251684a66
MD5 7eb7868fe4e84ba36916ca3347ce1642
BLAKE2b-256 b9f822c45c02b171d59f28297d5805585d010d8d3c659049e5367c8f3e56e424

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cdk_cr_constructs-2.1.327-py3-none-any.whl
Algorithm Hash digest
SHA256 4a6f559092b3ed00fec03c2aa4cf840a977f17e8a2828285890e628346544eb2
MD5 d3a20f4fe4f95321a9520a86c504f0a5
BLAKE2b-256 486307c6fd1b63f11bae6bf1baf397f23e5416057da24249470391a21ae46bc6

See more details on using hashes here.

Supported by

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