Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
callensm committed Aug 30, 2021
0 parents commit 4f68bad
Show file tree
Hide file tree
Showing 21 changed files with 1,357 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.go]
indent_size = 4

[*.yaml]
indent_size = 2
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @callensm
30 changes: 30 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: release
on:
push:
tags:
- "v*"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- run: git fetch --prune --unshallow
- name: Setup Go
uses: actions/[email protected]
with:
go-version: 1.16
- name: Import GPG Key
id: import_gpg
uses: hashicorp/[email protected]
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}
- name: GoReleaser
uses: goreleaser/[email protected]
with:
version: latest
args: release --rm-dist
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
vendor/
43 changes: 43 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- '-s -w -X main.version={{ .Version }} -X main.commit={{ .Commit }}'
goos:
- freebsd
- windows
- linux
- darwin
goarch:
- amd64
- '386'
- arm
- arm64
ignore:
- goos: darwin
goarch: '386'
binary: '{{ .ProjectName }}_v{{ .Version }}'
archives:
- format: zip
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
checksum:
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
algorithm: sha256
signs:
- artifacts: checksum
args:
- '--batch'
- '--local-user'
- '{{ .Env.GPG_FINGERPRINT }}'
- '--output'
- '${signature}'
- '--detach-sign'
- '${artifact}'
changelog:
skip: true
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Matthew Callens

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
clean:
rm -rf vendor/

test: vendor
TF_ACC=1 go test -v ./solana/...

vendor: clean
go mod tidy && go mod vendor

.PHONY: clean test vendor
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Terraform Solana Provider
33 changes: 33 additions & 0 deletions docs/data-sources/account_info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "solana_account_info Data Source - terraform-provider-solana"
subcategory: ""
description: |-
---

# solana_account_info (Data Source)





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

### Required

- **public_key** (String) Base-58 encoded public key of the account to query

### Optional

- **id** (String) The ID of this resource.

### Read-Only

- **executable** (Boolean) Indicates whether the account contains a program
- **lamports** (Number) Number of lamports assigned to the account
- **owner** (String) Base-58 encoded public key of the program the account is assigned to
- **rent_epoch** (Number) The epoch at which this account will next owe rent


30 changes: 30 additions & 0 deletions docs/data-sources/balance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "solana_balance Data Source - terraform-provider-solana"
subcategory: ""
description: |-
---

# solana_balance (Data Source)





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

### Required

- **public_key** (String) Base-58 encoded public key of the account to query

### Optional

- **id** (String) The ID of this resource.

### Read-Only

- **balance** (Number) The balance of the queried account


20 changes: 20 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "solana Provider"
subcategory: ""
description: |-
---

# solana Provider





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

### Required

- **endpoint** (String) The RPC endpoint for the target Solana cluster
10 changes: 10 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module github.com/callensm/terraform-provider-solana

go 1.16

require (
github.com/gagliardetto/solana-go v1.0.0
github.com/hashicorp/terraform-plugin-docs v0.4.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.7.0
github.com/stretchr/testify v1.7.0
)
Loading

0 comments on commit 4f68bad

Please sign in to comment.