This file contains hidden or 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
| variable "location" { | |
| type = string | |
| description = "Azure location of terraform server environment" | |
| default = "australiaeast" | |
| } | |
| variable "vnet_address_space" { | |
| type = list | |
| description = "Address space for Virtual Network" |
This file contains hidden or 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
| data "aws_ami" "web" { | |
| filter { | |
| name = "state" | |
| values = ["available"] | |
| } | |
| filter { | |
| name = "tag:Component" | |
| values = ["web"] | |
| } |
This file contains hidden or 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
| data "azurerm_subscription" "current" { | |
| } | |
| output "current_subscription_display_name" { | |
| value = data.azurerm_subscription.current.display_name | |
| } |
This file contains hidden or 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
| #create the resource group | |
| resource "azurerm_resource_group" "rg" { | |
| name = "ateam-resource-group" | |
| location = "australiaeast" | |
| } | |
| #create the virtual network | |
| resource "azurerm_virtual_network" "vnet1" { | |
| resource_group_name = azurerm_resource_group.rg.name | |
| location = "australiaeast" |
This file contains hidden or 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
| provider "azurerm" { | |
| version = "=2.8.0" | |
| features {} | |
| } |
This file contains hidden or 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
| provider "aws" { | |
| access_key = "XXXXXXXXXXX" | |
| secret_key = "XXXXXXXXXXX" | |
| region = "us-west-1" | |
| version = "=2.8.0" | |
| } |
This file contains hidden or 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
| ASPNETCORE_ENVIRONMENT=PreProd | |
| ASPNETCORE_URLS=https://*:5001 | |
| ASPNETCORE_Kestrel__Certificates__Default__Password=<certificate_password> | |
| ASPNETCORE_Kestrel__Certificates__Default__Path=/root/.dotnet/https/certificate.pfx |
This file contains hidden or 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
| version: "3.7" | |
| services: | |
| policy_api: | |
| container_name: policyadmin_api | |
| build: | |
| context: . | |
| dockerfile: containers/api/Dockerfile | |
| volumes: | |
| - ./<path_to_certificate>/:/root/.dotnet/https | |
| env_file: |
This file contains hidden or 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
| public void ConfigureServices(IServiceCollection services) | |
| { | |
| services.AddMvc(); | |
| services.Configure<ForwardedHeadersOptions>(options => | |
| { | |
| options.ForwardedHeaders = | |
| ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto; | |
| options.KnownNetworks.Clear(); | |
| options.KnownProxies.Clear(); |
This file contains hidden or 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
| webBuilder.ConfigureKestrel(serverOptions => | |
| { | |
| serverOptions.ConfigureHttpsDefaults(listenOptions => | |
| { | |
| // certificate is an X509Certificate2 | |
| listenOptions.ServerCertificate = certificate; | |
| }); | |
| }); |