Skip to content

Instantly share code, notes, and snippets.

View AymenSegni's full-sized avatar

asegni AymenSegni

View GitHub Profile
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
// main.tf
resource "aws_s3_bucket" "kops_state" {
bucket = "${var.environment}-kops-s3"
acl = "private"
versioning {
enabled = true
}
cidr = "10.0.0.0/16"
azs = ["eu-central-1a", "eu-central-1b", "eu-central-1c"]
private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
public_subnets = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"]
ingress_ips = ["10.0.0.100/32", "10.0.0.101/32", "10.0.0.103/32"]
cluster_name = "aymen.krypton.berlin"
terraform {
backend "s3" {
region = "eu-central-1"
bucket = "terraform-eks-dev"
key = "terraform.tfstate"
encrypt = "true"
dynamodb_table = "terraform-state-lock"
}
}