Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kerenterraform deploy #6

Merged
merged 2 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/terraform-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) NetApp, Inc.
# SPDX-License-Identifier: Apache-2.0

name: "Documentation: terraform-docs"

on:
pull_request:

jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout pull request
uses: actions/[email protected]
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Render documentation and push changes back to branch
uses: terraform-docs/[email protected]
with:
config-file: ".terraform-docs.yml"
output-file: "README.md"
output-method: inject
git-push: true
41 changes: 41 additions & 0 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright (c) NetApp, Inc.
# SPDX-License-Identifier: Apache-2.0

name: "Code Quality: Terraform"

on:
pull_request:
push:
branches:
- main

jobs:
terraform:
name: Terraform
runs-on: ubuntu-latest

steps:
- name: Checkout pull request
uses: actions/[email protected]
with:
fetch-depth: 1
ref: ${{ github.event.pull_request.head.ref }}

- name: Set up Terraform
uses: hashicorp/setup-terraform@v1
with:
terraform_wrapper: false
terraform_version: 1.6.6

- name: Initialize Terraform
run: terraform init

- name: Format Terraform configuration
run: terraform fmt -diff -check -no-color -recursive

- name: Validate Terraform configuration
run: terraform validate

- name: Lint Terraform configuration
run: curl -sSfL https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | sh
tflint
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
terraform_deployment/.terraform
terraform_deployment/.terraform.lock.hcl
terraform_deployment/.terraform*
terraform_deployment/terraform.tfstate*
88 changes: 88 additions & 0 deletions .terraform-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Copyright (c) NetApp, Inc.
# SPDX-License-Identifier: Apache-2.0

---

# see https://terraform-docs.io/user-guide/configuration/formatter/
formatter: "markdown table"

# see https://terraform-docs.io/user-guide/configuration/output/
output:
file: "README.md"
mode: inject
template: |-
<!-- BEGIN_TF_DOCS -->
{{ .Content }}
<!-- END_TF_DOCS -->

# see https://terraform-docs.io/user-guide/configuration/settings/
settings:
anchor: false
color: true
default: true
escape: false
indent: 3
required: true
sensitive: true
type: true

# see https://terraform-docs.io/user-guide/configuration/sort/
sort:
enabled: true
by: required

# see https://terraform-docs.io/user-guide/configuration/sections/
sections:
show:
- providers
- inputs
- outputs

content: |

## Table of Contents
* [Introduction](#introduction)
* [Prerequisites](#prerequisites)
* [Getting Started](#getting-started)
* [Usage Examples](#usage-examples)
* [Author Information](#author-information)
* [License](#license)

## Introduction

<< place your description here >>

##Prerequisites

{{ .Providers}}

### Repository Overview

{{ .Inputs }}

{{ .Outputs }}

## Getting Started

<< place your instructions here >>

## Usage Examples

<< place your examples here >>

## Author Information

This repository is maintained by the contributors listed on [GitHub](https://github.com/NetApp/FSxN-Samples/graphs/contributors).

## License

Licensed under the Apache License, Version 2.0 (the "License").

You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0).

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an _"AS IS"_ basis, without WARRANTIES or conditions of any kind, either express or implied.

See the License for the specific language governing permissions and limitations under the License.

# see https://terraform-docs.io/user-guide/configuration/version/
version: ">= 0.16.0, < 1.0.0"
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,19 @@ This GitHub repository contains comprehensive code samples and automation script

## Table of Contents
* [FSxN deployment using Terraform](/terraform_deployment)


## Author Information

This repository is maintained by the contributors listed on [GitHub](https://github.com/NetApp/FSxN-Samples/graphs/contributors).

## License

Licensed under the Apache License, Version 2.0 (the "License").

You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0).

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an _"AS IS"_ basis, without WARRANTIES or conditions of any kind, either express or implied.

See the License for the specific language governing permissions and limitations under the License.

15 changes: 14 additions & 1 deletion terraform_deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Follow the instructions below to use this sample in your own environment.
* [Prerequisites](#prerequisites)
* [Getting Started](#getting-started)
* [Usage Examples](#usage-examples)
* [Author Information](#author-information)
* [License](#license)

## Introduction
Expand Down Expand Up @@ -156,4 +157,16 @@ Run the following command to execute the Terrafom code and apply the changes pro
$ terraform apply
```

## License
## Author Information

This repository is maintained by the contributors listed on [GitHub](https://github.com/NetApp/FSxN-Samples/graphs/contributors).

## License

Licensed under the Apache License, Version 2.0 (the "License").

You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0).

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an _"AS IS"_ basis, without WARRANTIES or conditions of any kind, either express or implied.

See the License for the specific language governing permissions and limitations under the License.
Loading