Well-Architected Framework
Build a culture of security automation
Security is no longer a separate function in modern infrastructure. Organizations must incorporate security in all phases of infrastructure deployment and software development lifecycles (SDLC).
Waiting for security teams to review and approve changes manually can lead to delays, increased risk of human error, and inconsistent security practices. Waiting for audits and compliance checks to verify your security program does not allow you to respond to emerging threats, leaving your organization vulnerable.
When you build a culture of security automation, you integrate security practices and tools into your organization's culture, processes, and workflows. Approaching security as a necessary part of your organization's culture, you can:
Developer Experience:
- Developers get immediate feedback on security issues through their workflows.
- Security becomes part of the development workflow, not an external gatekeeper.
- Learning happens in context when teams discover security issues.
Operations Teams:
- Infrastructure security through familiar code-based workflows.
- Security policies enforced and deployed automatically, reducing manual oversight burden.
- Compliance becomes a byproduct of standard operations rather than a special process.
Security Teams:
- Shift from being gatekeepers to being enablers and consultants.
- Focus on defining policies and standards rather than manual reviews.
- Gain visibility into security posture across the entire organization.
What is security automation?
Security automation involves using tools and processes to automate security tasks, such as scanning for vulnerabilities, managing secrets, applying security patches, and monitoring for threats. You can automate these tasks as code, instead of performing the tasks manually. By automating tasks like policy provisioning, or scanning for secrets, your security posture improves.
Another important aspect of security automation and building a culture around security is understanding that various compliance standards do not inhibit innovation. It can be easy to blame compliance requirements for slowing down development and infrastructure innovation. However, when you teach teams that security and compliance give you the necessary guardrails to innovate, you can build a culture that embraces security.
Deploy security as code with Terraform
You can adopt security as code practices using Terraform to automate the deployment of security policies as code in your infrastructure. You can manage policies for HashiCorp Vault, Boundary, and Sentinel, as well as policies for public cloud providers and orchestration platforms like Kubernetes and Nomad.
You can also use Terraform to manage common infrastructure components such as user accounts, firewall configurations, and network settings.
- Security policies become testable code: Teams can unit test, peer review, and version control security configurations just like application code.
- Prevents configuration drift: Automated detection when infrastructure deviates from secure baselines, encouraging teams to maintain security standards.
- Enables security guardrails: Terraform can enforce organization-wide security policies that prevent non-compliant infrastructure deployment.
- Democratizes security knowledge: Security configurations are documented in code, making security requirements visible and understandable to all team members.
- Creates security feedback loops: Failed deployments due to security violations become learning opportunities rather than blame events.
This shifts security from being a "blocker" to being an integral part of how you design and deploy infrastructure.
Shift security left with HCP Vault Radar
Security teams can help shift security left with HCP Vault Radar. Shifting security left means software and infrastructure as code (IaC) developers integrate security tools into their development process. HCP Vault Radar scans for secrets in source code during development, or once they commit their code to a version control system (VCS) such as GitHub.
- Continuous education: Integrating scanning into the software development lifecycle helps developers understand how secrets leak.
- Immediate feedback: Real-time alerts when developers commit secrets help improve secure coding practices.
- Integration with development workflows: Security scanning becomes part of the development process, not a separate security audit.
- Cross-team visibility: Security teams can see patterns and provide targeted training based on actual findings.
HashiCorp resources:
- Correlate HCP Vault Radar findings with HCP Vault
- Boundary credential brokering with Vault
- Enforce policies in HCP Terraform using Sentinel
External resources:
- NIST cyberssecurity framework
- Navigating behavioral change in security awareness and culture
- Why Culture Is the First Line of Defense in the Age of Agentic AI
Next steps
In this section of how to Secure infrastructure, you learned why it is important to build a culture where security is integrated into every aspect of your organization's operations. Build a culture of security automation is part of the Secure systems pillar.
Following these documents in order ensures a logical progression through the key concepts and best practices, helping you build a strong foundation for your organizations security program.
- Integrate Terraform and Vault into common industry workflows, such as GitOps to further automate security practices.
- Implement zero trust security and networking
- How to secure cloud infrastructure with identity-based access control
- Build a culture of security automation (this document)
- Secure network traffic with ingress and egress
- Secure human access to infrastructure
- Prevent lateral movement