Git Product home page Git Product logo

terraform-modules's Introduction

Xenit Terraform modules

This repository contains the Xenit Terraform modules.

Module groups

Contributing

Read the contributing guide to get started writing modules.

Style Guide

These modules use tflint to enforce best practices, check the tflint configuration file in the modules directory for details about which rules are enabled. The are also provider specific style guides in the individual directories for standards that only apply to that provider. Following the standards below however will help you avoid the most common rule violations.

Every resource name should be lowercase and snakecased. No other format should be used in the resource names. The role assignment for a cluster admin is named cluster_admin and not clusterAdmin.

resource "azurerm_role_assignment" "cluster_admin" {
  scope = azurerm_kubernetes_cluster.this.id
  role_definition_name = "Azure Kubernetes Service Cluster User Role"
  principal_id         = var.aad_groups.cluster_admin.id
}

Resources that only have a single instance and no fitting name that distinguishes it should use the name this. The reasoning is that it is more DRY than reporting the resource type like aks which other people may do. However if there is a fitting name please use it. Additionally please do not have to resources of the same type where one of them is called this and the other has a specific name, instead give both resources a specific name.

resource "azurerm_kubernetes_cluster" "this" {
  name                            = "aks-${var.environment}-${var.location_short}-${var.name}${var.aks_name_suffix}"
  location                        = data.azurerm_resource_group.this.location
  resource_group_name             = data.azurerm_resource_group.this.name
  dns_prefix                      = "aks-${var.environment}-${var.location_short}-${var.name}${var.aks_name_suffix}"
}

terraform-modules's People

Contributors

simongottschlag avatar phillebaba avatar gh-actions-automation[bot] avatar github-actions[bot] avatar nissessenap avatar ulrikstrid avatar madakralc avatar anderscarling avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.