|
|
|
|
@@ -114,6 +114,37 @@ module "agent_engine" {
|
|
|
|
|
# tftest inventory=minimal-pickle.yaml
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
You may want to upload your files on the GCS bucket outside Terrafrom.
|
|
|
|
|
In this example, the module expects your package config files to be already present in the GCS bucket.
|
|
|
|
|
|
|
|
|
|
```hcl
|
|
|
|
|
module "agent_engine" {
|
|
|
|
|
source = "./fabric/modules/agent-engine"
|
|
|
|
|
name = "my-agent"
|
|
|
|
|
project_id = var.project_id
|
|
|
|
|
region = var.region
|
|
|
|
|
|
|
|
|
|
agent_engine_config = {
|
|
|
|
|
agent_framework = "google-adk"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bucket_config = {
|
|
|
|
|
create = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
deployment_files = {
|
|
|
|
|
package_config = {
|
|
|
|
|
are_paths_local = false
|
|
|
|
|
dependencies_path = "dependencies.tar.gz"
|
|
|
|
|
pickle_path = "pickle.pkl"
|
|
|
|
|
requirements_path = "requirements.txt"
|
|
|
|
|
}
|
|
|
|
|
source_config = null
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
# tftest inventory=pickle-gcs.yaml
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Unmanaged deployments
|
|
|
|
|
|
|
|
|
|
By default, this module tracks and controls code updates. This means you can only the agent code via Terraform.
|
|
|
|
|
@@ -269,15 +300,15 @@ The module allows you to dynamically reference context values for resources crea
|
|
|
|
|
| name | description | type | required | default |
|
|
|
|
|
|---|---|:---:|:---:|:---:|
|
|
|
|
|
| [agent_engine_config](variables.tf#L17) | The agent configuration. | <code title="object({ agent_framework = string class_methods = optional(list(any), []) container_concurrency = optional(number) environment_variables = optional(map(string), {}) max_instances = optional(number) min_instances = optional(number) python_version = optional(string, "3.12") resource_limits = optional(object({ cpu = string memory = string })) secret_environment_variables = optional(map(object({ secret_id = string version = optional(string, "latest") })), {}) })">object({…})</code> | ✓ | |
|
|
|
|
|
| [name](variables.tf#L121) | The name of the agent. | <code>string</code> | ✓ | |
|
|
|
|
|
| [project_id](variables.tf#L127) | The id of the project where to deploy the agent. | <code>string</code> | ✓ | |
|
|
|
|
|
| [region](variables.tf#L133) | The region where to deploy the agent. | <code>string</code> | ✓ | |
|
|
|
|
|
| [name](variables.tf#L122) | The name of the agent. | <code>string</code> | ✓ | |
|
|
|
|
|
| [project_id](variables.tf#L128) | The id of the project where to deploy the agent. | <code>string</code> | ✓ | |
|
|
|
|
|
| [region](variables.tf#L134) | The region where to deploy the agent. | <code>string</code> | ✓ | |
|
|
|
|
|
| [bucket_config](variables.tf#L40) | The GCS bucket configuration. | <code title="object({ create = optional(bool, true) deletion_protection = optional(bool, true) name = optional(string) uniform_bucket_level_access = optional(bool, true) })">object({…})</code> | | <code>{}</code> |
|
|
|
|
|
| [context](variables.tf#L52) | Context-specific interpolations. | <code title="object({ custom_roles = optional(map(string), {}) iam_principals = optional(map(string), {}) locations = optional(map(string), {}) kms_keys = optional(map(string), {}) project_ids = optional(map(string), {}) })">object({…})</code> | | <code>{}</code> |
|
|
|
|
|
| [deployment_files](variables.tf#L65) | The to source files path and names. | <code title="object({ package_config = optional(object({ dependencies_path = optional(string, "./src/dependencies.tar.gz") pickle_path = optional(string, "./src/pickle.pkl") requirements_path = optional(string, "./src/requirements.txt") }), null) source_config = optional(object({ entrypoint_module = optional(string, "agent") entrypoint_object = optional(string, "agent") requirements_path = optional(string, "requirements.txt") source_path = optional(string, "./src/source.tar.gz") }), null) })">object({…})</code> | | <code title="{ package_config = null source_config = {} }">{…}</code> |
|
|
|
|
|
| [description](variables.tf#L101) | The Agent Engine description. | <code>string</code> | | <code>"Terraform managed."</code> |
|
|
|
|
|
| [encryption_key](variables.tf#L108) | The full resource name of the Cloud KMS CryptoKey. | <code>string</code> | | <code>null</code> |
|
|
|
|
|
| [managed](variables.tf#L114) | Whether the Terraform module should control the code updates. | <code>bool</code> | | <code>true</code> |
|
|
|
|
|
| [deployment_files](variables.tf#L65) | The to source files path and names. | <code title="object({ package_config = optional(object({ are_paths_local = optional(bool, true) dependencies_path = optional(string, "./src/dependencies.tar.gz") pickle_path = optional(string, "./src/pickle.pkl") requirements_path = optional(string, "./src/requirements.txt") }), null) source_config = optional(object({ entrypoint_module = optional(string, "agent") entrypoint_object = optional(string, "agent") requirements_path = optional(string, "requirements.txt") source_path = optional(string, "./src/source.tar.gz") }), null) })">object({…})</code> | | <code title="{ package_config = null source_config = {} }">{…}</code> |
|
|
|
|
|
| [description](variables.tf#L102) | The Agent Engine description. | <code>string</code> | | <code>"Terraform managed."</code> |
|
|
|
|
|
| [encryption_key](variables.tf#L109) | The full resource name of the Cloud KMS CryptoKey. | <code>string</code> | | <code>null</code> |
|
|
|
|
|
| [managed](variables.tf#L115) | Whether the Terraform module should control the code updates. | <code>bool</code> | | <code>true</code> |
|
|
|
|
|
| [service_account_config](variables-serviceaccount.tf#L18) | Service account configurations. | <code title="object({ create = optional(bool, true) display_name = optional(string) email = optional(string) name = optional(string) roles = optional(list(string), [ "roles/aiplatform.user", "roles/storage.objectViewer", "roles/viewer" ]) })">object({…})</code> | | <code>{}</code> |
|
|
|
|
|
|
|
|
|
|
## Outputs
|
|
|
|
|
|