Git Product home page Git Product logo

cfn-teleport's Introduction

Hi there ๐Ÿ‘‹

I'm Daniel. I do stuff with computers. If I had to give myself a title for my current type of work, it would be automation engineer. My day-to-day work currently involves working with AWS CDK and Ansible.

I'm born and living in Frankfurt ๐Ÿ‡ฉ๐Ÿ‡ช. In between though I've been living for 16 years in Berlin ๐Ÿ‡ฉ๐Ÿ‡ช and 3 years in Udon Thani ๐Ÿ‡น๐Ÿ‡ญ. I'm married and I have 3 children.

I've been working for almost 9 years at Groupon. It was a great experience with awesome people, but I ultimately decided I did no longer want to waste my life maxing out profits and sell electronic and plastic crap nobody needs, just so more of it can be produced.

I'm currently working for DB Systel, the IT branch of the Deutsche Bahn, trying to improve and reduce cost for public transportation. Chuu chuu! ๐Ÿš† ๐ŸŒณ ๐ŸŒž

My favorite programming language is Go, though I have learned to love TypeScript. I'm sure this list won't be complete but I have also worked with: Rust, Python, Ruby, C++, C#, Swift, PHP, JavaScript, ActionScript, HTML, CSS, ...

My current pet projects are:

  • IAM Floyd: An AWS IAM statement generator with a fluent interface.
  • cfn-teleport: A command-line tool which can move CloudFormation resources between stacks

You can learn more about my career on my landingpage. If you want to ๐Ÿ“ซ contact me, please reach out on Keybase.

cfn-teleport's People

Contributors

dependabot[bot] avatar renovate[bot] avatar udondan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

kjm0001

cfn-teleport's Issues

Support all resource types

Currently we only have support for AWS::S3::Bucket.

In the function create_changeset the resource identifier key is hardcoded to BucketName.

It is preferred, that we don't hardoced a mapping in the tool, but find a way how to get the key dynamically.

Enable renaming of resources

Renaming is implemented but commented out in the code.

Currently renaming is too dangerous, as have have not implemented checking for references to the renamed resource. In case the resource is renamed, all references need to be updated.

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: Invalid configuration option: packageFileRules

Error: Error("expected value", line: 1, column: 1)

Hello,

First of all this tools looks really useful and could solve our hands a lot.
I'm trying to implement a simple POC of this tool but I'm stuck having an ambiguous error.

I have created the 2 following simple CF Stacks
Stack1:

AWSTemplateFormatVersion: 2010-09-09
Description: "Creates an S3 bucket to store logs."

Resources:
  MyBucket1:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: mybucket-123-logs-1-eu-west-1

  SecondBucket1:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: mybucket-123-logs-eu-west-1-second-bucket

Stack2:

AWSTemplateFormatVersion: 2010-09-09
Description: "Creates an S3 bucket to store logs."

Resources:
  MyBucket2:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: mybucket-456-logs-2-eu-west-1

  SecondBucket2:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: mybucket-456-logs-eu-west-1-second-bucket

I want to to a transfer of MyBucket1 from Stack1 to Stack2.

But when I run the following command:
cfn-teleport --source Stack1 --target Stack2 --resource MyBucket1 --yes

I get the output:

The following resources will be moved from stack Stack1 to Stack2:
  AWS::S3::Bucket    MyBucket1    mybucket-123-logs-1-eu-west-1
Error: Error("expected value", line: 1, column: 1)

Notes:
I run cfn-teleport version 0.4.0.
cfn-teleport is installed via cargo on ubuntu 20.04 LTS
cfn-teleport can communicate successfully with my AWS Account because when I don't provide the flags for Stacks and Resources I can find them and select them using the CLI wizard.

Am I missing something?

Sign MacOS app

App should be signed with a developer certificate.

Requirement: Developer Certificate ๐Ÿ˜ธ

In case of import error, save template to disk

In case the import fails, we should save the template to disk, so the user can inspect the tempalte and use it for manual import.

