Skip to content

Instantly share code, notes, and snippets.

@daloulou
daloulou / variables.tf
Last active December 15, 2020 13:51
Terraform variables files
variable "example_ressource_group_name" {
type = string
default = "<your-resource-group-name>"
}
variable "azurerm_container_memory" {
type = number
default = 1
}
@daloulou
daloulou / main.tf
Last active December 15, 2020 15:05
Terraform file to deploy you app with traefik sidecar on Azure Container Instance
provider "azurerm" {
version = "=2.36.0"
features {}
}
data "azurerm_resource_group" "example" {
name = var.example_ressource_group_name
}
data "azurerm_storage_account" "example" {
@daloulou
daloulou / example-api.toml
Last active December 15, 2020 14:13
Traefik dynamic configuration file to Add SSL on Azure Container Instance
## Define Traefik endpoint route
[http]
[http.routers.api]
entryPoints = ["https"]
service = "api@internal"
rule = "Host(`{{env "TRAEFIK_URL"}}`)"
[http.routers.api.tls]
certResolver = "le"
## Define our App endpoint route to service "my-service"
@daloulou
daloulou / traefik.toml
Created December 14, 2020 10:07
Traefik static configuration file to add SSL on Azure Container Instance
defaultEntryPoints = ["http", "https"]
[acceslog]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.http]
[entryPoints.http.http.redirections]
[entryPoints.http.http.redirections.entryPoint]
to = "https"
scheme = "https"