blob: 4b2bbdc4bc770a6dbef3769d32e54a210e0dcfb6 [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: "Blockchain node engine"
description: |-
A representation of a blockchain node.
---
# google\_blockchain\_node\_engine\_blockchain\_nodes
A representation of a blockchain node.
To get more information about BlockchainNodes, see:
* [API documentation](https://cloud.google.com/blockchain-node-engine/docs/reference/rest/v1/projects.locations.blockchainNodes)
* How-to Guides
* [Official Documentation](https://cloud.google.com/blockchain-node-engine)
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=blockchain_nodes_basic&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
</a>
</div>
## Example Usage - Blockchain Nodes Basic
```hcl
resource "google_blockchain_node_engine_blockchain_nodes" "default_node" {
location = "us-central1"
blockchain_type = "ETHEREUM"
blockchain_node_id = "blockchain_basic_node"
ethereum_details {
api_enable_admin = true
api_enable_debug = true
validator_config {
mev_relay_urls = ["https://mev1.example.org/","https://mev2.example.org/"]
}
node_type = "ARCHIVE"
consensus_client = "LIGHTHOUSE"
execution_client = "ERIGON"
network = "MAINNET"
}
labels = {
environment = "dev"
}
}
```
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=blockchain_nodes_geth_details&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
</a>
</div>
## Example Usage - Blockchain Nodes Geth Details
```hcl
resource "google_blockchain_node_engine_blockchain_nodes" "default_node_geth" {
location = "us-central1"
blockchain_type = "ETHEREUM"
blockchain_node_id = "blockchain_geth_node"
ethereum_details {
api_enable_admin = true
api_enable_debug = true
validator_config {
mev_relay_urls = ["https://mev1.example.org/","https://mev2.example.org/"]
}
node_type = "FULL"
consensus_client = "LIGHTHOUSE"
execution_client = "GETH"
network = "MAINNET"
geth_details {
garbage_collection_mode = "FULL"
}
}
labels = {
environment = "dev"
}
}
```
## Argument Reference
The following arguments are supported:
* `location` -
(Required)
Location of Blockchain Node being created.
* `blockchain_node_id` -
(Required)
ID of the requesting object.
- - -
* `labels` -
(Optional)
User-provided key-value pairs
**Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field `effective_labels` for all of the labels present on the resource.
* `ethereum_details` -
(Optional)
User-provided key-value pairs
Structure is [documented below](#nested_ethereum_details).
* `blockchain_type` -
(Optional)
User-provided key-value pairs
Possible values are: `ETHEREUM`.
* `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_ethereum_details"></a>The `ethereum_details` block supports:
* `validator_config` -
(Optional)
Configuration for validator-related parameters on the beacon client, and for any managed validator client.
Structure is [documented below](#nested_validator_config).
* `geth_details` -
(Optional)
User-provided key-value pairs
Structure is [documented below](#nested_geth_details).
* `additional_endpoints` -
(Output)
User-provided key-value pairs
Structure is [documented below](#nested_additional_endpoints).
* `network` -
(Optional)
The Ethereum environment being accessed.
Possible values are: `MAINNET`, `TESTNET_GOERLI_PRATER`, `TESTNET_SEPOLIA`.
* `node_type` -
(Optional)
The type of Ethereum node.
Possible values are: `LIGHT`, `FULL`, `ARCHIVE`.
* `execution_client` -
(Optional)
The execution client
Possible values are: `EXECUTION_CLIENT_UNSPECIFIED`, `GETH`, `ERIGON`.
* `consensus_client` -
(Optional)
The consensus client
Possible values are: `CONSENSUS_CLIENT_UNSPECIFIED`, `LIGHTHOUSE`.
* `api_enable_admin` -
(Optional)
Enables JSON-RPC access to functions in the admin namespace. Defaults to false.
* `api_enable_debug` -
(Optional)
Enables JSON-RPC access to functions in the debug namespace. Defaults to false.
<a name="nested_validator_config"></a>The `validator_config` block supports:
* `mev_relay_urls` -
(Optional)
URLs for MEV-relay services to use for block building. When set, a managed MEV-boost service is configured on the beacon client.
<a name="nested_geth_details"></a>The `geth_details` block supports:
* `garbage_collection_mode` -
(Optional)
Blockchain garbage collection modes. Only applicable when NodeType is FULL or ARCHIVE.
Possible values are: `FULL`, `ARCHIVE`.
<a name="nested_additional_endpoints"></a>The `additional_endpoints` block contains:
* `beacon_api_endpoint` -
(Output)
The assigned URL for the node's Beacon API endpoint.
* `beacon_prometheus_metrics_api_endpoint` -
(Output)
The assigned URL for the node's Beacon Prometheus metrics endpoint.
* `execution_client_prometheus_metrics_api_endpoint` -
(Output)
The assigned URL for the node's execution client's Prometheus metrics endpoint.
## 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}}/locations/{{location}}/blockchainNodes/{{blockchain_node_id}}`
* `name` -
The fully qualified name of the blockchain node. e.g. projects/my-project/locations/us-central1/blockchainNodes/my-node.
* `create_time` -
The timestamp at which the blockchain node was first created.
* `update_time` -
The timestamp at which the blockchain node was last updated.
* `connection_info` -
The connection information through which to interact with a blockchain node.
Structure is [documented below](#nested_connection_info).
* `terraform_labels` -
The combination of labels configured directly on the resource
and default labels configured on the provider.
* `effective_labels` -
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.
<a name="nested_connection_info"></a>The `connection_info` block contains:
* `service_attachment` -
(Output)
A service attachment that exposes a node, and has the following format: projects/{project}/regions/{region}/serviceAttachments/{service_attachment_name}
* `endpoint_info` -
(Output)
The endpoint information through which to interact with a blockchain node.
Structure is [documented below](#nested_endpoint_info).
<a name="nested_endpoint_info"></a>The `endpoint_info` block contains:
* `json_rpc_api_endpoint` -
(Output)
The assigned URL for the node JSON-RPC API endpoint.
* `websockets_api_endpoint` -
(Output)
The assigned URL for the node WebSockets API endpoint.
## Timeouts
This resource provides the following
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options:
- `create` - Default is 45 minutes.
- `update` - Default is 20 minutes.
- `delete` - Default is 35 minutes.
## Import
BlockchainNodes can be imported using any of these accepted formats:
* `projects/{{project}}/locations/{{location}}/blockchainNodes/{{blockchain_node_id}}`
* `{{project}}/{{location}}/{{blockchain_node_id}}`
* `{{location}}/{{blockchain_node_id}}`
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import BlockchainNodes using one of the formats above. For example:
```tf
import {
id = "projects/{{project}}/locations/{{location}}/blockchainNodes/{{blockchain_node_id}}"
to = google_blockchain_node_engine_blockchain_nodes.default
}
```
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), BlockchainNodes can be imported using one of the formats above. For example:
```
$ terraform import google_blockchain_node_engine_blockchain_nodes.default projects/{{project}}/locations/{{location}}/blockchainNodes/{{blockchain_node_id}}
$ terraform import google_blockchain_node_engine_blockchain_nodes.default {{project}}/{{location}}/{{blockchain_node_id}}
$ terraform import google_blockchain_node_engine_blockchain_nodes.default {{location}}/{{blockchain_node_id}}
```
## User Project Overrides
This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override).