We then also can implement a --retry option, which will take the template and proceed.

Error: "Unable to proceed, because the template is invalid: unhandled error"

First of all, thank you very much for writing this tool. If it works as advertised, it will be an absolute life-saver for us.

I am unfortunately not versed in Rust (Java/TS background) otherwise I would've probably been able to debug this myself

We are seeing the following error:

cfn-teleport --source reconciliation-dev-tables --target reconciliation-dev-reconciliation-service --resource ReconciliatonDetailsTable --resource SettlementDetailsTable --yes
The following resources will be moved from stack reconciliation-dev-tables to reconciliation-dev-reconciliation-service:
  AWS::DynamoDB::Table    ReconciliatonDetailsTable    reconciliation-dev-details
  AWS::DynamoDB::Table    SettlementDetailsTable       reconciliation-dev-settlement-details
Error: "Unable to proceed, because the template is invalid: unhandled error"

Using AWS_REGION and AWS_PROFILE to guide the aws credentials chain. The profile is using AWS SSO (not sure this is relevant because I don't suspect a permissions issue here)

How can I convince cfn-teleport to share moar debugging information with me?
Can this be related to dependencies between resources within the source stack?

Edit: thinking about this some more and reading through the code, it might be that having exports in the source stack can cause the new template to be invalid after cfn-teleport attempts to remove the resources from the source stack. I don't see any code that looks up the exports to remove them together with the resource

Remove DeletionPolicy

When we import resources, we have to add a DeletionPolicy to all imported resources.

After importing, we should remove the DeletionPolicy. For this to happen, we have to store the resources where we added the DeletionPolicy during import, since we don't want to remove DeletionPolicies which have been already set before importing.

โ€ผ๏ธ AFK

I'm on the road with no access to a keyboard until April 24. I might be able to look at issues but won't be able to fix anything until then.

๐ŸŒด

Application details not set in windows exe

Application details not set in windows exe. When running Get-Command cfn-teleport, the output is

 Path               : C:\ProgramData\Chocolatey\bin\cfn-teleport.exe
Extension          : .exe
Definition         : C:\ProgramData\Chocolatey\bin\cfn-teleport.exe
Source             : C:\ProgramData\Chocolatey\bin\cfn-teleport.exe
Version            : 1.0.0.0
Visibility         : Public
OutputType         : {System.String}
Name               : cfn-teleport.exe
CommandType        : Application
ModuleName         : 
Module             : 
RemotingCapability : PowerShell
Parameters         : 
ParameterSets      : 
HelpUri            : 
FileVersionInfo    : File:             C:\ProgramData\Chocolatey\bin\cfn-teleport.exe
                     InternalName:     cfn-teleport.exe
                     OriginalFilename: cfn-teleport.exe
                     FileVersion:      1.0.0.0
                     FileDescription:  ShimGen generated shim - Chocolatey Shim
                     Product:          ShimGen generated shim - Chocolatey Shim
                     ProductVersion:   1.0.0
                     Debug:            False
                     Patched:          False
                     PreRelease:       False
                     PrivateBuild:     False
                     SpecialBuild:     False
                     Language:         Language Neutral

At very least the version should be correct.

See:

Buld Test pipeline

Should have a test target in Makefile.

In test/cdk we have a cdk app which will deploy two stacks. Stack A has two buckets, stack B is empty.

The test target should:

  • deploy the CDK app
  • run the tool and migrate both buckets from A to B
  • cdk diff should report changes
  • migrate both resources back from stack B to A
  • cdk diff should report no changes
  • cdk DESTROY

Should support non-interactively mode

Currently the tool can only work interactively, the user has to provide input at runtime.

The tool should also support command line args, e.g.

cdn-resource-mirator \
  --source A \
  --target B \
  -y \
  --resource Bucket182C536A1 \
  --resource Bucket21D68F7E8

Renaming resorces not working

When a new ID is provided, the program panics:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/main.rs:561:75

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.