Skip to content

Commit

Permalink
Merge pull request #1 from epierre-wx/master
Browse files Browse the repository at this point in the history
migration to api v2
  • Loading branch information
jgkwallix authored Aug 26, 2021
2 parents 4f41d97 + a77198c commit 52bb28f
Show file tree
Hide file tree
Showing 9 changed files with 792 additions and 4 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This GitHub action can publish assets for release when a tag is created.
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
#
# This uses an action (hashicorp/ghaction-import-gpg) that assumes you set your
# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `PASSPHRASE`
# secret. If you would rather own your own GPG handling, please fork this action
# or use an alternative one for key handling.
#
# You will need to pass the `--batch` flag to `gpg` in your signing step
# in `goreleaser` to indicate this is being used in a non-interactive mode.
#
name: release
on:
push:
tags:
- 'v*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/[email protected]
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
-
name: Import GPG key
id: import_gpg
uses: hashicorp/[email protected]
env:
# These secrets will need to be configured for the repository:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}
-
name: Run GoReleaser
uses: goreleaser/[email protected]
with:
version: latest
args: release --rm-dist
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
# GitHub sets this automatically
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@
main.tf
terraform.tfstate
terraform.tfstate.backup
terraform-provider-waapm
vendor/
dist/
53 changes: 53 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Visit https://goreleaser.com for documentation on how to customize this
# behavior.
before:
hooks:
# this is just an example and not a requirement for provider building/publishing a
- go mod tidy
builds:
- env:
# goreleaser does not work with CGO, it could also complicate
# usage by users in CI/CD systems like Terraform Cloud where
# they are unable to install libraries.
- CGO_ENABLED=0
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
goos:
- 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:
# if you are using this in a GitHub action or some other automated pipeline, you
# need to pass the batch flag to indicate its not interactive.
- "--batch"
- "--local-user"
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
release:
# If you want to manually examine the release before its live, uncomment this line:
# draft: true
changelog:
skip: true
39 changes: 39 additions & 0 deletions docs/data-sources/account.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "waapm_account Data Source - terraform-provider-waapm"
subcategory: ""
description: |-
---

# waapm_account (Data Source)





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

### Required

- **account** (String) account of the secret using target syntax

### Optional

- **application** (String) name of the application
- **bastion** (String) bastion to query
- **checkin** (Boolean) check account in
- **directory** (String) directory for cred and vault files
- **forced_modules** (List of String) forced modules for fingerprint
- **format** (String) requested secret format
- **generations** (Number) number of generations to use for fingerprint
- **id** (String) The ID of this resource.
- **key** (String) type of requested secret
- **modules** (String) use modules for fingerprint

### Read-Only

- **value** (String, Sensitive) value of the secret


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: "waapm Provider"
subcategory: ""
description: |-
---

# waapm Provider





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

### Optional

- **waapm_path** (String) path of waapm executable
13 changes: 13 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module github.com/epierre-wx/terraform-provider-waapm

go 1.13

require (
github.com/fatih/color v1.12.0 // indirect
github.com/hashicorp/terraform-plugin-sdk/v2 v2.7.0
github.com/mitchellh/mapstructure v1.4.1 // indirect
golang.org/x/net v0.0.0-20210505214959-0714010a04ed // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)
Loading

0 comments on commit 52bb28f

Please sign in to comment.