Complete tf content (#6154)

* finalise tf roadmap content

* add HCP use-case content
pull/6155/head
dsh 4 months ago committed by GitHub
parent bab8739405
commit c3ca762799
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      src/data/roadmaps/terraform/content/authentication@RPcsyhIG027uP7KF0hwaY.md
  2. 10
      src/data/roadmaps/terraform/content/checkov@ljj7ngl1N4ezCXQ0o6Y8x.md
  3. 10
      src/data/roadmaps/terraform/content/compliance--sentinel@z0PcbgpHbR6Fm07-On4P8.md
  4. 10
      src/data/roadmaps/terraform/content/contract-testing@bjozhkpOI9UjjNfmT5HhY.md
  5. 10
      src/data/roadmaps/terraform/content/deployment-workflow@wL3WWhjPEgFmumOmCPRDf.md
  6. 10
      src/data/roadmaps/terraform/content/end-to-end-testing@QqwlAtz7VfrMtNEGpT5Sa.md
  7. 28
      src/data/roadmaps/terraform/content/enterprise-features@elW7IMBSF0ydmlb7rtI1o.md
  8. 4
      src/data/roadmaps/terraform/content/hcp@erxow5xNRj01WepdFOhVf.md
  9. 10
      src/data/roadmaps/terraform/content/infracost@oANePqjkwtNMwvV-_W0B7.md
  10. 10
      src/data/roadmaps/terraform/content/integration-testing@ENkLj3z6hR2cKT7rBhYp5.md
  11. 10
      src/data/roadmaps/terraform/content/kics@MUkbLTMzmaVWbAJj6G3aj.md
  12. 9
      src/data/roadmaps/terraform/content/parallelism@RtwZy60ruRpskmgr1qYYf.md
  13. 10
      src/data/roadmaps/terraform/content/run-tasks@nU1WoRtxRF9KeNhzuwNUB.md
  14. 6
      src/data/roadmaps/terraform/content/scaling-terraform@ECcHo0KTDN27MuVTC-Fwy.md
  15. 10
      src/data/roadmaps/terraform/content/secret-management@uVz9WwVAgMu1ZU0qjqVnc.md
  16. 4
      src/data/roadmaps/terraform/content/security@3MnZK2V5KhBhw67SyUVPk.md
  17. 6
      src/data/roadmaps/terraform/content/splitting-large-state@zCU02_5Pide5BZiuMuqEU.md
  18. 10
      src/data/roadmaps/terraform/content/terragrunt@AEtW6j2GcfZz7IXk4sM6c.md
  19. 10
      src/data/roadmaps/terraform/content/terrascan@NSWG79dEygyl6pb54wLrE.md
  20. 10
      src/data/roadmaps/terraform/content/testing-modules@H3_So6qX-s2131WHGR_GO.md
  21. 4
      src/data/roadmaps/terraform/content/testing@QSftI21seX6I_xPonlfmU.md
  22. 10
      src/data/roadmaps/terraform/content/trivy@Vxo_gNdFl3CZXV7GLPqjD.md
  23. 9
      src/data/roadmaps/terraform/content/unit-testing@V7_NnDIY1MefV_xjCCsnI.md
  24. 10
      src/data/roadmaps/terraform/content/vcs-integration@Z6dG92afC8SGwCFNTx4ac.md
  25. 8
      src/data/roadmaps/terraform/content/what-and-when-to-use-hcp@K_7dB-5cCYzGbwYXXaoiY.md
  26. 10
      src/data/roadmaps/terraform/content/workspaces@JoUWF6AQoreELxFHNi9oo.md
  27. 77
      src/data/roadmaps/terraform/terraform.json

@ -1 +1,9 @@
# Authentication
# Authentication
HCP (HashiCorp Cloud Platform) authentication provides secure access management for its services, including Terraform Cloud. It utilizes a comprehensive identity and access management system that supports multiple authentication methods. These include username/password combinations, single sign-on (SSO) integration with popular identity providers, and API tokens for programmatic access. HCP supports SAML 2.0 for enterprise-grade SSO, allowing seamless integration with existing identity management systems. For machine-to-machine communication, HCP offers service principal authentication, enabling secure, automated interactions with HCP services. The platform also provides fine-grained role-based access control (RBAC), allowing administrators to define and manage user permissions across different resources and operations.
Learn more from the following resources:
- [@official@hcp auth login](https://developer.hashicorp.com/hcp/docs/cli/commands/auth/login)
- [@article@Authenticate with HCP](https://registry.terraform.io/providers/hashicorp/hcp/latest/docs/guides/auth)
- [@opensource@hashicorp/hcp-auth-login](https://github.com/hashicorp/hcp-auth-action)

@ -1 +1,9 @@
# Checkov
# Checkov
Checkov is an open-source static code analysis tool designed for scanning Infrastructure as Code (IaC) files, including Terraform configurations, for security and compliance issues. It provides a comprehensive set of out-of-the-box policies covering various cloud providers and security best practices. Checkov can identify misconfigurations, security risks, and compliance violations in Terraform code before deployment, helping to shift security left in the development process. The tool supports custom policies written in Python, allowing organizations to enforce specific requirements. Checkov integrates easily into CI/CD pipelines and offers multiple output formats for better reporting and integration with other tools. Its ability to scan for a wide range of issues, from insecure defaults to compliance with standards like CIS Benchmarks, makes it a powerful asset for maintaining secure and compliant infrastructure deployments.
Learn more from the following resources:
- [@official@Checkov Website](https://www.checkov.io/)
- [@opensource@bridgecrewio/checkov](https://github.com/bridgecrewio/checkov)
- [@article@Scanning Terraform Code with Checkov](https://devopscube.com/terraform-checkov-scan/)

@ -1 +1,9 @@
# Compliance / Sentinel
# Compliance / Sentinel
Hashicorp Sentinel is a policy-as-code framework integrated with HashiCorp's enterprise products, including Terraform Cloud and Terraform Enterprise. It allows organizations to define and enforce standardized, fine-grained policies across their infrastructure deployments. Sentinel policies can be written to check for security compliance, cost management, or operational best practices before Terraform applies any changes. These policies use a domain-specific language to define rules that evaluate Terraform plans and state, enabling teams to catch potential issues early in the development process. Sentinel can enforce mandatory policies that prevent non-compliant infrastructure changes from being applied, or advisory policies that warn but don't block deployments.
Learn more from the following resources:
- [@official@Terraform and Sentinel](https://developer.hashicorp.com/sentinel/docs/terraform)
- [@article@Enforce policy-as-code](https://www.terraform.io/use-cases/enforce-policy-as-code)
- [@opensource@hashicorp/terraform-sentinel-policies](https://github.com/hashicorp/terraform-sentinel-policies)

@ -1 +1,9 @@
# Contract Testing
# Contract Testing
Terraform contract testing focuses on verifying the interfaces and interactions between different modules or components of your infrastructure code. This approach ensures that modules work correctly together and adhere to expected input/output contracts. Contract tests typically validate that a module accepts the correct input variables, produces the expected outputs, and creates resources with the right attributes. They often involve setting up test fixtures with mock data or minimal real infrastructure. The goal is to catch integration issues early, such as mismatched variable types or unexpected resource configurations. Contract testing helps maintain consistency across module versions and ensures that changes to one module don't break dependent modules. This type of testing is particularly valuable in large, modular Terraform projects where multiple teams may be working on different components of the infrastructure.
Learn more from the following resources:
- [@article@Terraform Contract Tests](https://www.hashicorp.com/blog/testing-hashicorp-terraform#contract-tests)
- [@article@Contract Testing: An Introduction and Guide](https://www.blazemeter.com/blog/contract-testing#:~:text=Contract%20testing%20focuses%20on%20verifying,services%20that%20rely%20on%20it.)
- [@video@Contract testing for microservices is a must!](https://www.youtube.com/watch?v=Fh8CqZtghQw)

@ -1 +1,9 @@
# Deployment Workflow
# Deployment Workflow
A Terraform deployment workflow for scaling typically involves several key stages optimized for managing large infrastructures. It starts with code development in feature branches, followed by automated testing including syntax checks, linting, and unit tests. Pull requests trigger plan generations for review. After approval, changes merge to a main branch, initiating a CI/CD pipeline. This pipeline runs more comprehensive tests, including integration and possibly end-to-end tests. For large infrastructures, the workflow often includes staged deployments, starting with lower environments and progressively moving to production. It may involve partial applies or use of workspaces to manage different environments. The process incorporates manual approval gates for critical changes. State management becomes crucial, often utilizing remote backends with locking. Monitoring and logging are integrated to track deployment progress and catch issues early.
Learn more from the following resources:
- [@official@The Core Terraform Workflow](https://developer.hashicorp.com/terraform/intro/core-workflow)
- [@video@Terraform Basics: Core Workflow](https://www.youtube.com/watch?v=sqLD39xqcx0)
- [@video@Advanced Concepts and Faster Workflows in the Terraform Language](https://www.youtube.com/watch?v=J8J7ixBNF-M)

@ -1 +1,9 @@
# End to End Testing
# End to End Testing
Terraform end-to-end testing involves validating the entire infrastructure deployment process from start to finish, simulating real-world usage scenarios. These tests apply complete Terraform configurations to create full environments, verify the functionality and interactions of all components, and then destroy the infrastructure. End-to-end tests often include checking network connectivity, application deployments, and overall system performance. They may involve multiple Terraform modules and external systems, testing the infrastructure as a cohesive unit. While resource-intensive and time-consuming, these tests provide the highest level of confidence in the infrastructure's correctness and reliability. They're particularly valuable for detecting issues that arise from complex interactions between different parts of the infrastructure. End-to-end tests are typically run less frequently than other types of tests, often as part of release processes or major change validations.
Learn more from the following resources:
- [@artice@Getting Started: End to End Tests](https://tf2project.io/docs/getting-started/end-to-end-tests.html)
- [@article@End-to-end tests](https://www.hashicorp.com/blog/testing-hashicorp-terraform#end-to-end-tests)
- [@video@End To End Testing On Terraform With Terratest](https://www.youtube.com/watch?v=PlzL6Bv2fSA)

@ -1 +1,27 @@
# Enterprise Features
# Enterprise Features
HashiCorp Cloud Platform (HCP) offers several enterprise-grade features designed to enhance large-scale infrastructure management:
1. Centralized workflow management for Terraform operations
2. Advanced role-based access control (RBAC) for fine-grained permissions
3. Policy as Code with Sentinel for governance and compliance
4. Private network connectivity for secure access to cloud resources
5. Audit logging for comprehensive tracking of all platform activities
6. Integrated secrets management with Vault
7. Service networking capabilities through Consul
8. Multi-cloud and hybrid cloud support
9. Scalable remote state management
10. Cost estimation and optimization tools
11. Customizable policy libraries for security and compliance
12. Single sign-on (SSO) and identity federation
13. API-driven automation for infrastructure provisioning
14. Collaborative features for team-based infrastructure development
15. Continuous compliance monitoring and reporting
These features collectively provide a robust, secure, and scalable environment for enterprise-level infrastructure management and DevOps practices.
Learn more from the following resources:
- [@official@HCP Website](https://www.hashicorp.com/cloud)
- [@article@HCP Terraform Plans and Features](https://developer.hashicorp.com/terraform/cloud-docs/overview)
- [@video@How does The Infrastructure Cloud work?](https://www.youtube.com/watch?v=zWWGsJrWj5E)

@ -1 +1,3 @@
# HCP
# HCP
HCP (HashiCorp Cloud Platform) is a fully managed platform that provides HashiCorp products as a service, including Terraform. It offers a centralized way to provision, secure, connect, and run any infrastructure for any application. HCP integrates seamlessly with Terraform, providing enhanced capabilities for managing infrastructure at scale. Key features include automated workflows, centralized state management, and secure remote operations. It offers built-in collaboration tools, making it easier for teams to work together on infrastructure projects. HCP provides governance and policy enforcement capabilities, allowing organizations to maintain compliance and security standards across their infrastructure. With its integration of other HashiCorp tools like Vault for secrets management and Consul for service networking, HCP creates a comprehensive ecosystem for cloud infrastructure management. This platform is particularly beneficial for organizations looking to streamline their infrastructure operations, enhance security, and maintain consistency across multi-cloud environments.

@ -1 +1,9 @@
# Infracost
# Infracost
Infracost is an open-source tool that provides real-time cost estimates for Terraform projects. It analyzes Terraform configuration files and generates detailed cost breakdowns for cloud resources across various providers like AWS, Azure, and Google Cloud. Infracost integrates into CI/CD pipelines to show cost implications of infrastructure changes during the development process. It supports diff outputs, showing how proposed changes will affect costs. This tool is particularly valuable for teams looking to optimize cloud spending and maintain cost awareness throughout the infrastructure development lifecycle. Infracost can be used standalone or integrated with other tools, helping teams make informed decisions about resource provisioning and configuration changes.
Learn more from the following resources:
- [@official@Infracost Website](https://www.infracost.io/)
- [@opensource@infracost/infracost](https://github.com/infracost/infracost)
- [@video@Shifting FinOps Left: A live demo](https://www.youtube.com/watch?v=BQeO137DDo8)

@ -1 +1,9 @@
# Integration Testing
# Integration Testing
Terraform integration testing involves verifying that Terraform configurations work correctly with actual cloud resources and services. These tests create real infrastructure components, interact with them, and then destroy them, ensuring that resources are properly provisioned and configured in a live environment. Integration tests typically use frameworks like Terratest or custom scripts to automate the process of applying Terraform configurations, validating the resulting infrastructure, and cleaning up afterwards. They check for correct resource creation, proper configuration of interdependent resources, and overall system behavior. While more time-consuming and potentially costly than unit tests, integration tests provide high confidence in the reliability of Terraform code in real-world scenarios. They're crucial for catching issues that may only appear when interacting with actual cloud services, such as API limitations or unexpected service behaviors.
Learn more from the following resources:
- [@official@Integration or unit testing](https://developer.hashicorp.com/terraform/language/tests#integration-or-unit-testing)
- [@video@Learn Terraform - Integration and End-to-End Testing](https://www.youtube.com/watch?v=gdcc1WBzMwY)
- [@article@Integration tests](https://www.hashicorp.com/blog/testing-hashicorp-terraform#integration-tests)

@ -1 +1,9 @@
# KICS
# KICS
KICS (Keeping Infrastructure as Code Secure) is an open-source static analysis tool designed to scan Infrastructure as Code (IaC) files, including Terraform configurations, for security vulnerabilities, compliance issues, and infrastructure misconfigurations. It supports multiple IaC technologies and cloud providers, offering a comprehensive approach to securing cloud-native environments. KICS uses a robust set of predefined rules to detect potential security risks, ranging from insecure defaults to violations of industry standards and best practices. The tool allows for custom query development, enabling organizations to tailor scans to their specific security and compliance needs. KICS can be easily integrated into CI/CD pipelines, providing early detection of issues in the development lifecycle. Its ability to generate detailed reports and support various output formats facilitates easy interpretation of results and integration with other security and DevOps tools, making it a valuable asset in maintaining secure and compliant infrastructure deployments managed through Terraform.
Learn more from the following resources:
- [@official@KICS Website](https://kics.io/index.html)
- [@opensource@checkmarx/kics](https://github.com/Checkmarx/kics)
- [@video@Autoremediate your Infrastructure-as-Code](https://www.youtube.com/watch?v=jVpQPTyg3hs)

@ -1 +1,8 @@
# Parallelism
# Parallelism
Terraform parallelism refers to its ability to create, modify, or destroy multiple resources concurrently. By default, Terraform performs operations on up to 10 resource instances simultaneously. This parallel execution can significantly reduce the time required for applying large configurations. The level of parallelism can be adjusted using the `-parallelism` flag in Terraform commands or through configuration settings. Increasing parallelism can speed up operations, especially in large infrastructures, but may also increase load on the API endpoints of cloud providers. It's important to balance parallelism with API rate limits and resource dependencies. Some resources or providers may not support parallel operations, and Terraform automatically serializes these. Effective use of parallelism requires understanding resource dependencies and provider capabilities to optimize performance without causing errors or exceeding service limits.
Learn more from the following resources:
- [@article@Considerations when setting the TFE_PARALLELISM environment variable](https://support.hashicorp.com/hc/en-us/articles/10348130482451-Considerations-when-setting-the-TFE-PARALLELISM-environment-variable)
- [@official@Walking the graph](https://developer.hashicorp.com/terraform/internals/graph#walking-the-graph)

@ -1 +1,9 @@
# Run Tasks
# Run Tasks
HCP Run Tasks, a feature of Terraform Cloud, allow for the integration of external services or custom logic into the Terraform workflow. These tasks can be configured to run before or after Terraform plans and applies, enabling additional validation, notification, or data processing steps. Run Tasks can be used for various purposes such as security scanning, cost estimation, custom policy checks, or triggering external workflows. They are executed via webhooks, allowing integration with a wide range of third-party services or internal tools. This feature enhances the flexibility and extensibility of the Terraform workflow, enabling organizations to implement custom processes and integrations tailored to their specific needs.
Learn more from the following resources:
- [@official@Run Tasks](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/run-tasks)
- [@official@Terrafrom Registry - Run Tasks](https://registry.terraform.io/browse/run-tasks)
- [@official@Run Tasks API](https://developer.hashicorp.com/terraform/cloud-docs/api-docs/run-tasks/run-tasks)

@ -1 +1,5 @@
# Scaling Terraform
# Scaling Terraform
Scaling Terraform involves strategies to manage large and complex infrastructure deployments efficiently. Key approaches include modularizing configurations to improve reusability and maintainability, using workspaces or separate state files for different environments, and implementing remote state storage with locking mechanisms.
Efficient state management becomes crucial, often involving state splitting to reduce operation times. Adopting a CI/CD pipeline for Terraform helps automate and standardize deployment processes. Implementing proper access controls and using features like Terraform Cloud or Enterprise for team collaboration and governance becomes important. Performance optimization techniques, such as using -parallelism flag and targeted applies, help manage large-scale changes. As scale increases, considerations around cost management, security, and compliance gain prominence. Effective scaling often requires a balance between centralized control and distributed team autonomy in infrastructure management.

@ -1 +1,9 @@
# Secret Management
# Secret Management
Terraform secret management is a critical aspect of secure infrastructure-as-code practices, focusing on the protection of sensitive information like API keys, passwords, and access tokens. Instead of storing secrets directly in Terraform files, best practices advocate for using external secret management systems such as HashiCorp Vault, AWS Secrets Manager, or Azure Key Vault. These systems allow Terraform to retrieve secrets securely during execution, significantly reducing the risk of exposure. For local development, tools like git-crypt or SOPS provide encryption for sensitive files, while Terraform's built-in encrypted state storage options safeguard secrets in state files. By marking variables as sensitive, accidental logging of secret values can be prevented. In CI/CD pipelines, it's crucial to inject secrets securely at runtime and avoid committing them to version control systems. Regular rotation of secrets and access audits further enhance security.
Learn more from the following resources:
- [@article@Terraform Secrets - How to manage them](https://spacelift.io/blog/terraform-secrets)
- [@article@A comprehensive guide to managing secrets in your Terraform code](https://blog.gruntwork.io/a-comprehensive-guide-to-managing-secrets-in-your-terraform-code-1d586955ace1)
- [@official@Inject secrets with Vault](https://developer.hashicorp.com/terraform/tutorials/secrets)

@ -1 +1,3 @@
# Security
# Security
Terraform security encompasses practices and tools to ensure the safe and compliant management of infrastructure-as-code. Key aspects include securing Terraform state files, which often contain sensitive information, by using encrypted remote backends. Access control is crucial, implementing least privilege principles for both human users and service accounts. Sensitive data management involves using vault systems or cloud-native secret managers rather than hardcoding credentials. Code review processes should include security checks, and automated scanning tools can be integrated to detect misconfigurations or policy violations. Implementing compliance-as-code with tools like Terraform Sentinel ensures adherence to organizational policies. Version control and proper git hygiene help maintain audit trails.

@ -1 +1,5 @@
# Splitting Large State
# Splitting Large State
Splitting large Terraform states involves breaking down a monolithic state file into smaller, more manageable units. This approach is crucial for improving performance, reducing the risk of state corruption, and enabling parallel workflows in large-scale infrastructures. Strategies include organizing resources into separate Terraform workspaces or using distinct state files for different logical components or environments. The process often involves using `terraform state mv` to relocate resources between states or `terraform state rm` followed by `import` in the new configuration. Careful planning is essential to manage dependencies between split states. Benefits include faster apply times, reduced risk of concurrent modification conflicts, and the ability to grant more granular access control.
See `Splitting State Files` in the `State` topic for more resources.

@ -1 +1,9 @@
# Terragrunt
# Terragrunt
Terragrunt is a thin wrapper for Terraform that provides extra tools for keeping your configurations DRY (Don't Repeat Yourself), working with multiple Terraform modules, and managing remote state. It helps in managing large-scale infrastructure by reducing code duplication and simplifying the management of multiple environments. Key features include the ability to keep Terraform code DRY by defining inputs and backend configurations centrally, execute Terraform commands on multiple modules at once, and manage remote state for each module automatically. Terragrunt also facilitates the use of Terraform modules across different environments by allowing for easy parameter injection. It's particularly useful in complex, multi-environment setups where maintaining consistency and reducing repetition in Terraform configurations is crucial.
Learn more from the following resources:
- [@official@Terragrunt Website](https://terragrunt.gruntwork.io/)
- [@opensource@gruntwork-io/terragrunt](https://github.com/gruntwork-io/terragrunt)
- [@article@Terragrunt Tutorial: Examples and Use Cases](https://www.env0.com/blog/terragrunt)

@ -1 +1,9 @@
# Terrascan
# Terrascan
Terrascan is an open-source static code analyzer for Infrastructure as Code (IaC) that helps detect compliance and security violations across multiple IaC tools, including Terraform. It scans Terraform configurations against a set of predefined policies to identify potential security risks, misconfigurations, and compliance issues before deployment. Terrascan can be integrated into CI/CD pipelines, providing early detection of vulnerabilities in the development lifecycle. It supports custom policies, allowing organizations to enforce their specific security and compliance requirements. The tool covers various cloud providers and can be extended to support additional policy types.
Learn more from the following resources:
- [@official@Terrascan Website](https://runterrascan.io/)
- [@opensource@tenable/terrascan](https://github.com/tenable/terrascan)
- [@article@What is Terrascan?](https://spacelift.io/blog/what-is-terrascan)

@ -1 +1,9 @@
# Testing Modules
# Testing Modules
Testing Terraform modules involves validating their functionality, reusability, and correctness in isolation and as part of larger systems. This process typically includes unit testing to verify individual module behavior, integration testing to ensure proper interaction with other components, and sometimes end-to-end testing for complex modules. Tests often use tools like Terratest or custom scripts to automate the creation of resources, verification of outputs, and cleanup. Key aspects include testing various input combinations, verifying resource attributes and outputs, and ensuring idempotency. Module testing also involves checking for proper handling of edge cases and error conditions. While it requires initial setup effort, thorough module testing enhances reliability, facilitates refactoring, and improves overall infrastructure code quality.
Learn more from the following resources:
- [@official@Write Terraform tests](https://developer.hashicorp.com/terraform/tutorials/configuration-language/test)
- [@video@Terraform module testing](https://www.youtube.com/watch?v=1LInIWM_2UQ)
- [@article@Terraform test](https://developer.hashicorp.com/terraform/language/tests)

@ -1 +1,3 @@
# Testing
# Testing
Testing Terraform code involves multiple approaches to ensure reliability and correctness of infrastructure-as-code. This includes syntax validation, linting for best practices, unit testing of modules, integration testing to verify resource creation, plan testing to review expected changes, and compliance testing for organizational policies. Tools like TFLint and frameworks such as Terratest are commonly used. Automated testing in CI/CD pipelines helps catch errors early and maintain code quality. Mock providers can be employed for testing without affecting real infrastructure, while property-based testing explores different input combinations. Effective testing strategies balance thoroughness with practicality, considering factors like execution time and resource costs.

@ -1 +1,9 @@
# Trivy
# Trivy
Trivy is a comprehensive, open-source security scanner primarily known for container image scanning, but it also supports Infrastructure as Code (IaC) analysis, including Terraform configurations. It can detect vulnerabilities in dependencies, misconfigurations in cloud infrastructure setups, and potential security risks in Terraform code. Trivy's IaC scanning capabilities cover various cloud providers and can identify issues related to compliance, security best practices, and common misconfigurations. The tool is designed for easy integration into CI/CD pipelines, offering fast scanning times and multiple output formats for better reporting and integration with other DevOps tools. Trivy's strength lies in its ability to provide a unified scanning solution across different aspects of the software development lifecycle, from container images to IaC, making it a versatile tool for maintaining security throughout the development and deployment process.
Learn more from the following resources:
- [@official@Trivy Website](https://trivy.dev/)
- [@opensource@aquasecurity/trivy](https://github.com/aquasecurity/trivy)
- [@article@How to secure Terraform code with Trivy](https://verifa.io/blog/how-to-secure-terraform-trivy/)

@ -1 +1,8 @@
# Unit Testing
# Unit Testing
Terraform unit testing focuses on verifying the behavior of individual modules or components in isolation. It typically involves creating small, focused test cases that validate the expected outputs and resource configurations of a module given specific inputs. Tools like Terratest, a Go library, are commonly used for writing and running these tests. Unit tests for Terraform might check if resources are correctly defined, if count and for_each meta-arguments work as expected, or if output values are calculated correctly. These tests often use mock data or minimal real infrastructure to simulate various scenarios. While they don't guarantee the actual creation of resources, unit tests are valuable for quickly catching logic errors, ensuring module interfaces work as intended, and maintaining code quality as modules evolve.
Learn more from the following resources:
- [@article@Terraform unit tests](https://www.hashicorp.com/blog/testing-hashicorp-terraform#unit-tests)
- [@official@Integration or unit testing](https://developer.hashicorp.com/terraform/language/tests#integration-or-unit-testing)

@ -1 +1,9 @@
# VCS Integration
# VCS Integration
HCP's Version Control System (VCS) integration, particularly in Terraform Cloud, enables seamless connection between infrastructure code repositories and HCP services. This feature allows teams to directly link their Git repositories (from providers like GitHub, GitLab, or Bitbucket) to HCP workspaces. When configured, changes pushed to the linked repository automatically trigger Terraform runs in the corresponding workspace. This integration supports GitOps workflows, ensuring that infrastructure changes go through proper version control processes. It enables features like automatic plan generation on pull requests, providing early feedback on proposed changes. The integration also supports branch-based workflows, allowing different branches to be linked to different workspaces for staging and production environments.
Learn more from the following resources:
- [@official@Connecting VCS Providers to HCP Terraform](https://developer.hashicorp.com/terraform/cloud-docs/vcs)
- [@official@Use VCS-driven workflow](https://developer.hashicorp.com/terraform/tutorials/cloud-get-started/cloud-vcs-change)
- [@official@Configuring Workspace VCS Connections](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/vcs)

@ -1 +1,7 @@
# What and when to use HCP?
# What and when to use HCP?
HashiCorp Cloud Platform (HCP) is best used when organizations need a managed, scalable solution for their infrastructure-as-code practices. It's particularly valuable for teams seeking to streamline operations across multi-cloud environments, enhance collaboration, and maintain consistent governance. HCP is ideal when there's a need for centralized management of Terraform workflows, secure remote operations, and integrated secrets management. It's beneficial for large enterprises or growing teams that require robust access controls, policy enforcement, and audit capabilities. HCP should be considered when the complexity of self-managing HashiCorp tools becomes a burden, or when there's a desire to reduce operational overhead. It's also useful when organizations want to leverage the synergies between different HashiCorp products like Terraform, Vault, and Consul in a unified, managed environment. The platform is most effective when scaling infrastructure management needs outgrow the capabilities of standalone Terraform implementations.
Learn more from the following resources:
- [@official@Use Cases](https://developer.hashicorp.com/terraform/intro/use-cases)

@ -1 +1,9 @@
# Workspaces
# Workspaces
HCP workspaces, particularly in the context of Terraform Cloud, provide isolated environments for managing different sets of infrastructure. Each workspace is associated with a specific Terraform configuration and maintains its own state file, variables, and access controls. Workspaces enable teams to organize and separate infrastructure based on projects, environments, or teams. They support collaborative workflows by allowing multiple team members to work on the same infrastructure while maintaining version control and change history. HCP workspaces offer features like remote state management, secure variable storage, and integration with version control systems. They also provide run triggers for automating workflows across dependent infrastructures. With built-in access controls, organizations can enforce least-privilege principles by granting specific permissions to users or teams for each workspace.
Learn more from the following resources:
- [@official@Workspaces](https://developer.hashicorp.com/terraform/cloud-docs/workspaces)
- [@article@Organize workspaces with projects](https://developer.hashicorp.com/terraform/tutorials/cloud/projects)
- [@video@Organize your Terraform Cloud workspaces using Projects](https://www.youtube.com/watch?v=J1T1tbU6wAU)

@ -3124,45 +3124,15 @@
"oldId": "weIlGqGN15U8BH1yE9moA"
},
"position": {
"x": -489.23643593653094,
"y": 1715.9835318380642
},
"width": 214,
"height": 49,
"selected": false,
"positionAbsolute": {
"x": -489.23643593653094,
"y": 1715.9835318380642
},
"dragging": false,
"style": {
"width": 214,
"height": 49
},
"selectable": true,
"focusable": true,
"resizing": false
},
{
"id": "q1I5X_UBGH9LyF7UKHl_u",
"type": "subtopic",
"data": {
"label": "Best Practices",
"style": {
"fontSize": 17
},
"oldId": "zCU02_5Pide5BZiuMuqEU"
},
"position": {
"x": -489.23643593653094,
"y": 1768.9835318380642
"x": -490.26733623226676,
"y": 1759.9060085371989
},
"width": 214,
"height": 49,
"selected": false,
"positionAbsolute": {
"x": -489.23643593653094,
"y": 1768.9835318380642
"x": -490.26733623226676,
"y": 1759.9060085371989
},
"dragging": false,
"style": {
@ -3185,14 +3155,14 @@
},
"position": {
"x": -489.23643593653094,
"y": 1821.9835318380642
"y": 1811.9060085371989
},
"width": 214,
"height": 49,
"selected": false,
"positionAbsolute": {
"x": -489.23643593653094,
"y": 1821.9835318380642
"y": 1811.9060085371989
},
"dragging": false,
"style": {
@ -3215,14 +3185,14 @@
},
"position": {
"x": -489.23643593653094,
"y": 1874.9835318380642
"y": 1863.9060085371989
},
"width": 214,
"height": 49,
"selected": false,
"positionAbsolute": {
"x": -489.23643593653094,
"y": 1874.9835318380642
"y": 1863.9060085371989
},
"dragging": false,
"style": {
@ -3245,14 +3215,14 @@
},
"position": {
"x": -490.26733623226676,
"y": 1980.9835318380642
"y": 1967.9060085371989
},
"width": 214,
"height": 49,
"selected": false,
"positionAbsolute": {
"x": -490.26733623226676,
"y": 1980.9835318380642
"y": 1967.9060085371989
},
"dragging": false,
"style": {
@ -3275,14 +3245,14 @@
},
"position": {
"x": -490.26733623226676,
"y": 2033.9835318380642
"y": 2019.9060085371989
},
"width": 214,
"height": 49,
"selected": false,
"positionAbsolute": {
"x": -490.26733623226676,
"y": 2033.9835318380642
"y": 2019.9060085371989
},
"dragging": false,
"style": {
@ -3893,7 +3863,7 @@
"type": "subtopic",
"position": {
"x": -489.23643593653094,
"y": 1927.9835318380642
"y": 1915.9060085371989
},
"selected": false,
"data": {
@ -3909,7 +3879,7 @@
"height": 49,
"positionAbsolute": {
"x": -489.23643593653094,
"y": 1927.9835318380642
"y": 1915.9060085371989
},
"dragging": false,
"style": {
@ -5416,25 +5386,6 @@
"selectable": true,
"focusable": true
},
{
"style": {
"strokeDasharray": "0.8 8",
"strokeLinecap": "round",
"strokeWidth": 3.5,
"stroke": "#2b78e4"
},
"source": "ECcHo0KTDN27MuVTC-Fwy",
"sourceHandle": "y2",
"target": "q1I5X_UBGH9LyF7UKHl_u",
"targetHandle": "z1",
"data": {
"edgeStyle": "dashed"
},
"id": "reactflow__edge-ECcHo0KTDN27MuVTC-Fwyy2-q1I5X_UBGH9LyF7UKHl_uz1",
"selected": false,
"selectable": true,
"focusable": true
},
{
"style": {
"strokeDasharray": "0.8 8",

Loading…
Cancel
Save