https://github.com/rafaapaim/aws-bedrock-guardrail-terraform
This project shows how we create an AWS Bedrock Guardrail for LLM projects using Terraform as IaC (Infrastructure as Code).
https://github.com/rafaapaim/aws-bedrock-guardrail-terraform
aws aws-bedrock bedrock guardrails terraform
Last synced: 12 days ago
JSON representation
This project shows how we create an AWS Bedrock Guardrail for LLM projects using Terraform as IaC (Infrastructure as Code).
- Host: GitHub
- URL: https://github.com/rafaapaim/aws-bedrock-guardrail-terraform
- Owner: rafaapaim
- Created: 2025-06-28T17:53:24.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-07-06T14:41:34.000Z (3 months ago)
- Last Synced: 2025-07-06T15:25:43.225Z (3 months ago)
- Topics: aws, aws-bedrock, bedrock, guardrails, terraform
- Language: HCL
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AWS Bedrock Guardrails with Terraform
This project provides Infrastructure as Code (IaC) for provisioning and versioning AWS Bedrock Guardrails using [Terraform](https://www.terraform.io/). It enables consistent, scalable, and automated management of guardrails across environments.
## 📦 Project Structure
```plaintext
.
├── modules/
│ └── aws-guardrail/
| | ├── bedrock.tf
│ │ ├── main.tf
│ │ ├── variables.tf
│ │ ├── outputs.tf
│ └── aws-guardrail-version/
| | ├── bedrock.tf
│ │ ├── main.tf
│ │ ├── variables.tf
│ │ ├── outputs.tf
├── README.md
```## 🚀 Features
- ✅ Create AWS Bedrock Guardrails using Terraform
- 🔁 Version control for guardrail configurations
- 🛡️ Declarative enforcement of content moderation rules
- 📚 Modular and reusable Terraform code## 🔧 Prerequisites
- [Terraform CLI](https://developer.hashicorp.com/terraform/downloads) >= 1.5
- AWS CLI configured with appropriate permissions
- AWS Bedrock enabled in your account## 📥 Getting Started
### 1. Clone the Repository
```bash
git clone https://github.com/rafaapaim/aws-bedrock-guardrails-terraform.git
cd aws-bedrock-guardrails-terraform/module
```### 2. Initialize, Plan the Infrastructure and Apply the Configuration
```bash
make all RESOURCE=
```### 3. Destroy resources
```bash
make destroy RESOURCE=
```## 🗃️ Versioning Guardrails
To manage guardrail versions, the module detects existing ARNs and conditionally creates new versions when needed. Use outputs to reference the current version ARN and integrate with other modules.
```hcl
output "guardrail_version_arn" {
value = module.guardrail.guardrail_version_arn
}
```## 🛑 Disclaimer
This project is not affiliated with AWS. Use at your own risk and validate all configurations in a non-production environment before deploying to production.