In this presentation, we will cover intermediate Terraform topics including alternative providers, collection types, loops and conditionals, and resource lifecycles. We will also focus on reusability with a discussion on modules, data sources, and remote state (including live demo examples).
Finally, we start the initial look into a full DevOps process with a quick review of Workspaces and Terraform Cloud; and wrap everything up with some key takeaway learning resources in your Terraform learning adventure.
NOTE: A recording this presentation can be found here: https://youtu.be/0CEF4eZ6HiQ
Infrastructure-as-Code (IaC) using TerraformAdin Ermie
Learn the benefits of Infrastructure-as-Code (IaC), what Terraform is and why people love it, along with a breakdown of the basics (including live demo deployments). Then wrap up with a comparison of Azure Resource Manager (ARM) templates versus Terraform, consider some best practices, and walk away with some key resources in your Terraform learning adventure.
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...Amazon Web Services
Using Terraform to automate your infrastructure on AWS. What is Terraform and how is it different from Ansible. How to control cloud deployments using Terraform.
An inroduction to Terraform, a tool that helps you deploy and change your infrastructure as code. Given at Rencontres Mondiales du Logiciel libre (RMLL) 2017
Infrastructure-as-Code (IaC) using TerraformAdin Ermie
Learn the benefits of Infrastructure-as-Code (IaC), what Terraform is and why people love it, along with a breakdown of the basics (including live demo deployments). Then wrap up with a comparison of Azure Resource Manager (ARM) templates versus Terraform, consider some best practices, and walk away with some key resources in your Terraform learning adventure.
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...Amazon Web Services
Using Terraform to automate your infrastructure on AWS. What is Terraform and how is it different from Ansible. How to control cloud deployments using Terraform.
An inroduction to Terraform, a tool that helps you deploy and change your infrastructure as code. Given at Rencontres Mondiales du Logiciel libre (RMLL) 2017
Best Practices of Infrastructure as Code with TerraformDevOps.com
When your organization is moving to cloud, the infrastructure layer transitions from running dedicated servers at limited scale to a dynamic environment, where you can easily adjust to growing demand by spinning up thousands of servers and scaling them down when not in use.
The future of DevOps is infrastructure as code. Infrastructure as code supports the growth of infrastructure and provisioning requests. It treats infrastructure as software: code that can be re-used, tested, automated and version controlled. HashiCorp Terraform adopts infrastructure as code throughout its tool to prevent configuration drift, manage immutable infrastructure and much more!
Join this webinar to learn why Infrastructure as Code is the answer to managing large scale, distributed systems and service-oriented architectures. We will cover key use cases, a demo of how to use Infrastructure as Code to provision your infrastructure and more:
Agenda:
Intro to Infrastructure as Code: Challenges & Use cases
Writing Infrastructure as Code with Terraform
Collaborating with Teams on Infrastructure
A comprehensive walkthrough of how to manage infrastructure-as-code using Terraform. This presentation includes an introduction to Terraform, a discussion of how to manage Terraform state, how to use Terraform modules, an overview of best practices (e.g. isolation, versioning, loops, if-statements), and a list of gotchas to look out for.
For a written and more in-depth version of this presentation, check out the "Comprehensive Guide to Terraform" blog post series: https://blog.gruntwork.io/a-comprehensive-guide-to-terraform-b3d32832baca
Infrastructure-as-Code (IaC) Using Terraform (Advanced Edition)Adin Ermie
In this new presentation, we will cover advanced Terraform topics (full-on DevOps). We will compare the deployment of Terraform using Azure DevOps, GitHub/GitHub Actions, and Terraform Cloud. We wrap everything up with some key takeaway learning resources in your Terraform learning adventure.
NOTE: A recording of this presenting is available here: https://www.youtube.com/watch?v=fJ8_ZbOIdto&t=5574s
In this hands-on workshop, we'll explore how to deploy resources to azure using terraform. First we'll peek into the basics of terraform (HCL language, CLI, providers, provisioners, modules, plans, state files etc).
Then in our hand-on exercise, we'll author terraform scripts to deploy virtual networks, virtual machines and app services to azure. Finally we'll walk through some azure tooling & integrations for terraform (azure cloud shell, hosted images in azure devops, azure marketplace images, VSCode extensions etc).
Author: Mithun Shanbhag
Terraform modules and best-practices - September 2018Anton Babenko
Slides for my "Terraform modules and best-practices" talk on meetups during September 2018.
Some links from the slides:
https://www.terraform-best-practices.com/
https://cloudcraft.co/
https://github.com/terraform-aws-modules/
https://github.com/antonbabenko/modules.tf-lambda
This beginning terraform workshop will teach you how to safely create and provision Infrastructure as Code (IAC) using Hashicorp Terraform in an AWS environment. In this class you will learn how to setup and install terraform. You will also be given a walkthrough of Terraform fundamentals. You will be lead through the process of deploying a single server, deploying a cluster and setting up a load balancer. You will also learn how to author Terraform Modules, work with Route53 and how to manage DNS.
Requirements. You will need to have an AWS account set up already with Terraform v0.9.3 installed. You will also need to have git install to download the workshop material.
You can find more informaiton on how to install terraform here: https://www.terraform.io/intro/getting-started/install.html. You can sign up for an AWS account here: https://aws.amazon.com/account/
https://github.com/jasonvance/terraform-introduction
Are you looking to automate your infrastructure but not sure where to start? View this presentation on ‘Getting started with Infrastructure as code’ to learn how to leverage IaC to deploy and manage resources on Azure. You will learn:
• Introduction to IaC
• Develop a simple IaC using Terraform
• Manage the deployed infrastructure using Terraform
View webinar recording at https://www.winwire.com/webinars
As part of this presentation we covered basics of Terraform which is Infrastructure as code. It will helps to Devops teams to start with Terraform.
This document will be helpful for the development who wants to understand infrastructure as code concepts and if they want to understand the usability of terrform
Introduction to Terraform - presented at the Perth Python & Django meetup on March 1 2018. Demo code repo can be found here: https://github.com/jaymickey/terraform-demo
Best Practices of Infrastructure as Code with TerraformDevOps.com
When your organization is moving to cloud, the infrastructure layer transitions from running dedicated servers at limited scale to a dynamic environment, where you can easily adjust to growing demand by spinning up thousands of servers and scaling them down when not in use.
The future of DevOps is infrastructure as code. Infrastructure as code supports the growth of infrastructure and provisioning requests. It treats infrastructure as software: code that can be re-used, tested, automated and version controlled. HashiCorp Terraform adopts infrastructure as code throughout its tool to prevent configuration drift, manage immutable infrastructure and much more!
Join this webinar to learn why Infrastructure as Code is the answer to managing large scale, distributed systems and service-oriented architectures. We will cover key use cases, a demo of how to use Infrastructure as Code to provision your infrastructure and more:
Agenda:
Intro to Infrastructure as Code: Challenges & Use cases
Writing Infrastructure as Code with Terraform
Collaborating with Teams on Infrastructure
A comprehensive walkthrough of how to manage infrastructure-as-code using Terraform. This presentation includes an introduction to Terraform, a discussion of how to manage Terraform state, how to use Terraform modules, an overview of best practices (e.g. isolation, versioning, loops, if-statements), and a list of gotchas to look out for.
For a written and more in-depth version of this presentation, check out the "Comprehensive Guide to Terraform" blog post series: https://blog.gruntwork.io/a-comprehensive-guide-to-terraform-b3d32832baca
Infrastructure-as-Code (IaC) Using Terraform (Advanced Edition)Adin Ermie
In this new presentation, we will cover advanced Terraform topics (full-on DevOps). We will compare the deployment of Terraform using Azure DevOps, GitHub/GitHub Actions, and Terraform Cloud. We wrap everything up with some key takeaway learning resources in your Terraform learning adventure.
NOTE: A recording of this presenting is available here: https://www.youtube.com/watch?v=fJ8_ZbOIdto&t=5574s
In this hands-on workshop, we'll explore how to deploy resources to azure using terraform. First we'll peek into the basics of terraform (HCL language, CLI, providers, provisioners, modules, plans, state files etc).
Then in our hand-on exercise, we'll author terraform scripts to deploy virtual networks, virtual machines and app services to azure. Finally we'll walk through some azure tooling & integrations for terraform (azure cloud shell, hosted images in azure devops, azure marketplace images, VSCode extensions etc).
Author: Mithun Shanbhag
Terraform modules and best-practices - September 2018Anton Babenko
Slides for my "Terraform modules and best-practices" talk on meetups during September 2018.
Some links from the slides:
https://www.terraform-best-practices.com/
https://cloudcraft.co/
https://github.com/terraform-aws-modules/
https://github.com/antonbabenko/modules.tf-lambda
This beginning terraform workshop will teach you how to safely create and provision Infrastructure as Code (IAC) using Hashicorp Terraform in an AWS environment. In this class you will learn how to setup and install terraform. You will also be given a walkthrough of Terraform fundamentals. You will be lead through the process of deploying a single server, deploying a cluster and setting up a load balancer. You will also learn how to author Terraform Modules, work with Route53 and how to manage DNS.
Requirements. You will need to have an AWS account set up already with Terraform v0.9.3 installed. You will also need to have git install to download the workshop material.
You can find more informaiton on how to install terraform here: https://www.terraform.io/intro/getting-started/install.html. You can sign up for an AWS account here: https://aws.amazon.com/account/
https://github.com/jasonvance/terraform-introduction
Are you looking to automate your infrastructure but not sure where to start? View this presentation on ‘Getting started with Infrastructure as code’ to learn how to leverage IaC to deploy and manage resources on Azure. You will learn:
• Introduction to IaC
• Develop a simple IaC using Terraform
• Manage the deployed infrastructure using Terraform
View webinar recording at https://www.winwire.com/webinars
As part of this presentation we covered basics of Terraform which is Infrastructure as code. It will helps to Devops teams to start with Terraform.
This document will be helpful for the development who wants to understand infrastructure as code concepts and if they want to understand the usability of terrform
Introduction to Terraform - presented at the Perth Python & Django meetup on March 1 2018. Demo code repo can be found here: https://github.com/jaymickey/terraform-demo
Terraform is an infrastructure-as-code tool that allows you to create Cloud and on-prem resources using a format that is readable by humans. Learn about its working and the problems it overcomes.
DevOps Training Online - Visualpath is the Leading and Best Software Training institute in Ameerpet. Avail complete job oriented DevOps Online Training Course by simply enrolling in our institute in Ameerpet. Call on - +91-9989971070
Visit: https://www.visualpath.in/devops-online-training.html
Using Terraform to manage the configuration of a Cisco ACI fabric.Joel W. King
Terraform is an open-source infrastructure as code software tool created by HashiCorp. It is written in GoLang. Cisco has developed an ACI terraform provider used to interact with the Cisco APIC. Network engineers define and provision the ACI infrastructure using a declarative configuration language known as HCL, HashiCorp Configuration Language.
This session will begin with a short presentation on Terraform and how it can be used to manage resources in an ACI fabric. There is a companion GitLab repository (https://gitlab.com/joelwking/terraform_aci) which will be used as a demo environment. Attendees can download Vagrant and VirtualBox to their laptop and execute the demonstration using the Cisco DevNet Always-on ACI sandbox.
Building High Scalability Apps With TerracottaDavid Reines
Senior Architect David Reines will present the simple yet powerful clustering capabilities of Terracotta. David will include a brief overview of the product, an in-depth discussion of Terracotta Distributed Shared Objects, and a live load test demonstrating the importance of a well designed clustered application.
David Reines is a Senior Consultant at Object Partners Inc. He has lead the development efforts of several mission-critical enterprise applications in the Twin Cities area. During this time, he has worked very closely with numerous commercial and open source JEE technologies. David has always favored a pragmatic approach to selecting enterprise application technologies and is currently focusing on building highly-concurrent distributed applications using Terracotta.
OSDC 2018 | Lifecycle of a resource. Codifying infrastructure with Terraform ...NETWAYS
Immutable infrastructure is a way to success, but what about the lifecycle of individual resources. This talk is about evolution of resources, code structure, Terraform coding tricks, composition and refactoring.
Terraform and Infrastructure as Code (IaC): an introduction of the reason why this kind of solution had been created and an explanation of the concepts and usage, with a link in the notes to a demo project available in GitHub.
https://www.youtube.com/watch?v=IeweKUdHJc4
My presentation from Hashiconf 2017, discussing our use of Terraform, and our techniques
to help make it safe and accessible.
A brief introduction to IaC with Terraform by Kenton Robbins (codeHarbour May...Alex Cachia
A brief introduction to IaC with Terraform by Kenton Robbins
Managing cloud infrastructure can be a complex and time consuming process. Using Terraform, we are able to create a blueprint capable of reproducing your infrastructure simply by running a script. Find out how 'infrastructure as code' can reduce operational costs and risk while increasing efficiency and stability.
Hosted by Alex Cachia, codeHarbour provides an opportunity for discussion and a platform for digital presenters to get their technological ideas out there to the people who need to hear it.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
3. Microsoft’s investments in
Terraform
Microsoft Team HashiCorp Team
Terraform AzureRM Provider updates
◦ Latest release (July 2, 2020)
enhancements/bug fixes
releases/updates published in June alone!
Terraform Module Registry
◦ https://registry.terraform.io/browse/modules?provider=azurerm
5. Terraform v0.13 highlights
Support for , , and
New syntax
Custom
command connects a CLI user to the Terraform
Cloud app
variable "image_id" {
type = string
description = "The id of the machine image (AMI) to use for the server."
validation {
condition = length(var.image_id) > 4 && substr(var.image_id, 0, 4) == "ami-"
error_message = "The image_id value must be a valid AMI id, starting with "ami-"."
}
}
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "2.0.0"
}
}
}
8. Terraform commands
Terraform fmt (-recursive)
Used to rewrite Terraform configuration files to a canonical format and style
Terraform graph
Used to generate a visual representation of either a configuration or execution plan
Terraform show
Used to provide human-readable output from a state or plan file
Terraform validate
Runs checks that verify whether a configuration is syntactically valid and internally consistent
Terraform taint
Manually marks a Terraform-managed resource as tainted, forcing it to be destroyed and recreated on
the next apply
9. Alternative/non-default provider
Optionally define multiple alternative ("aliased") configurations for a
single provider, to allow management of resources in different regions in
multi-region services
A resource always has an implicit dependency on its associated provider,
to ensure that the provider is fully configured before any resource
actions are taken
Arbitrary (ie. variable/parameter) expressions are not permitted for
provider because it must be resolved while Terraform is constructing the
dependency graph, before it is safe to evaluate expressions
10. Collections Types (Lists, Maps, and Sets)
list (or tuple) is a sequence of values, like ["us-west-1a", "us-west-1c"]
map (or object) is a group of values identified by named labels,
like {name = "Mabel", age = 52}
set(...) is a collection of unique values that do not have any secondary
identifiers or ordering
Note: When a list or tuple is converted to a set, duplicate values are
discarded, and the ordering of elements is lost
11. Loops and Conditionals
Loops allow you to create many of the same resource at the same time
The count meta-argument accepts a whole number and creates that many instances of the resource
The for_each meta-argument accepts a map or a set of strings and creates an instance for each item in
that map or set
The for expression iterates over each element, and then evaluates the expression, with X set to each
respective element
A conditional expression uses the value of a bool expression to select one of two values
Allows you to prevent a resource being created, updated or deleted given a certain condition
12. Lifecycle
The lifecycle block and its contents are meta-arguments, available for all resource blocks regardless of
type.
create_before_destroy (bool)
The new replacement object is created first, and then the prior object is destroyed only once the
replacement is created
prevent_destroy (bool)
Cause Terraform to reject (with an error) any plan that would destroy the infrastructure object
associated with the resource, as long as the argument remains present in the configuration
ignore_changes (list of attribute names)
Share management responsibilities of a single object with a separate process
Specifies resource attributes that Terraform should ignore when planning updates to the associated
remote object
14. Modules
A container for multiple resources that are used together
Can call other modules, which lets you include the child
module's resources
When sourced from local file paths do not support version,
since they're loaded from the same source repository
All modules require a source argument, which can either be
the path to a local directory, or a remote module source
After adding, removing, or modifying module blocks, you must
re-run terraform init to allow Terraform the opportunity to
adjust the installed modules
BONUS!
Terraform v0.13.0 beta
Modules will support…
count, for_each, and
depends_on
15. Data sources
Allows a Terraform configuration to make use of information
defined outside of Terraform, or defined by another separate
Terraform configuration
A data block requests that Terraform read from a given data
source (“azurerm_virtual_network") and export the result
under the given local name (“ProdVNET")
Within the block body (between { and }) are query constraints
defined by the data source
16. Remote state
Allows you to use the root-level outputs of one or more
Terraform configurations as input data for another
configuration
Only the root-level outputs from the remote state are
accessible. Outputs from modules within the state cannot
be accessed.
If you want a module output or a resource attribute to be
accessible via a remote state, you must thread the output
through to a root output.
17. Bonus! TFLint
A part of the GitHub Super Linter
One linter to rule them all
Used to validate against issues
Focused on possible errors, , etc.
Support for all providers
Rules that warn against
AWS = 700+ rules
Azure = 279 rules (Experimental support)
GCP = WIP
20. Workspaces (CLI)
Used to manage collections of infrastructure resources and organize them into meaningful
groups by keeping their configurations (ie. state data, variables) in separate directories
Technically equivalent to renaming your state file
Example:
Code used for a production environment's infrastructure could be split into a networking
configuration, the main application's configuration, and a monitoring configuration
After splitting the code, you would create "networking-prod", "app1-prod", "monitoring-
prod" workspaces, and assign separate teams to manage them
The important thing about workspace internals is that workspaces are meant to be a shared
resource. They aren't a private, local-only notion.
Note: Terraform Cloud and Terraform CLI both have
features called "workspaces," but they're slightly
different. CLI workspaces are alternate state files in
the same working directory; they're a convenience
feature for using one configuration to manage
multiple similar groups of resources.
21. Terraform Cloud
Manages easy access to shared state and secret data, access controls for approving changes to
infrastructure, a private registry for sharing Terraform modules, detailed policy controls for
governing the contents of Terraform configurations
Terraform Cloud acts as a remote backend for your Terraform state. State storage is tied to
workspaces, which helps keep state associated with the configuration that created it.
Performs Terraform runs to provision infrastructure, either on demand or in response to various
events
Executes these runs on disposable virtual machines in its own cloud infrastructure
Remote execution helps provide consistency and visibility for critical provisioning operations
app.terraform.io
23. Resources
Adin’s personal curated list of Terraform resources
Advanced Tips & Tricks to Optimize your Terraform Code
Terraform Advanced
Terraform on Microsoft Azure: Terraform projects organization and modules
How to create reusable infrastructure with Terraform modules
Terraform tips & tricks: loops, if-statements, and gotchas
Terraform in Action
Don’t forget about these Visual Studio
Code (VS Code) extensions:
Azure Terraform (by Microsoft)
Terraform (by Mikael Olenfalk)
Now owned by HashiCorp!
Demo example code: https://github.com/mspnp/hadrinf/tree/master/Templates/Terraform/Networking
24. More resources
Terraform Configurations in Terraform Cloud Workspaces
Terraform Modules hands-on lab
Azure Terraform QuickStart Templates
Misadventures with Terraform
Commodified IaC Using Terraform Cloud
Getting Started with Terraform on Azure: Functions, Expressions, and Loops
Introducing TerraGoat, a “vulnerable-by-design” Terraform training project
26. This is me
Adin Ermie
Cloud Solution Architect – Azure Apps & Infra @ Microsoft
◦ Azure Infrastructure-as-a-Service (IaaS), Platform-as-a-Service (PaaS)
◦ Cloud Management & Security
◦ Azure Monitor, Azure Security Center (ASC) / Azure Sentinel
◦ Cloud Governance
◦ Azure Policy, Blueprints, Management Groups, and Azure Cost Management (ACM)
◦ Business Continuity and Disaster Recovery (BCDR)
◦ Azure Site Recovery (ASR) / Azure Migrate, and Azure Backup
◦ Infrastructure-as-Code (IaC)
◦ Azure Resource Manager (ARM), and Terraform
5x MVP - Cloud and Datacenter Management (CDM)
1x HCA – HashiCorp Ambassador
Adin.Ermie@outlook.com
@AdinErmie
https://AdinErmie.com
linkedin.com/in/adinermie
Editor's Notes
Terraform Graph:
The output is in the DOT format, which can be used by GraphViz to generate charts.
Terraform Show:
This can be used to inspect a plan to ensure that the planned operations are expected, or to inspect the current state as Terraform sees it.
Terraform Validate:
Primarily useful for general verification of reusable modules, including correctness of attribute names and value types.
Terraform Taint:
This command will not modify infrastructure, but does modify the state file in order to mark a resource as tainted. Once a resource is marked as tainted, the next plan will show that the resource will be destroyed and recreated and the next apply will implement this change.
Note that tainting a resource for recreation may affect resources that depend on the newly tainted resource.
The provider meta-argument overrides Terraform's default behavior of selecting a provider configuration based on the resource type name.
By default, Terraform takes the initial word in the resource type name (separated by underscores) and selects the default configuration for that named provider.
For example, the resource type azurerm_resource_group is associated automatically with the default configuration for the provider named azurerm.
The provider meta-argument expects a <PROVIDER>.<ALIAS> reference, which does not need to be quoted.
Count:
If the resource has the count argument set, the value of this expression is a list of objects representing its instances.
Each instance has a distinct infrastructure object associated with it and each is separately created, updated, or destroyed when the configuration is applied.
When count is set, Terraform distinguishes between the resource block itself and the multiple resource instances associated with it. Instances are identified by an index number, starting with 0.
<TYPE>.<NAME>[<INDEX>] (for example, aws_instance.server[0], aws_instance.server[1], etc.) refers to individual instances.
For Each:
If your resource instances are almost identical, count is appropriate. If some of their arguments need distinct values that can't be directly derived from an integer, it's safer to use for_each.
The for_each meta-argument accepts a map or a set of strings and creates an instance for each item in that map or set.
For:
A for expression can also include an optional if clause to filter elements from the source collection, which can produce a value with fewer elements than the source
If the result type is an object (using { and } delimiters) then the value result expression can be followed by the ... symbol to group together results that have a common key
Create Before Destroy:
By default, when Terraform must make a change to a resource argument that cannot be updated in-place due to remote API limitations, Terraform will instead destroy the existing object and then create a new replacement object with the new configured arguments.
Some resource types offer special options to append a random suffix onto each object name to avoid collisions, for example. Terraform CLI cannot automatically activate such features, so you must understand the constraints for each resource type before using create_before_destroy with it.
Prevent Destroy:
This can be used as a measure of safety against the accidental replacement of objects that may be costly to reproduce, such as database instances
Note that this setting does not prevent the remote object from being destroyed if the resource block were removed from configuration entirely
Ignore Changes:
In some rare cases, settings of a remote object are modified by processes outside of Terraform, which Terraform would then attempt to "fix" on the next run.
Think about when using Azure Policy and ‘deployIfNotExists’ policy actions
Terraform Modules are a way that you can encapsulate shared code.
The module takes inputs, does something and then produces outputs. By refactoring parts of your infrastructure into Modules you can easily enforce standards and keep resources in sync.
Explain how you create a module (i.e a folder IS a module), and how you use a module (code-call).
How do you reference an existing resource that was either deployed by a different Terraform template/process/workflow; or, already exists within the target environment (ie. a VNET)?
Previous example was using Data Sources but this example is more real-world for the separation of, say, the Networking code vs Application code.
For example, the Networking team can have their own workspace, state, modules, etc. and produces outputs for VNET and Subnet IDs.
The Application team needs to leverage the VNET ID for deploying their App.
So they can point to the appropriate backend containing the VNET state, and directly reference it.
Remote state provides an easy reference to dynamic configuration parameters based on the output of other modules
It is a simple way to handle “cross-stack” references in Terraform
Highlight the NOTE first
Terraform Cloud offers a team-oriented remote Terraform workflow
The foundations of this workflow are remote Terraform execution, a workspace-based organizational model, version control integration, command-line integration, remote state management with cross-workspace data sharing, and a private Terraform module registry.
NEWS: HashiICorp just recently (as of June 10th) released the v2 of the VS Code extension
Important as this is the first official release from HashiCorp since taking over the extension
See my blog for an article showing it in action!