Skip to content

Commit

Permalink
add update documentation and example
Browse files Browse the repository at this point in the history
  • Loading branch information
callensm committed Dec 31, 2021
1 parent 3ea0088 commit 2d8abe5
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 34 deletions.
59 changes: 59 additions & 0 deletions docs/resources/keypair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "solana_keypair Resource - terraform-provider-solana"
subcategory: ""
description: |-
Genereate a random or grinded keypair compatible with the solana-keygen CLI.
---

# solana_keypair (Resource)

Genereate a random or grinded keypair compatible with the `solana-keygen` CLI.

## Example Usage

```terraform
# Random Keypair
resource "solana_keypair" "key" {
output_path = "${path.module}/id.json"
random = true
}
# Grind Keypair
resource "solana_keypair" "key" {
output_path = "${path.module}/id.json"
grind {
prefix = "abc"
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- **output_path** (String) The file path to output the keypair into.

### Optional

- **grind** (Block Set, Max: 1) The grind options for the new keypair. (see [below for nested schema](#nestedblock--grind))
- **id** (String) The ID of this resource.
- **random** (Boolean) Whether to generate a random new keypair.

### Read-Only

- **private_key** (String, Sensitive) The randomly generated private key.
- **public_key** (String) The randomly generated public key.

<a id="nestedblock--grind"></a>
### Nested Schema for `grind`

Optional:

- **prefix** (String) The desired prefix of the public key.
- **suffix** (String) The desired suffix of the public key.
- **threads** (Number) The number of threads to grind for the keypair (between 1-15).


32 changes: 0 additions & 32 deletions docs/resources/random_keypair.md

This file was deleted.

14 changes: 14 additions & 0 deletions examples/resources/solana_keypair/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Random Keypair
resource "solana_keypair" "key" {
output_path = "${path.module}/id.json"
random = true
}

# Grind Keypair
resource "solana_keypair" "key" {
output_path = "${path.module}/id.json"

grind {
prefix = "abc"
}
}
2 changes: 0 additions & 2 deletions examples/resources/solana_random_keypair/resource.tf

This file was deleted.

0 comments on commit 2d8abe5

Please sign in to comment.