Code Monkey home page Code Monkey logo

cform-vscode's Introduction

CloudFormation support for Visual Studio Code

Build Status

This is a fork of ST3 CloudFormation plugin.

News

Introducing two release channels:

  1. Stable for scheduled update cycle
  2. Nightly for fast updates based on community commits

You can find both under section Releases on Github:

https://github.com/aws-scripting-guy/cform-VSCode/releases

Only Stable channel is being published to VS Code marketplace. Nightly build needs to be installed manually from .vsix file.

Usage

  1. Install the extension
  2. Create new file
  3. Set syntax to JSON or YAML
  4. Type start and press tab key to populate basic template skeleton
  5. Start typing desired resource name and hit tab key

Note: CloudFormation support works with YAML/JSON syntax selected or .json, .cform, .template file extensions. These are commonly used CloudFormation template extensions.

New template file

YAML templates

Extension fully supports YAML templates. YAML template creation follows the same syntax rules:

  1. Create new YAML document
  2. Type start to populate new template
  3. Start typing desired resource name and hit tab key

Note: YAML support is dependent on YAML Language Server. By default, YAML Language Server (Red Hat YAML recommended) will be installed automatically as prerequisite.

Note: If you do not want to install YAML Language Server, install version cform-noyaml.vsix from GitHub.

YAML setup

After installation, open your User Settings (Ctrl + ,) and paste preferences below into your settings file.

Note: This will whitelist CloudFormation intrinsic functions tags. Otherwise you will end up with Unknown Tag showing up in your YAML document.

    // Custom tags for the parser to use
    "yaml.customTags": [
        "!And",
        "!If",
        "!Not",
        "!Equals",
        "!Or",
        "!FindInMap sequence",
        "!Base64",
        "!Cidr",
        "!Ref",
        "!Sub",
        "!GetAtt",
        "!GetAZs",
        "!ImportValue",
        "!Select",
        "!Select sequence",
        "!Split",
        "!Join sequence"
    ],
    // Enable/disable default YAML formatter (requires restart)
    "yaml.format.enable": true,

Troubleshooting

Known issues

When working with YAML documents, your current YAML language interpreter might not support syntax of AWS intrinsic functions, thus marking them as unknown tag. This however has no effect on validity of the YAML document.

Note: You can solve this issue by whitelisting specific tags following instructions under section YAML Setup.

Note: Tested only with Red Hat YAML Language Server

YAML known issue

Contributions

Contributions:

  1. Fork
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Your feedback is welcome on GitHub.

Donations

Paypal

paypal

cform-vscode's People

Contributors

abemedia avatar alexfrosa avatar aws-scripting-guy avatar azure-pipelines[bot] avatar dabeah avatar emepetres avatar galmeida avatar gitter-badger avatar gunman808 avatar maurogestoso avatar pacohope avatar ssennettau avatar tac0x2a avatar

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.