Skip to content

Commit

Permalink
Add a devcontainer and an example fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dmattia committed Aug 9, 2022
1 parent 88920c6 commit c3b8c03
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.241.1/containers/ubuntu/.devcontainer/base.Dockerfile

# [Choice] Ubuntu version (use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon): ubuntu-22.04, ubuntu-20.04, ubuntu-18.04
ARG VARIANT="jammy"
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>


24 changes: 24 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.241.1/containers/ubuntu
{
"name": "Ubuntu",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick an Ubuntu version: jammy / ubuntu-22.04, focal / ubuntu-20.04, bionic /ubuntu-18.04
// Use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon.
"args": { "VARIANT": "ubuntu-22.04" }
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
"terraform": "1.2",
"aws-cli": "latest"
}
}
17 changes: 17 additions & 0 deletions examples/http/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# To use the sombra module, you must declare the AWS and Vault providers explicitly
# Your settings will very likely be different here.
provider "aws" {
profile = "dev"
region = "eu-west-1"
}
provider "vault" {
# You are more than welcome to use real vault credentials here.
# See https://github.com/hashicorp/terraform-provider-vault/issues/666
# for an explanation of why a "fake" set of settings is required when using
# modules that optionally use the vault provider
address = "https://vault.${local.parent_domain}"
token = "not-a-real-token"
skip_tls_verify = true
skip_child_token = true
}

locals {
subdomain = "http-test"
# You should pick a hosted zone that is in your AWS Account
Expand Down
17 changes: 17 additions & 0 deletions examples/https/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# To use the sombra module, you must declare the AWS and Vault providers explicitly
# Your settings will very likely be different here.
provider "aws" {
profile = "dev"
region = "eu-west-1"
}
provider "vault" {
# You are more than welcome to use real vault credentials here.
# See https://github.com/hashicorp/terraform-provider-vault/issues/666
# for an explanation of why a "fake" set of settings is required when using
# modules that optionally use the vault provider
address = "https://vault.${local.parent_domain}"
token = "not-a-real-token"
skip_tls_verify = true
skip_child_token = true
}

locals {
subdomain = "https-test"
# You should pick a hosted zone that is in your AWS Account
Expand Down

0 comments on commit c3b8c03

Please sign in to comment.