From ca69c208d39d32e82703ed40389427f5876f971d Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Sun, 29 Mar 2020 22:07:15 +0200 Subject: [PATCH] documentation: fix some typos and whitespace --- _documentation/_index.md | 6 +++--- _documentation/getting-started.md | 14 +++++++------- _documentation/github-action.md | 8 ++++---- _documentation/install.md | 16 ++++++++-------- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/_documentation/_index.md b/_documentation/_index.md index 301075a..bdd6f0a 100644 --- a/_documentation/_index.md +++ b/_documentation/_index.md @@ -3,9 +3,9 @@ title: 'Documentation' weight: 1 --- -## AsCode - Terraform Alternative Syntax +## AsCode - Terraform Alternative Syntax -**AsCode** is a tool to define infrastructure as code using the [Starlark](https://github.com/google/starlark-go/blob/master/doc/spec.md) language on top of [Terraform](https://github.com/hashicorp/terraform). It allows to describe your infrastructure using an expressive language in Terraform without writing a single line of HCL, meanwhile, you have the complete ecosystem of [providers](https://www.terraform.io/docs/providers/index.html) +**AsCode** is a tool to define infrastructure as code using the [Starlark](https://github.com/google/starlark-go/blob/master/doc/spec.md) language on top of [Terraform](https://github.com/hashicorp/terraform). It allows to describe your infrastructure using an expressive language in Terraform without writing a single line of HCL, meanwhile, you have the complete ecosystem of [providers](https://www.terraform.io/docs/providers/index.html) ### Why? @@ -13,4 +13,4 @@ Terraform is a great tool, with support for almost everything you can imagine, m ### What is Starlark? -Starlark is a dialect of Python intended for use as a configuration language. A Starlark interpreter is typically embedded within a larger application, and this application may define additional domain-specific functions and data types beyond those provided by the core language. For example, Starlark is embedded within (and was originally developed for) the Bazel build tool, and Bazel's build language is based on Starlark. \ No newline at end of file +Starlark is a dialect of Python intended to be used as a configuration language. A Starlark interpreter is typically embedded within a larger application, and this application may define additional domain-specific functions and data types beyond those provided by the core language. For example, Starlark is embedded within (and was originally developed for) the Bazel build tool, and Bazel's build language is based on Starlark. \ No newline at end of file diff --git a/_documentation/getting-started.md b/_documentation/getting-started.md index db02156..3483fd6 100644 --- a/_documentation/getting-started.md +++ b/_documentation/getting-started.md @@ -3,7 +3,7 @@ title: 'Getting Started' weight: 2 --- -This page explains the basics of using AsCode to define your infrastructure in Terraform. It assumes that you have already [installed](/docs/install) Ascode. +This page explains the basics of using AsCode to define your infrastructure in Terraform. It assumes that you have already [installed](/docs/install) AsCode. ```sh > ascode --help @@ -23,9 +23,9 @@ Available commands: ## The `repl` command -The `repl` command provides a handy `REPL` interface for debugging and tinkering with AsCode. +The `repl` command provides a handy `REPL` interface for debugging and tinkering with AsCode. -For example you can explore the API of a resource printing the list of arguments: +For example you can explore the API of a resource printing the list of arguments: ```sh > ascode repl @@ -49,16 +49,16 @@ resource "aws_instance" "web" { The `run` command executes a valid Starlack program. Using the `--print-hcl` and `--to-hcl`, an HCL encoded version of the `tf` object will be printed or saved to a given file, respectively. -This is the first step to deploy any infrastructure d defined with AsCode, using `run` and generating a valid `.tf` file, we can use the standard Terraform tooling to deploy our infrastructure using `terraform init`, `terraform plan` and `terraform apply`. +This is the first step to deploy any infrastructure defined with AsCode, using `run` and generating a valid `.tf` file, we can use the standard Terraform tooling to deploy our infrastructure using `terraform init`, `terraform plan` and `terraform apply`. To learn about writing Starlark programs, please refer to the [Language definition](/docs/starlark/) and the [API Reference](/docs/reference/) sections of this documentation. ### Basic Example -The goal of the example is create, in DigitalOcean, one `s-1vcpu-1gb` instance called `web` in the `nyc2` region: +The goal of the example is to create, in DigitalOcean, one `s-1vcpu-1gb` instance called `web` in the `nyc2` region: -> For running this example, you need `terraform` correctly installed on your system. +> To run this example, you need `terraform` correctly installed on your system. ```sh > mkdir example; cd example @@ -89,7 +89,7 @@ resource "digitalocean_droplet" "web" { ``` -And now as it's common in terraform we can run `init`, `plan` or/and `apply` +And now as it's usual in terraform we can run `init`, `plan` or/and `apply` ```sh > terraform init diff --git a/_documentation/github-action.md b/_documentation/github-action.md index 34c3cda..706467c 100644 --- a/_documentation/github-action.md +++ b/_documentation/github-action.md @@ -3,13 +3,13 @@ title: 'GitHub Action' weight: 40 --- -AsCode Github Action allows to execute AsCode `run` command in response to a GitHub event such as updating a pull request or pushing a new commit on a specific branch. +AsCode Github Action allows to execute AsCode `run` command in response to a GitHub event such as updating a pull request or pushing a new commit to a specific branch. This used in combination with the [Terraform GitHub Actions](https://www.terraform.io/docs/github-actions/getting-started.html) allows to execute the different terraform commands `init`, `plan` and `apply` inside of a [GitHub Workflow](https://help.github.com/en/actions/configuring-and-managing-workflows). ## Parameters -| Parameter | **Mandatory**/**Optional** | Description | +| Parameter | **Mandatory**/**Optional** | Description | | --------- | -------- | ----------- | | file | **Mandatory** | Starlark file to execute. Default value: `main.star` | | hcl | **Mandatory** | HCL output file. Default value: `generated.tf` | @@ -31,14 +31,14 @@ jobs: runs-on: ubuntu-latest env: TF_VERSION: latest - TF_WORKING_DIR: . + TF_WORKING_DIR: . steps: - name: 'Checkout' uses: actions/checkout@master - name: 'AsCode Run' uses: mcuadros/ascode@gh-action - + - name: 'Terraform Init' uses: hashicorp/terraform-github-actions@master with: diff --git a/_documentation/install.md b/_documentation/install.md index fa6aae8..c7986b4 100644 --- a/_documentation/install.md +++ b/_documentation/install.md @@ -1,9 +1,9 @@ --- title: 'Quick Install' -weight: 1 +weight: 1 --- -AsCode is written in [Go](https://golang.org/) with support for multiple platforms. +AsCode is written in [Go](https://golang.org/) with support for multiple platforms. The latest release can be found at [GitHub Releases.](https://github.com/mcuadros/ascode/releases), currently provides pre-built binaries for the following: @@ -13,11 +13,11 @@ The latest release can be found at [GitHub Releases.](https://github.com/mcuadro ## Binary (Cross-platform) -Download the appropriate version for your platform from [GitHub Releases.](https://github.com/mcuadros/ascode/releases). Once downloaded, the binary can be run from anywhere. You don’t need to install it into a global location. +Download the appropriate version for your platform from [GitHub Releases.](https://github.com/mcuadros/ascode/releases). Once downloaded, the binary can be run from anywhere. You don’t need to install it into a global location. Ideally, you should install it somewhere in your PATH for easy use. `/usr/local/bin` is the most probable location. -### Linux +### Linux ```sh wget https://github.com/mcuadros/ascode/releases/download/{{< param "version" >}}/ascode-{{< param "version" >}}-linux-amd64.tar.gz tar -xvzf ascode-{{< param "version" >}}-linux-amd64.tar.gz @@ -31,20 +31,20 @@ tar -xvzf ascode-{{< param "version" >}}-darwin-amd64.tar.gz mv ascode /usr/local/bin/ ``` -## Source +## Source -### Prerequisite Tools +### Prerequisite Tools - [Git](https://git-scm.com/) - [Go](https://golang.org/) (at least Go 1.12) ### Clone from GitHub -AsCode uses the [Go Modules](https://github.com/golang/go/wiki/Modules), so e easiest way to get started is to clone AsCode in a directory outside of the `$GOPATH`, as in the following example: +AsCode uses the [Go Modules](https://github.com/golang/go/wiki/Modules), so the easiest way to get started is to clone AsCode in a directory outside of the `$GOPATH`, as in the following example: ```sh git clone https://github.com/mcuadros/ascode.git $HOME/ascode-src cd $HOME/ascode-src -go install ./... +go install ./... ```