Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ferranbt/terraform-provider-ethereum

A terraform provider for Ethereum resources
https://github.com/ferranbt/terraform-provider-ethereum

Last synced: 10 days ago
JSON representation

A terraform provider for Ethereum resources

Awesome Lists containing this project

README

        

# Ethereum Terraform Provider

The [Ethereum provider](https://github.com/ferranbt/terraform-provider-ethereum) allows [Terraform](https://terraform.io) to manage [Ethereum](https://ethereum.org/en/) resources.

## Examples

Create the provider:

```hcl
provider "ethereum" {}
```

Send a transaction:

```hcl
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:

```hcl
resource "ethereum_contract_deployment" "contract" {
signer = data.ethereum_eoa.account.signer

artifact = "../package/artifacts:Proxy"

input = [
"0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5"
]
}
```

Query the blockchain:

```hcl
data "ethereum_block" "latest" {
tag = "latest"
}
```

Query a dns name:

```hcl
data "ethereum_ens" "resolve" {
name = "arachnid.eth"
}
```