-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to latest provider schema SDK (#6)
- Loading branch information
Showing
2,558 changed files
with
673 additions
and
810,180 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: 'Release' | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
jobs: | ||
goreleaser: | ||
runs-on: 'ubuntu-latest' | ||
|
||
steps: | ||
- uses: 'actions/checkout@v3' | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: 'actions/setup-go@v3' | ||
with: | ||
go-version: '1.18' | ||
|
||
- id: import_gpg | ||
uses: 'crazy-max/ghaction-import-gpg@v5.2.0' | ||
with: | ||
gpg_private_key: '${{ secrets.GPG_PRIVATE_KEY }}' | ||
passphrase: '${{ secrets.GPG_PASSPHRASE }}' | ||
|
||
- uses: 'goreleaser/goreleaser-action@v3' | ||
with: | ||
version: 'latest' | ||
args: 'release --rm-dist' | ||
env: | ||
GPG_FINGERPRINT: '${{ steps.import_gpg.outputs.fingerprint }}' | ||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: 'Test' | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
pull_request: | ||
branches: | ||
- 'main' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}' | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
runs-on: 'ubuntu-latest' | ||
|
||
steps: | ||
- uses: 'actions/checkout@v3' | ||
|
||
- uses: 'actions/setup-go@v3' | ||
with: | ||
go-version: '1.18' | ||
|
||
- run: 'go mod download' | ||
|
||
- run: 'make test-acc' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ build/ | |
dist/ | ||
|
||
examples/**/.ssh | ||
examples/**/*.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,60 @@ | ||
before: | ||
hooks: | ||
- go mod tidy | ||
- 'go mod tidy' | ||
|
||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
- 'CGO_ENABLED=0' | ||
- 'GO111MODULE=on' | ||
- 'GOPROXY=https://proxy.golang.org,direct' | ||
mod_timestamp: '{{ .CommitTimestamp }}' | ||
flags: | ||
- -trimpath | ||
- '-a' | ||
- '-trimpath' | ||
ldflags: | ||
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}' | ||
- '-s' | ||
- '-w' | ||
- '-X=main.Version={{ .Version }}' | ||
- '-X=main.Commit={{ .Commit }}' | ||
- '-extldflags=-static' | ||
goos: | ||
- freebsd | ||
- windows | ||
- linux | ||
- darwin | ||
- 'freebsd' | ||
- 'windows' | ||
- 'linux' | ||
- 'darwin' | ||
goarch: | ||
- amd64 | ||
- '386' | ||
- arm | ||
- arm64 | ||
- 'amd64' | ||
- 'arm' | ||
- 'arm64' | ||
ignore: | ||
- goos: darwin | ||
goarch: '386' | ||
binary: '{{ .ProjectName }}_v{{ .Version }}' | ||
|
||
archives: | ||
- format: zip | ||
- format: 'zip' | ||
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}' | ||
|
||
checksum: | ||
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS' | ||
algorithm: sha256 | ||
algorithm: 'sha256' | ||
|
||
signs: | ||
- artifacts: checksum | ||
- artifacts: 'checksum' | ||
args: | ||
# if you are using this is 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: | ||
# Visit your project's GitHub Releases page to publish this release. | ||
draft: true | ||
- '--batch' | ||
- '--local-user' | ||
- '{{ .Env.GPG_FINGERPRINT }}' | ||
- '--output' | ||
- '${signature}' | ||
- '--detach-sign' | ||
- '${artifact}' | ||
|
||
changelog: | ||
skip: true | ||
use: 'github' | ||
sort: 'asc' | ||
|
||
release: | ||
draft: false | ||
mode: 'replace' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,16 @@ | ||
NAME=terraform-provider-filesystem | ||
GOOSES = darwin linux windows | ||
GOARCHES = amd64 | ||
|
||
export GO111MODULE = on | ||
export GOFLAGS = -mod=vendor | ||
|
||
deps: | ||
@go get -mod=" -u -t ./... | ||
@go mod tidy | ||
@go mod vendor | ||
.PHONY: deps | ||
|
||
dev: | ||
@go install ./... | ||
.PHONY: dev | ||
|
||
build: | ||
@rm -rf build/ | ||
@for GOOS in ${GOOSES}; do \ | ||
for GOARCH in ${GOARCHES}; do \ | ||
echo "Building $${GOOS}/$${GOARCH}" ; \ | ||
GOOS=$${GOOS} GOARCH=$${GOARCH} go build \ | ||
-a \ | ||
-ldflags "-s -w -extldflags 'static'" \ | ||
-installsuffix cgo \ | ||
-tags netgo \ | ||
-o build/$${GOOS}_$${GOARCH}/${NAME} \ | ||
. ; \ | ||
done ; \ | ||
done | ||
.PHONY: build | ||
|
||
compress: | ||
@for dir in $$(find build/* -type d); do \ | ||
f=$$(basename $$dir) ; \ | ||
tar -C build -czf build/$$f.tgz $$f ; \ | ||
done | ||
.PHONY: compress | ||
generate: | ||
@rm -rf docs/ | ||
@go generate ./... | ||
.PHONY: generate | ||
|
||
test: | ||
@go test -short -parallel=40 ./... | ||
@go test -count=1 -shuffle=on -short ./... | ||
.PHONY: test | ||
|
||
test-acc: | ||
@go test -parallel=40 -count=1 ./... | ||
@TF_ACC=1 go test -count=1 -shuffle=on -race ./... | ||
.PHONY: test-acc |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: "filesystem Provider" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# filesystem Provider | ||
|
||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
provider "filesystem" {} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "filesystem_file_reader Resource - terraform-provider-filesystem" | ||
subcategory: "" | ||
description: |- | ||
Reads a file on disk as a resource. | ||
--- | ||
|
||
# filesystem_file_reader (Resource) | ||
|
||
Reads a file on disk as a resource. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
// Assume that "file.txt" does not exist at the start of the run. Perhaps | ||
// there's another resource that creates the file as part of the Terraform run. | ||
// As such, `${file("...")}` would not work as it resolves at the start of the | ||
// run. | ||
resource "null_resource" "pretend" { | ||
provisioner "local-exec" { | ||
command = "echo 'hello' > ${path.module}/file.txt" | ||
} | ||
} | ||
resource "filesystem_file_reader" "read" { | ||
path = "${path.module}/file.txt" | ||
depends_on = ["null_resource.pretend"] | ||
} | ||
output "contents" { | ||
value = filesystem_file_reader.read.contents | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `path` (String) Path to read the file on disk | ||
|
||
### Optional | ||
|
||
- `root` (String) Path to the root of the module | ||
|
||
### Read-Only | ||
|
||
- `contents` (String, Sensitive) Raw file contents | ||
- `id` (String) The ID of this resource. | ||
- `mode` (String) File mode bits | ||
- `name` (String) Basename of the file | ||
- `size` (Number) Size of the file in bytes | ||
|
||
|
Oops, something went wrong.