IBM-Cloud / configuration-discovery

Infrastructure reverse engineering tool for IBM Cloud - Beta Release
Apache License 2.0
3 stars 8 forks source link
terraform terraformer

IBM Cloud Configuration Discovery

Use "Configuration Discovery" to import the existing Cloud resources (in your account) and its configuration settings - to auto-generate the terraform configuration file (.tf) and state file (.tfstate).  It makes it easy for you to adopt the Infrastructure-as-Code practices; it can reverse engineer the current IBM Cloud environment (that was provisioned using UI or CLI). 

Configuration Discovery tool is powered by Terraformer. This Tool will augment the terraformer, with a number of capabilities that are native to IBM Cloud.

Dependencies

Installation

Configuration Discovery tool

Run this command to install the Terraformer and Configuration Discovery tool:

curl -qL https://raw.githubusercontent.com/IBM-Cloud/configuration-discovery/main/install.sh | sh

You can download pre-built binaries for linux and macOS on the releases page.

IBM Cloud Provider Plugin

Usage

    $> discovery
    NAME:
        IBM Cloud Discovery CLI - Lets you create state file and TF Config from Resources in your cloud account. For the green field and brown field imports of config and statefile, and all terraformer related

    USAGE:
        discovery [global options] command [command options] [arguments...]

    VERSION:
        0.1.1

    COMMANDS:
        help, h  Shows a list of commands or help for one command

        discovery:
            version            discovery version
            config, configure  discovery config [--config_name CONFIG_NAME]
            import             discovery import --services SERVICES_TO_IMPORT [--tags TAGS] [--config_name CONFIG_NAME] [--compact]

    GLOBAL OPTIONS:
        --help, -h     show help
        --version, -v  print the version

Configuration Discovery Commands

Below commands help you to import your resources into terraform configuration. For more detailed description, run discovery help. For help on a command, run discovery help <command>

Command Description
discovery version IBM Cloud Discovery CLI version. Gives you other dependency information. Shows all supported importable resources
discovery config Create a local configuration directory for exporting the terrraform configuration and state files
discovery import Import TF config and state for resources in your ibm cloud account. Import all the resources for this service

You are now ready to use the Configuration Discovery tool tutorial.

Capabilities

Future Enhancements

Steps to use the Configuration Discovery

Files

Steps to use the project as an tool

Steps to use as a server

How to run the Configuration Discovery as a docker container

How to run the configuration discovery as a container

    cd /go/src/github.com
    git clone git@github.com:IBM-Cloud/configuration-discovery.git
    cd configuration-discovery/
    docker build -t configuration-discovery .
    docker images
    export API_IMAGE=configuration-discovery:latest
    docker-compose up --build -d

Contributing to Configuration Discovery

Please have a look at the CONTRIBUTING.md file for some guidance before submitting a pull request.

Report a Issue / Feature request

License

The project is licensed under the Apache 2.0 License. A copy is also available in the LICENSE file in this repository.