|
3 | 3 |
|
4 | 4 | ## Usage |
5 | 5 |
|
| 6 | +### Basic Usage (hrafnar app only) |
| 7 | + |
| 8 | +```hcl |
| 9 | +module "hrafnar_gcp_deploy" { |
| 10 | + source = "openteams-ai/hrafnar-gcp-deploy/gcp" |
| 11 | + version = "~> 1.0" |
| 12 | +
|
| 13 | + project_id = "my-gcp-project" |
| 14 | + region = "us-central1" |
| 15 | + name_prefix = "acme-hrafnar" |
| 16 | +
|
| 17 | + # Hrafnar application configuration |
| 18 | + app_image = "gcr.io/my-project/hrafnar:latest" |
| 19 | +
|
| 20 | + # AI API keys (stored securely in Secret Manager) |
| 21 | + ai_api_keys = { |
| 22 | + OPENAI_API_KEY = "sk-..." |
| 23 | + ANTHROPIC_API_KEY = "sk-ant-..." |
| 24 | + } |
| 25 | +} |
| 26 | +``` |
| 27 | + |
| 28 | +### With Cloudflare DNS and React Frontend |
| 29 | + |
6 | 30 | ```hcl |
7 | | -module "cloudrun_ai_app" { |
8 | | - source = "openteams-ai/cloudrun-ai-app/gcp" |
| 31 | +module "hrafnar_gcp_deploy" { |
| 32 | + source = "openteams-ai/hrafnar-gcp-deploy/gcp" |
9 | 33 | version = "~> 1.0" |
10 | 34 |
|
11 | | - project_id = "my-gcp-project" |
12 | | - region = "us-central1" |
13 | | - customer_name = "acme-corp" |
14 | | - domain_name = "acme.example.com" |
| 35 | + project_id = "my-gcp-project" |
| 36 | + region = "us-central1" |
| 37 | + name_prefix = "acme-hrafnar" |
| 38 | +
|
| 39 | + # Hrafnar application |
| 40 | + app_image = "gcr.io/my-project/hrafnar:latest" |
| 41 | +
|
| 42 | + # Optional React frontend |
| 43 | + enable_react_frontend = true |
| 44 | + react_image = "gcr.io/my-project/hrafnar-ui:latest" |
| 45 | +
|
| 46 | + # Cloudflare DNS configuration |
| 47 | + enable_cloudflare_dns = true |
| 48 | + cloudflare_api_token = "your-cloudflare-token" |
| 49 | + cloudflare_zone_id = "your-zone-id" |
| 50 | + base_domain = "example.com" |
| 51 | + api_subdomain = "api" |
| 52 | + ui_subdomain = "app" |
| 53 | +
|
| 54 | + # AI configuration |
| 55 | + ai_api_keys = { |
| 56 | + OPENAI_API_KEY = "sk-..." |
| 57 | + ANTHROPIC_API_KEY = "sk-ant-..." |
| 58 | + } |
15 | 59 |
|
16 | | - # Application configuration |
17 | | - app_image = "gcr.io/my-project/ai-app:latest" |
18 | | - app_env_vars = { |
19 | | - AI_BACKEND_URL = "https://api.openai.com/v1" |
20 | | - MCP_SERVER_URL = "https://mcp.example.com" |
| 60 | + # MCP servers |
| 61 | + mcp_servers = { |
| 62 | + filesystem = { |
| 63 | + url = "https://mcp-fs.example.com" |
| 64 | + description = "Filesystem MCP server" |
| 65 | + } |
21 | 66 | } |
22 | 67 | } |
23 | 68 | ``` |
24 | 69 |
|
25 | 70 | ## Requirements |
26 | 71 |
|
27 | | -No requirements. |
| 72 | +| Name | Version | |
| 73 | +|------|---------| |
| 74 | +| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5 | |
| 75 | +| <a name="requirement_cloudflare"></a> [cloudflare](#requirement\_cloudflare) | ~> 4.0 | |
| 76 | +| <a name="requirement_google"></a> [google](#requirement\_google) | ~> 5.0 | |
| 77 | +| <a name="requirement_google-beta"></a> [google-beta](#requirement\_google-beta) | ~> 5.0 | |
| 78 | +| <a name="requirement_random"></a> [random](#requirement\_random) | ~> 3.1 | |
28 | 79 |
|
29 | 80 | ## Providers |
30 | 81 |
|
31 | 82 | No providers. |
32 | 83 |
|
33 | 84 | ## Modules |
34 | 85 |
|
35 | | -No modules. |
| 86 | +| Name | Source | Version | |
| 87 | +|------|--------|---------| |
| 88 | +| <a name="module_hrafnar_dev"></a> [hrafnar\_dev](#module\_hrafnar\_dev) | ../../ | n/a | |
36 | 89 |
|
37 | 90 | ## Resources |
38 | 91 |
|
39 | 92 | No resources. |
40 | 93 |
|
41 | 94 | ## Inputs |
42 | 95 |
|
43 | | -No inputs. |
| 96 | +| Name | Description | Type | Default | Required | |
| 97 | +|------|-------------|------|---------|:--------:| |
| 98 | +| <a name="input_ai_api_keys"></a> [ai\_api\_keys](#input\_ai\_api\_keys) | Map of AI API keys (e.g., OPENAI\_API\_KEY, ANTHROPIC\_API\_KEY) | `map(string)` | `{}` | no | |
| 99 | +| <a name="input_app_image"></a> [app\_image](#input\_app\_image) | Container image for the hrafnar application | `string` | `"gcr.io/my-project/hrafnar:dev"` | no | |
| 100 | +| <a name="input_base_domain"></a> [base\_domain](#input\_base\_domain) | Base domain name (e.g., 'example.com') | `string` | `""` | no | |
| 101 | +| <a name="input_cloudflare_api_token"></a> [cloudflare\_api\_token](#input\_cloudflare\_api\_token) | Cloudflare API token (required if enable\_cloudflare\_dns is true) | `string` | `""` | no | |
| 102 | +| <a name="input_cloudflare_zone_id"></a> [cloudflare\_zone\_id](#input\_cloudflare\_zone\_id) | Cloudflare zone ID (required if enable\_cloudflare\_dns is true) | `string` | `""` | no | |
| 103 | +| <a name="input_enable_cloudflare_dns"></a> [enable\_cloudflare\_dns](#input\_enable\_cloudflare\_dns) | Enable Cloudflare DNS management for development | `bool` | `false` | no | |
| 104 | +| <a name="input_mcp_servers"></a> [mcp\_servers](#input\_mcp\_servers) | MCP server configurations for development | <pre>map(object({<br/> url = string<br/> api_key = optional(string)<br/> description = string<br/> }))</pre> | <pre>{<br/> "filesystem": {<br/> "description": "Local filesystem MCP server for development",<br/> "url": "http://localhost:3001"<br/> }<br/>}</pre> | no | |
| 105 | +| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | GCP project ID for development environment | `string` | n/a | yes | |
44 | 106 |
|
45 | 107 | ## Outputs |
46 | 108 |
|
47 | | -No outputs. |
| 109 | +| Name | Description | |
| 110 | +|------|-------------| |
| 111 | +| <a name="output_api_domain"></a> [api\_domain](#output\_api\_domain) | Development API domain (if DNS enabled) | |
| 112 | +| <a name="output_database_connection_name"></a> [database\_connection\_name](#output\_database\_connection\_name) | Development database connection name | |
| 113 | +| <a name="output_hrafnar_app_url"></a> [hrafnar\_app\_url](#output\_hrafnar\_app\_url) | URL of the hrafnar application in development | |
| 114 | +| <a name="output_ui_domain"></a> [ui\_domain](#output\_ui\_domain) | Development UI domain (if DNS enabled) | |
| 115 | +| <a name="output_vpc_name"></a> [vpc\_name](#output\_vpc\_name) | Development VPC network name | |
48 | 116 | <!-- END_TF_DOCS --> |
0 commit comments