Terraform can be used to automate the deployment and management of infrastructure as code. It allows defining infrastructure components like VMs, networks, DNS records etc. as code in configuration files. Key benefits include versioning infrastructure changes, consistency across environments, and automation of deployments. The document then provides details on installing Terraform, using common commands like plan, apply and import, defining resources, variables, modules and managing remote state. It also demonstrates creating an EC2 instance using a generated AMI.
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
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
WinOps Conference London 2017 session
Public Cloud IaaS vs traditional on prem and how Hashicorp Terraform is a great tool to configure Azure. Recorded here: https://www.youtube.com/watch?v=LDZXRBBuXCU
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
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.
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
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.
This presentation covers deploy Azure DevOps projects, repositories, pipelines, variable groups, etc. using the newly released Azure DevOps Terraform provider.
A recording of this presentation is available on my YouTube channel here: https://www.youtube.com/c/adinermie
A blog article about this topic is also available here: https://adinermie.com/deploying-azure-devops-ado-using-terraform/
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
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
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
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
WinOps Conference London 2017 session
Public Cloud IaaS vs traditional on prem and how Hashicorp Terraform is a great tool to configure Azure. Recorded here: https://www.youtube.com/watch?v=LDZXRBBuXCU
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
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.
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
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.
This presentation covers deploy Azure DevOps projects, repositories, pipelines, variable groups, etc. using the newly released Azure DevOps Terraform provider.
A recording of this presentation is available on my YouTube channel here: https://www.youtube.com/c/adinermie
A blog article about this topic is also available here: https://adinermie.com/deploying-azure-devops-ado-using-terraform/
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
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
Presentation from Henry Gallo and Steve Paelet at DevOps NYC Meetup on Thursday, February 20, 2020
Understanding the Relationship: Ansible & Terraform
https://www.meetup.com/DevOps-NYC/events/267780085/
Maintaining your whole infrastructure using Terraform and reusable modules makes most of our lives easier, but when those less familiar with DevOps want to create or update resources, you usually either have to train and enable them to use Terraform, or handle the request yourself.
However what if you could offload the execution of those changes to a centralised tool and just review both the code and output being submitted for review? Atlantis, Terraform Cloud or env0 can act as a PR-based feedback loop for a hosted Terraform executor to make self-service a little bit easier.
However what if you could offload the execution of those changes to a centralised tool and just review both the code and output being submitted for review? Atlantis, Terraform Cloud or env0 can act as a PR-based feedback loop for a hosted Terraform executor to make self-service a little bit easier.
The hitchhiker's guide to terraform your infrastructureFernanda Martins
Terraform is a tool for building infrastructure in the cloud. When you start using Terraform it can be confusing, you might fall into issues and see yourself trapped into a problem which can result in an infrastructure not fully automated or error prone. This talk will show you best practices and tricks I have learned while building a Kubernetes infrastructure in AWS using Terraform.
Terraform is an Infrastructure Automation tools. This can work equally good for on-premises, public cloud, private cloud, hybrid-cloud and multi-cloud infrastructure.
Visit us for more at www.zekeLabs.com
Installation of Grafana on linux ; connectivity with Prometheus database , installation of Prometheus ; Installation of node_exporter ,Tomcat-exporter ; installation and configuration of alert manager .. Detailed step by step installation and working
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.
Infrastructure as code with terraform and packerAlex Landa
Running dozens and even hundreds of cloud servers is a common day to day scenario for many companies. To keep up with the configuration settings and to be able to track the changes, infrastructure must be treated as code. In this talk we will introduce Terraform and how it enables us to define infrastructure in code and how can we use Packer to define images that we are planning to deploy.
Terraforming your Infrastructure on GCPSamuel Chow
A talk I gave at the Google Cloud Platform LA Meetup event at Google Playa Vista on Nov 6, 2019. This is a 1+ hour-long, tutorial-oriented talk on Infrastructure as Code (IaC), Terraform (as a toolset for IaC and modern devops), and leverage the practice and tools in defining, deploying, and managing your infrastructure in GCP.
Similar to Configuration management II - Terraform (20)
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar
The European Union Agency for Law Enforcement Cooperation (Europol) has suffered an alleged data breach after a notorious threat actor claimed to have exfiltrated data from its systems. Infamous data leaker IntelBroker posted on the even more infamous BreachForums hacking forum, saying that Europol suffered a data breach this month.
The alleged breach affected Europol agencies CCSE, EC3, Europol Platform for Experts, Law Enforcement Forum, and SIRIUS. Infiltration of these entities can disrupt ongoing investigations and compromise sensitive intelligence shared among international law enforcement agencies.
However, this is neither the first nor the last activity of IntekBroker. We have compiled for you what happened in the last few days. To track such hacker activities on dark web sources like hacker forums, private Telegram channels, and other hidden platforms where cyber threats often originate, you can check SOCRadar’s Dark Web News.
Stay Informed on Threat Actors’ Activity on the Dark Web with SOCRadar!
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
In this slide, we show the simulation example and the way to compile this solver.
In this solver, the Helmholtz equation can be solved by helmholtzFoam. Also, the Helmholtz equation with uniformly dispersed bubbles can be simulated by helmholtzBubbleFoam.
In software engineering, the right architecture is essential for robust, scalable platforms. Wix has undergone a pivotal shift from event sourcing to a CRUD-based model for its microservices. This talk will chart the course of this pivotal journey.
Event sourcing, which records state changes as immutable events, provided robust auditing and "time travel" debugging for Wix Stores' microservices. Despite its benefits, the complexity it introduced in state management slowed development. Wix responded by adopting a simpler, unified CRUD model. This talk will explore the challenges of event sourcing and the advantages of Wix's new "CRUD on steroids" approach, which streamlines API integration and domain event management while preserving data integrity and system resilience.
Participants will gain valuable insights into Wix's strategies for ensuring atomicity in database updates and event production, as well as caching, materialization, and performance optimization techniques within a distributed system.
Join us to discover how Wix has mastered the art of balancing simplicity and extensibility, and learn how the re-adoption of the modest CRUD has turbocharged their development velocity, resilience, and scalability in a high-growth environment.
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
Even though at surface level ‘java.lang.OutOfMemoryError’ appears as one single error; underlyingly there are 9 types of OutOfMemoryError. Each type of OutOfMemoryError has different causes, diagnosis approaches and solutions. This session equips you with the knowledge, tools, and techniques needed to troubleshoot and conquer OutOfMemoryError in all its forms, ensuring smoother, more efficient Java applications.
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
Understanding Globus Data Transfers with NetSageGlobus
NetSage is an open privacy-aware network measurement, analysis, and visualization service designed to help end-users visualize and reason about large data transfers. NetSage traditionally has used a combination of passive measurements, including SNMP and flow data, as well as active measurements, mainly perfSONAR, to provide longitudinal network performance data visualization. It has been deployed by dozens of networks world wide, and is supported domestically by the Engagement and Performance Operations Center (EPOC), NSF #2328479. We have recently expanded the NetSage data sources to include logs for Globus data transfers, following the same privacy-preserving approach as for Flow data. Using the logs for the Texas Advanced Computing Center (TACC) as an example, this talk will walk through several different example use cases that NetSage can answer, including: Who is using Globus to share data with my institution, and what kind of performance are they able to achieve? How many transfers has Globus supported for us? Which sites are we sharing the most data with, and how is that changing over time? How is my site using Globus to move data internally, and what kind of performance do we see for those transfers? What percentage of data transfers at my institution used Globus, and how did the overall data transfer performance compare to the Globus users?
top nidhi software solution freedownloadvrstrong314
This presentation emphasizes the importance of data security and legal compliance for Nidhi companies in India. It highlights how online Nidhi software solutions, like Vector Nidhi Software, offer advanced features tailored to these needs. Key aspects include encryption, access controls, and audit trails to ensure data security. The software complies with regulatory guidelines from the MCA and RBI and adheres to Nidhi Rules, 2014. With customizable, user-friendly interfaces and real-time features, these Nidhi software solutions enhance efficiency, support growth, and provide exceptional member services. The presentation concludes with contact information for further inquiries.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
Experience our free, in-depth three-part Tendenci Platform Corporate Membership Management workshop series! In Session 1 on May 14th, 2024, we began with an Introduction and Setup, mastering the configuration of your Corporate Membership Module settings to establish membership types, applications, and more. Then, on May 16th, 2024, in Session 2, we focused on binding individual members to a Corporate Membership and Corporate Reps, teaching you how to add individual members and assign Corporate Representatives to manage dues, renewals, and associated members. Finally, on May 28th, 2024, in Session 3, we covered questions and concerns, addressing any queries or issues you may have.
For more Tendenci AMS events, check out www.tendenci.com/events
Designing for Privacy in Amazon Web ServicesKrzysztofKkol1
Data privacy is one of the most critical issues that businesses face. This presentation shares insights on the principles and best practices for ensuring the resilience and security of your workload.
Drawing on a real-life project from the HR industry, the various challenges will be demonstrated: data protection, self-healing, business continuity, security, and transparency of data processing. This systematized approach allowed to create a secure AWS cloud infrastructure that not only met strict compliance rules but also exceeded the client's expectations.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Why React Native as a Strategic Advantage for Startup Innovation.pdfayushiqss
Do you know that React Native is being increasingly adopted by startups as well as big companies in the mobile app development industry? Big names like Facebook, Instagram, and Pinterest have already integrated this robust open-source framework.
In fact, according to a report by Statista, the number of React Native developers has been steadily increasing over the years, reaching an estimated 1.9 million by the end of 2024. This means that the demand for this framework in the job market has been growing making it a valuable skill.
But what makes React Native so popular for mobile application development? It offers excellent cross-platform capabilities among other benefits. This way, with React Native, developers can write code once and run it on both iOS and Android devices thus saving time and resources leading to shorter development cycles hence faster time-to-market for your app.
Let’s take the example of a startup, which wanted to release their app on both iOS and Android at once. Through the use of React Native they managed to create an app and bring it into the market within a very short period. This helped them gain an advantage over their competitors because they had access to a large user base who were able to generate revenue quickly for them.
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
Unlocking Business Potential: Tailored Technology Solutions by Prosigns
Discover how Prosigns, a leading technology solutions provider, partners with businesses to drive innovation and success. Our presentation showcases our comprehensive range of services, including custom software development, web and mobile app development, AI & ML solutions, blockchain integration, DevOps services, and Microsoft Dynamics 365 support.
Custom Software Development: Prosigns specializes in creating bespoke software solutions that cater to your unique business needs. Our team of experts works closely with you to understand your requirements and deliver tailor-made software that enhances efficiency and drives growth.
Web and Mobile App Development: From responsive websites to intuitive mobile applications, Prosigns develops cutting-edge solutions that engage users and deliver seamless experiences across devices.
AI & ML Solutions: Harnessing the power of Artificial Intelligence and Machine Learning, Prosigns provides smart solutions that automate processes, provide valuable insights, and drive informed decision-making.
Blockchain Integration: Prosigns offers comprehensive blockchain solutions, including development, integration, and consulting services, enabling businesses to leverage blockchain technology for enhanced security, transparency, and efficiency.
DevOps Services: Prosigns' DevOps services streamline development and operations processes, ensuring faster and more reliable software delivery through automation and continuous integration.
Microsoft Dynamics 365 Support: Prosigns provides comprehensive support and maintenance services for Microsoft Dynamics 365, ensuring your system is always up-to-date, secure, and running smoothly.
Learn how our collaborative approach and dedication to excellence help businesses achieve their goals and stay ahead in today's digital landscape. From concept to deployment, Prosigns is your trusted partner for transforming ideas into reality and unlocking the full potential of your business.
Join us on a journey of innovation and growth. Let's partner for success with Prosigns.
Accelerate Enterprise Software Engineering with PlatformlessWSO2
Key takeaways:
Challenges of building platforms and the benefits of platformless.
Key principles of platformless, including API-first, cloud-native middleware, platform engineering, and developer experience.
How Choreo enables the platformless experience.
How key concepts like application architecture, domain-driven design, zero trust, and cell-based architecture are inherently a part of Choreo.
Demo of an end-to-end app built and deployed on Choreo.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
2. What do we have and what do we need?
● We have an automated system to build a provisioned image of a machine
using Ansible + Packer.
● We need to
○ automate the deployment of the image we built in an easier way than shell scripts.
○ keep our entire infrastructure as code in order to version changes in it.
2@XSerrat
4. Terraform > Why do we need it?
● Build, change and version our infrastructure using configuration files.
● We can use it as a documentation of our infrastructure.
● Be aware of what we have configured.
● Be able to manage our entire infrastructure (instances, repositories, DNS,
and other SaaS) using the same syntax: Terraform configuration files.
● We can re-use our configuration to build new applications.
4@XSerrat
5. Terraform > More benefits
● Avoiding any surprises when Terraform manipulates our infrastructure:
execution plan step shows what terraform will do before being executed.
● Graph of all infrastructure components.
● Building non-dependent components in parallel to increase efficiency.
● Avoiding possible human errors when we are doing complex changes.
● Manages ANYTHING that has an API.
5@XSerrat
6. Terraform > Installation
● We can find the package to install Terraform here:
https://www.terraform.io/downloads.html
● In MacOS you can use the following command:
$ brew install terraform
6@XSerrat
8. Terraform > CLI > Usage > init
● It initializes all we need to apply changes to our infrastructure.
● It downloads new providers we have just add to the project.
https://www.terraform.io/docs/commands/init.html
8@XSerrat
9. Terraform > CLI > Usage > plan
● It loads all files and shows the changes that Terraform has detected when it
has compared our infrastructure with Terraform configuration files.
https://www.terraform.io/docs/commands/plan.html
9@XSerrat
10. Terraform > CLI > Usage > apply
● It shows what Terraform will change of our infrastructure as plan command.
● It also asks if we want to apply the changes typing yes .
https://www.terraform.io/docs/commands/apply.html
10@XSerrat
11. Terraform > CLI > Usage > graph
● It allows the generation of a graph of the resources we have configured with
Terraform and how they are connected.
https://www.terraform.io/docs/commands/graph.html
11@XSerrat
12. Terraform > CLI > Usage > import
● It allows us to retrieve the whole resources of our infrastructure and set them
to the Terraform state.
● In the future, this command allows us to generate also the Terraform
configuration of an existing infrastructure!
https://www.terraform.io/docs/commands/import.html
12@XSerrat
13. Terraform > Configuration files
● Terraform uses sets of text files called configuration files using the syntax
HCL (HashiCorp configuration language).
● Two formats:
○ Terraform format (ending: *.tf): Recommended format because it supports comments and it
is more human-readable than JSON.
○ JSON format (ending: *.tf.json): It is the format used for machines to create / modify.
13@XSerrat
14. Terraform > Configuration files
● When we execute Terraform, it loads all .*tf files of the same directory and
then, it shows what changes will do.
● Files are loaded in alphabetical order except “overrides” files that are loaded
at the end overriding the previous files components. An override file can be
“override.tf” or a file ended by “_override.tf”.
● Except “override” files, if there are two resources with the same name in the
other files, a validation error will occur when executing Terraform.
14@XSerrat
15. Terraform > Configuration files > Components
● In Terraform configuration files there are some components:
○ Provider: Responsible to creating and managing resources.
○ Resource: Defines a resource that exists in the current infrastructure such as an EC2
instance.
○ Data source: It allows a way to fetch data outside Terraform configuration.
● The order of the definition of each component including variables does not
matter.
15@XSerrat
16. Terraform > Components > Providers
● Manage the lifecycle of a resource: create, read, update and delete.
● By default, the name of all resources of a specific provider starts by the name
of the provider. e.g: the resource aws_instance belongs to aws provider.
example.tf
Usage: https://www.terraform.io/docs/configuration/providers.html
Providers: https://www.terraform.io/docs/providers/index.html 16@XSerrat
17. Terraform > Components > Providers
● When a new provider is used in our configuration files, we need to download
and initialize it using a specific command:
$ terraform init
*Note that this command needs to be executed in the directory where our configuration files are
placed.
17@XSerrat
18. Terraform > Components > Resources
● A resource is a component of our infrastructure. It can be a virtual machine, a
container, dns records, an email provider...
example.tf
Usage : https://www.terraform.io/docs/configuration/resources.html
AWS resources: https://www.terraform.io/docs/providers/aws/index.html
18@XSerrat
19. Terraform > Components > Resources > Dependencies
● Resources normally depends on other resources. But, when a resource does
not depend on another it is created in parallel.
aws_eip depends on the aws_instance
aws_instance without any
dependency
19@XSerrat
20. Terraform > Components > Resources > Provider
● It is possible we have multiple providers. For example, multiple aws providers
due to different regions.
● Resources have a provider meta-parameter to associate the resource to
the expected provider:
west provider east provider 20@XSerrat
21. Terraform > Components > Data Sources
● Data sources allow Terraform configurations a way to retrieve information
from our infrastructure that is not present in configuration files.
● They can also be used to compute new values on the fly.
Data source of the most recent aws_ami who has a tag
“Component” with the value “web”
https://www.terraform.io/docs/configuration/data-sources.html
21@XSerrat
22. Terraform > Provisioners
● We use provisioners to execute scripts on local or remote machine as a part
of resource creation or destruction.
Provisioner who executes a script locally
22@XSerrat
23. Terraform > Provisioners
● By default provisioners are executed on creation time.
● We can add the meta-parameter when = “destroy” to execute the
provisioner on destruction time.
Provisioner executed on creation time Provisioner executed on destruction time
https://www.terraform.io/docs/provisioners/index.html
23@XSerrat
24. Terraform > Provisioners > Taint status
● When a provisioner is executed on creation or destruction and the execution
fails, the resource is marked as taint.
● When a resource is marked as taint, the next time we execute terraform
apply, the creation or destruction will be executed again.
● It is important to execute scripts that can be executed multiple times without
problems.
24@XSerrat
25. Terraform > Variables
● We can define variables to parametrize our configurations.
● Two types:
○ Input variables
○ Output variables
https://www.terraform.io/docs/configuration/variables.html
25@XSerrat
26. Terraform > Variables > Input variables > Assignment
● We can move variables into another file with *.tf extension:
● Terraform will load all files ending in .tf of the same directory.
variables.tf
required
optional
26@XSerrat
27. Terraform > Variables > Input variables > Assignment
● We can assign variables also from:
○ Command-line flags: We can pass them with any kind of Terraform command
$ terraform apply -var 'access_key=foo' -var 'secret_key=bar'
○ File: We can define a terraform.tfvars or *.auto.tfvars and Terraform populate
variables with this values. Also we can pass the file as a CLI parameter.
$ terraform apply -var-file=“secret.tfvars” -var-file “production.tfvars”
secret.tfvars
27@XSerrat
28. Terraform > Variables > Input variables > Assignment
○ Environment variables: We can define TR_VAR_access_key and then Terraform populate
the value of the ENV variable to the access_key variable. Only for string types!
○ UI input: When we execute apply Terraform asks for variables without a default value.
variables.tf
These variables
will be prompted
28@XSerrat
29. Terraform > Variables > Input Variables > Usage
● We use the variables in our providers, resources and data sources using
interpolations.
file.tf using variables
29@XSerrat
31. Terraform > Variables > Output variables
● Due to the huge quantity of variables that Terraform manages, as a user we
want to know only some of them. We can specify it using output variables.
● Each output variable will be printed when apply command is executed.
outputs.tf
31@XSerrat
32. Terraform > Variables > Local variables
● They are equivalent to local variables in any programming language.
32
https://www.terraform.io/docs/configuration/locals.html
@XSerrat
33. Terraform > Modules
● Modules are self-contained packages of Terraform configuration that are
managed as a group. They allow us:
○ Reuse components
○ Improve the organization
○ Try to treat pieces of infrastructure as a black box
● A module contains:
○ Other modules
○ Input variables
○ Output variables
○ Resources
https://www.terraform.io/docs/modules/index.html 33@XSerrat
34. Terraform > Modules > Registry
● Terraform Registry is a repository of modules written by the Terraform
community.
34
https://registry.terraform.io/ @XSerrat
36. Terraform > Modules > Inputs
● A module has a specific name like resources and the mandatory input
variable “source” that contains the path where this module can be retrieved.
● The source value can contain a module from Terraform registry, a
repository or a directory path to a custom module.
36@XSerrat
37. Terraform > Modules > Outputs
● A module can have some output variables about what the module has just
created.
● To use a variable we need to use this nomenclature:
module.<module_name>.<output_variable_name>
● In this example we are printing the output variable “asg_name_servers”:
example.tf Output shown in the shell
37@XSerrat
38. Terraform > Modules > Execution
● After adding a module we need to execute terraform init.
● Then we can execute terraform apply:
● A module can contain nested modules inside in order to decompose
complex systems into manageable components.
38@XSerrat
39. Terraform > Modules > Execution
● Then, if we execute the terraform destroy, Terraform will also destroy all
resources created by the module:
39@XSerrat
40. Terraform > Modules > Structure
● We can create a module and use it in our Terraform configuration. A module
has this shape:
● Basic files: main.tf, variables.tf and outputs.tf .
40
Module example:
https://github.com/hashicorp/terraform-aws-consul
@XSerrat
41. Terraform > State
● Stores all managed resources of the infrastructure.
● Maps real resources to our Terraform configuration.
● Improve performance for large infrastructures:
○ In a small infrastructure, Terraform plan and apply refresh the state from the real
infrastructure.
○ In a large infrastructure, the use of the state file it is important to Terraform to work well.
● It is a file created in the working directory called terraform.tfstate.
● We can inspect and modify the state using a the CLI terraform state
with options to restore a previous state (Terraform stores a backup)
41
More information: https://www.terraform.io/docs/state/index.html
State CLI usage: https://www.terraform.io/docs/commands/state/index.html
@XSerrat
42. Terraform > State > Remote state: Backend
● Determines how the state is loaded and how an operation such as apply is
executed.
● By default, Terraform uses such a “local” backend.
● Using a remote state we obtain the following benefits:
○ Working in a team: share the state with teammates
○ Keeping sensitive information (the state) off disk
○ Remote operations
● Backends are responsible for locking the state when someone else is making
changes in the state file. Not all backends support locking.
42
Backends available: https://www.terraform.io/docs/backends/types/index.html
More info about remote state: https://www.terraform.io/docs/backends/types/remote.html @XSerrat
43. Terraform > Workspaces
● Each Terraform configuration has an associated backend to define how
operations are executed and where the Terraform state is stored.
● By default, there is a workspace called “default”
● They are useful when we want to test some changes before modifying the
main production infrastructure.
43
https://www.terraform.io/docs/state/workspaces.html
@XSerrat
44. Terraform > Extras > PhpStorm Plugin
● We have a PhpStorm plugin to support the HCL language:
● Highlights, navigation and autocompletion!
Github repository: https://github.com/VladRassokhin/intellij-hcl
44@XSerrat
45. Terraform > Extra info
● Best practices and some extra tools:
https://es.slideshare.net/AntonBabenko/terraform-modules-and-bestpractices-
september-2018
● All interesting presentations by Anton Babenko, active contributor to
Terraform: https://es.slideshare.net/AntonBabenko/presentations
45@XSerrat