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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: cdk_cr_constructs-2.1.626.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.626.tar.gz
Algorithm Hash digest
SHA256 98243497d08779112da460a205543512cfe07339b54e7a643e02eb5fa7f8d492
MD5 84e35ffe5e837771c415efeef200a90a
BLAKE2b-256 384f0787dc8e42c1a30a82e55476e59831c62f65e351ca9ba33e7dbb2a48ae2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cdk_cr_constructs-2.1.626-py3-none-any.whl
Algorithm Hash digest
SHA256 46f89a3c768852da4e05b62b043e0c5812a9cae02a43cbc719a19772e54c92df
MD5 0ff851bd42a6eb5374c4488b0d42a2bf
BLAKE2b-256 60e251b5260fa4ba7cfbbc64af5cc56b9e7080cd6ef2386095d6caae253c3279

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