Socket
Book a DemoInstallSign in
Socket

cloudfriend-to-cdk

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloudfriend-to-cdk

## Description

latest
npmnpm
Version
1.0.0-alpha.0
Version published
Maintainers
0
Created
Source

@mapbox/cloudfriend-to-cdk

Description

This package is meant to use in cloudfriend projects and make these stacks compatible with cdk-aio workflow.

Getting Started

Installing

  • npm install @mapbox/cloudfriend-to-cdk "@mapbox/cloudfriend-to-cdk": "file:../cloud-platform/cloudfriend-aio/cloudfriend-to-cdk-0.1.0.tgz",

Deploy via Github Actions

Follow this guide to configure the cdk-aio workflow.

File location and other parameters are passed to cdk-aio via context arguments. The required context arguments are environment (passed by default), cloudfriendFile, and parametersFile. Check out the example below for how you might configure the cdk.deploy.yml that orchestrates cdk-aio.

environments:

  my-api-staging:
    environment: staging
    account-id: AWS_ACCOUNT_ID_SHARED_SVC_STG
    aws-login-region: us-east-2
    require-approval: true
    diff-refs:
      - refs/pull/.+/merge

    additional-args:
      - -c cloudfriendFile=test/cloudformation/my-api.template.js
      - -c parametersFile=test/cloudformation/my-api.parameters.staging.json

  my-api-production:
    environment: staging
    account-id: AWS_ACCOUNT_ID_SHARED_SVC_PROD
    aws-login-region: us-east-2
    require-approval: true
    diff-refs:
      - refs/heads/main

    additional-args:
      - -c cloudfriendFile=test/cloudformation/my-api.template.js
      - -c parametersFile=test/cloudformation/my-api.parameters.production.json

Deploy Locally

You can mimic cdk-aio by using the cdk cli directly. Note that this wont include any extras like slack notifications or reports. For a full guide to cdk cli commands check out this doc

npx cdk deploy -a "npx ts-node src/index.ts" \
    -c environment=staging \
    -c cloudfriendFile=test/cloudformation/api-rasterarrays.template.js \
    -c parametersFile=test/cloudformation/api-rasterarrays.staging.parameters.json
    /

FAQ's

FAQs

Package last updated on 15 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts