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.338.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.338-py3-none-any.whl (13.9 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cdk-cr-constructs-2.1.338.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.338.tar.gz
Algorithm Hash digest
SHA256 7b93e6ee4279bb1e65d30b42f69278cb6179220f85357a936342ee9210b802bf
MD5 b8f6ce7559b70e330c7b7dc9ffb5a498
BLAKE2b-256 a8f2c5a780685acdfa26f5eacd63f2eb45d2fcf13fe646c3a749a7568dba6a0c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cdk_cr_constructs-2.1.338-py3-none-any.whl
Algorithm Hash digest
SHA256 1ce0d47f1d7b6328697ac7b8140bda46f60079cf051b2202e87770b29ae6796e
MD5 0b3e418370d25a85b818ebd1f8373e7a
BLAKE2b-256 fa5bab894ed2a5602fd5f1c7c98a5cea553fe8e762287d979853ea5011ed463b

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