blob: 051f0471aa6fc81446073f91c852fa43a00efb31 [file] [log] [blame]
---
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in
# .github/CONTRIBUTING.md.
#
# ----------------------------------------------------------------------------
subcategory: "Storage Transfer Service"
description: |-
Represents an On-Premises Agent pool.
---
# google\_storage\_transfer\_agent\_pool
Represents an On-Premises Agent pool.
To get more information about AgentPool, see:
* [API documentation](https://cloud.google.com/storage-transfer/docs/reference/rest/v1/projects.agentPools)
* How-to Guides
* [Official Documentation](https://cloud.google.com/storage-transfer/docs/on-prem-agent-pools)
## Example Usage - Agent Pool Basic
```hcl
data "google_storage_transfer_project_service_account" "default" {
project = "my-project-name"
}
resource "google_project_iam_member" "pubsub_editor_role" {
project = "my-project-name"
role = "roles/pubsub.editor"
member = "serviceAccount:${data.google_storage_transfer_project_service_account.default.email}"
}
resource "google_storage_transfer_agent_pool" "example" {
name = "agent-pool-example"
display_name = "Source A to destination Z"
bandwidth_limit {
limit_mbps = "120"
}
depends_on = [google_project_iam_member.pubsub_editor_role]
}
```
## Argument Reference
The following arguments are supported:
* `name` -
(Required)
The ID of the agent pool to create.
The agentPoolId must meet the following requirements:
* Length of 128 characters or less.
* Not start with the string goog.
* Start with a lowercase ASCII character, followed by:
* Zero or more: lowercase Latin alphabet characters, numerals, hyphens (-), periods (.), underscores (_), or tildes (~).
* One or more numerals or lowercase ASCII characters.
As expressed by the regular expression: ^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$.
- - -
* `display_name` -
(Optional)
Specifies the client-specified AgentPool description.
* `bandwidth_limit` -
(Optional)
Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'.
Structure is [documented below](#nested_bandwidth_limit).
* `project` - (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
<a name="nested_bandwidth_limit"></a>The `bandwidth_limit` block supports:
* `limit_mbps` -
(Required)
Bandwidth rate in megabytes per second, distributed across all the agents in the pool.
## Attributes Reference
In addition to the arguments listed above, the following computed attributes are exported:
* `id` - an identifier for the resource with format `projects/{{project}}/agentPools/{{name}}`
* `state` -
Specifies the state of the AgentPool.
## Timeouts
This resource provides the following
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options:
- `create` - Default is 30 minutes.
- `update` - Default is 20 minutes.
- `delete` - Default is 20 minutes.
## Import
AgentPool can be imported using any of these accepted formats:
* `projects/{{project}}/agentPools/{{name}}`
* `{{project}}/{{name}}`
* `{{name}}`
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import AgentPool using one of the formats above. For example:
```tf
import {
id = "projects/{{project}}/agentPools/{{name}}"
to = google_storage_transfer_agent_pool.default
}
```
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), AgentPool can be imported using one of the formats above. For example:
```
$ terraform import google_storage_transfer_agent_pool.default projects/{{project}}/agentPools/{{name}}
$ terraform import google_storage_transfer_agent_pool.default {{project}}/{{name}}
$ terraform import google_storage_transfer_agent_pool.default {{name}}
```
## User Project Overrides
This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override).