This repository has been archived by the owner on Nov 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding examples and documentation, fixing typos
- Loading branch information
Showing
14 changed files
with
346 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"name": "Azure CAF rover", | ||
|
||
// Update the 'dockerComposeFile' list if you have more compose files or use different names. | ||
"dockerComposeFile": "docker-compose.yml", | ||
|
||
// The 'service' property is the name of the service for the container that VS Code should | ||
// use. Update this value and .devcontainer/docker-compose.yml to the real service name. | ||
"service": "rover", | ||
|
||
// The optional 'workspaceFolder' property is the path VS Code should open by default when | ||
// connected. This is typically a volume mount in .devcontainer/docker-compose.yml | ||
"workspaceFolder": "/tf/caf", | ||
|
||
// Use 'settings' to set *default* container specific settings.json values on container create. | ||
// You can edit these settings after create using File > Preferences > Settings > Remote. | ||
"settings": { | ||
// If you are using an Alpine-based image, change this to /bin/ash | ||
"files.eol": "\n", | ||
"terminal.integrated.shell.linux": "/bin/bash", | ||
"editor.tabSize": 2, | ||
"terminal.integrated.scrollback": 2000, | ||
}, | ||
|
||
// Uncomment the next line if you want start specific services in your Docker Compose config. | ||
// "runServices": [], | ||
|
||
// Uncomment this like if you want to keep your containers running after VS Code shuts down. | ||
// "shutdownAction": "none", | ||
|
||
// Uncomment the next line to run commands after the container is created. | ||
"postCreateCommand": "cp -R /tmp/.ssh-localhost/* ~/.ssh && chmod 700 ~/.ssh && chmod 600 ~/.ssh/*", | ||
|
||
// Add the IDs of extensions you want installed when the container is created in the array below. | ||
"extensions": [ | ||
"4ops.terraform", | ||
"mutantdino.resourcemonitor" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#------------------------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. | ||
#------------------------------------------------------------------------------------------------------------- | ||
|
||
version: '3.7' | ||
services: | ||
rover: | ||
image: aztfmod/roverdev:vnext | ||
|
||
labels: | ||
- "caf=Azure CAF" | ||
|
||
volumes: | ||
- ..:/tf/caf | ||
- volume-caf-vscode:/home/vscode | ||
- ~/.ssh:/tmp/.ssh-localhost:ro | ||
|
||
- /var/run/docker.sock:/var/run/docker.sock | ||
|
||
# Overrides default command so things don't shut down after the process ends. | ||
command: /bin/sh -c "while sleep 1000; do :; done" | ||
|
||
volumes: | ||
volume-caf-vscode: | ||
labels: | ||
- "caf=Azure CAF" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# See http://pre-commit.com for more information | ||
# See http://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: git://github.com/antonbabenko/pre-commit-terraform | ||
rev: v1.31.0 | ||
hooks: | ||
- id: terraform_fmt | ||
- id: terraform_docs | ||
- id: terraform_tflint | ||
# - id: terraform_validate | ||
- id: terraform_tfsec | ||
- repo: git://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.1.0 | ||
hooks: | ||
- id: check-merge-conflict | ||
- id: trailing-whitespace | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
# - repo: git://github.com/markdownlint/markdownlint | ||
# rev: v0.9.0 | ||
# hooks: | ||
# - id: markdownlint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Microsoft Open Source Code of Conduct | ||
|
||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). | ||
|
||
Resources: | ||
|
||
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) | ||
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) | ||
- Contact [[email protected]](mailto:[email protected]) with questions or concerns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 Microsoft | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Azure route table | ||
|
||
Creates a simple route table for Azure. | ||
|
||
## Usage | ||
|
||
To run this example, simply execute: | ||
|
||
```hcl | ||
terraform init | ||
terraform plan | ||
terraform apply | ||
``` | ||
|
||
Once you are done, just run | ||
```hcl | ||
terraform destroy | ||
``` | ||
|
||
## Outputs | ||
|
||
| Name | Type | Description | | ||
| -- | -- | -- | | ||
| object | object | Full object as returned per the module | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
locals { | ||
convention = "cafrandom" | ||
name = "caftest-route-table" | ||
name_la = "caftestlavalid" | ||
name_diags = "caftestdiags" | ||
location = "southeastasia" | ||
prefix = "" | ||
postfix = "" | ||
max_length = 60 | ||
enable_event_hub = false | ||
resource_groups = { | ||
test = { | ||
name = "test-caf-route-table" | ||
location = "southeastasia" | ||
}, | ||
} | ||
tags = { | ||
environment = "DEV" | ||
owner = "CAF" | ||
} | ||
next_hop_in_dynamic_private_ip = "192.168.10.6" | ||
|
||
route_table = { | ||
name = "test_route" | ||
route_entries = { | ||
re1 = { | ||
name = "myroute1" | ||
prefix = "255.0.0.0/8" | ||
next_hop_type = "None" | ||
}, | ||
re2 = { | ||
name = "myroute2" | ||
prefix = "255.255.0.0/16" | ||
next_hop_type = "VirtualAppliance" | ||
next_hop_in_ip_address = "192.168.10.6" | ||
}, | ||
re3 = { | ||
name = "defaultroute" | ||
prefix = "0.0.0.0/0" | ||
next_hop_type = "VirtualAppliance" | ||
next_hop_in_ip_address = "192.168.10.5" | ||
}, | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
output object { | ||
value = module.route_table | ||
sensitive = false | ||
description = "Full object" | ||
} |
Oops, something went wrong.