The Ethereum provider allows Terraform to manage Ethereum resources.
Create the provider:
provider "ethereum" {}
Send a transaction:
data "ethereum_eoa" "account" {
mnemonic = "test test test test test test test test test test test junk"
}
resource "ethereum_transaction" "example" {
signer = data.ethereum_eoa.account.signer
to = "0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5"
value = 100
}
Deploy a contract:
resource "ethereum_contract_deployment" "contract" {
signer = data.ethereum_eoa.account.signer
artifact = "../package/artifacts:Proxy"
input = [
"0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5"
]
}
Query the blockchain:
data "ethereum_block" "latest" {
tag = "latest"
}
Query a dns name:
data "ethereum_ens" "resolve" {
name = "arachnid.eth"
}