Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Provide your own unique aksname within the Azure AD tenant
aksname="run-it-on-cloud"
resourcegroup="runItOnCloud"
location="westeurope"
# Create the Azure AD application Server
serverApplicationId=$(az ad app create \
--display-name "${aksname}Server" \
2020-05-26T21:36:38.613Z [DEBUG] plugin.terraform-provider-azurerm_v2.11.0_x5: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x37da4f2]
2020-05-26T21:36:38.613Z [DEBUG] plugin.terraform-provider-azurerm_v2.11.0_x5:
2020-05-26T21:36:38.613Z [DEBUG] plugin.terraform-provider-azurerm_v2.11.0_x5: goroutine 8600 [running]:
2020-05-26T21:36:38.613Z [DEBUG] plugin.terraform-provider-azurerm_v2.11.0_x5: github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/privatedns.dataSourceArmPrivateDnsZoneRead(0xc0003ee690, 0x3c70e80, 0xc0000ce280, 0x0, 0x0)
2020-05-26T21:36:38.613Z [DEBUG] plugin.terraform-provider-azurerm_v2.11.0_x5: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/privatedns/private_dns_zone_data_source.go:77 +0x292
2020-05-26T21:36:38.613Z [DEBUG] plugin.terraform-provider-azurerm_v2.11.0_x5: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).ReadDataApply(0xc0
# * deployment/main.tf
# .... the rest the modules deployments
module "app_env" {
source = "../modules/app_env"
k8s_app_lb_name = var.k8s_app_lb_name
zone_name = var.zone_name
}
# * deployment/variables.tf
# .... the rest the modules variables
# * acm.tf
# Create an AWS certificate for hello.aymen.krypton.berlin
resource "aws_acm_certificate" "cert" {
domain_name = aws_route53_record.hello.name
validation_method = "DNS"
tags = {
Environment = "Krypton"
Terraform = "true"
# .... the rest of modules deployments
# Create ECR Repo and push the app image
# * main.tf
module "ecr" {
source = "../modules/ecr"
image_name = var.image_name
}
# * main.tf
// Create ECR Repo
resource "aws_ecr_repository" "krypton" {
name = var.image_name
image_tag_mutability = "MUTABLE"
image_scanning_configuration {
scan_on_push = true
}
}
apiVersion: kops/v1alpha2
kind: Cluster
metadata:
name: {{.cluster_name.value}}
spec:
api:
loadBalancer:
type: Public
additionalSecurityGroups: ["{{.k8s_api_http_security_group_id.value}}"]
authorization:
output "region" {
value = "eu-central-1"
}
output "vpc_id" {
value = module.vpc.vpc_id
}
output "vpc_cidr_block" {
value = module.vpc.vpc_cidr_block
# VPC Module
module "vpc" {
source = "../modules/shared_vpc"
cidr = var.cidr
azs = var.azs
private_subnets = var.private_subnets
public_subnets = var.public_subnets
environment = "krypton"
ingress_ips = var.ingress_ips
#
# VPC Resources
# * VPC
# * Subnets
# * Internet Gateway
# * Route Tables
# * Sec Groups
module "vpc" {
source = "terraform-aws-modules/vpc/aws"