Skip to content

Commit

Permalink
Merge pull request #1 from umich-vci/update
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
adarobin authored Jun 14, 2022
2 parents c4c4251 + da06d84 commit ce58fb6
Show file tree
Hide file tree
Showing 23 changed files with 1,087 additions and 362 deletions.
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# See GitHub's docs for more information on this file:
# https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"

# Maintain dependencies for Go modules
- package-ecosystem: "gomod"
directory: "/"
schedule:
# Check for updates to Go modules every weekday
interval: "daily"
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/checkout@v3
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
cache: true
-
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 }}
103 changes: 103 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# This GitHub action runs your tests for each commit push and/or PR. Optionally
# you can turn it on using a cron schedule for regular testing.
#
name: Tests
on:
pull_request:
paths-ignore:
- 'README.md'
push:
paths-ignore:
- 'README.md'
# For systems with an upstream API that could drift unexpectedly (like most SaaS systems, etc.),
# we recommend testing at a regular interval not necessarily tied to code changes. This will
# ensure you are alerted to something breaking due to an API change, even if the code did not
# change.
# schedule:
# - cron: '0 13 * * *'
jobs:
# ensure the code builds...
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
cache: true
id: go

- name: Get dependencies
run: |
go mod download
- name: Build
run: |
go build -v .
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
cache: true
- run: go generate ./...
- name: git diff
run: |
git diff --compact-summary --exit-code || \
(echo; echo "Unexpected difference in directories after code generation. Run 'go generate ./...' command and commit."; exit 1)
# run acceptance tests in a matrix with Terraform core versions
test:
name: Matrix Test
needs: build
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
# list whatever Terraform versions here you would like to support
terraform:
- '1.0.*'
- '1.1.*'
steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
cache: true
id: go

- uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false

- name: Get dependencies
run: |
go mod download
- name: TF acceptance tests
timeout-minutes: 10
env:
TF_ACC: "1"

# Set whatever additional acceptance test env vars here. You can
# optionally use data from your repository secrets using the
# following syntax:
# SOME_VAR: ${{ secrets.SOME_VAR }}

run: |
go test -v -cover ./internal/provider/
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
*.dll
*.exe
.DS_Store
example.tf
terraform.tfplan
terraform.tfstate
bin/
dist/
modules-dev/
/pkg/
website/.vagrant
website/.bundle
website/build
website/node_modules
.vagrant/
*.backup
./*.tfstate
.terraform/
*.log
*.bak
*~
.*.swp
.idea
*.iml
*.test
*.iml

website/vendor

# Test exclusions
!command/test-fixtures/**/*.tfstate
!command/test-fixtures/**/.terraform/

# Keep windows files with windows line endings
*.winfile eol=crlf
60 changes: 60 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# 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
- 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:
- 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:
extra_files:
- glob: 'terraform-registry-manifest.json'
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
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:
extra_files:
- glob: 'terraform-registry-manifest.json'
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
# If you want to manually examine the release before its live, uncomment this line:
# draft: true
changelog:
skip: true
33 changes: 33 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Acceptance Tests",
"type": "go",
"request": "launch",
"mode": "test",
// this assumes your workspace is the root of the repo
"program": "${fileDirname}",
"env": {
"TF_ACC": "1",
},
"args": [],
},
{
"name": "Debug - Attach External CLI",
"type": "go",
"request": "launch",
"mode": "debug",
// this assumes your workspace is the root of the repo
"program": "${workspaceFolder}",
"env": {},
"args": [
// pass the debug flag for reattaching
"-debug",
],
}
]
}
6 changes: 6 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
default: testacc

# Run acceptance tests
.PHONY: testacc
testacc:
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m
80 changes: 80 additions & 0 deletions docs/data-sources/client.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "spoc_client Data Source - terraform-provider-spoc"
subcategory: ""
description: |-
---

# spoc_client (Data Source)



## Example Usage

```terraform
data "spoc_client" "example_client" {
name = "exampleclient"
server_name = "backupserver"
}
```

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

### Required

- `name` (String)
- `server_name` (String)

### Read-Only

- `at_risk` (Boolean)
- `authentication` (String)
- `contact` (String)
- `decommissioned` (Boolean)
- `deduplication` (String)
- `domain` (String)
- `email` (String)
- `filespaces` (Set of Object) (see [below for nested schema](#nestedatt--filespaces))
- `guid` (String)
- `id` (String) The ID of this resource.
- `link` (String)
- `locked` (Boolean)
- `option_set` (String)
- `platform` (String)
- `schedules` (Set of Object) (see [below for nested schema](#nestedatt--schedules))
- `session_initiation` (String)
- `split_large_objects` (Boolean)
- `ssl_required` (String)
- `type` (Number)
- `version` (Number)
- `vm_owner` (String)
- `vm_type` (Number)

<a id="nestedatt--filespaces"></a>
### Nested Schema for `filespaces`

Read-Only:

- `fs_copy_pool` (Number)
- `fs_logical_mb` (Number)
- `fs_num_files` (Number)
- `fs_type` (String)
- `id` (Number)
- `link` (String)
- `name` (String)


<a id="nestedatt--schedules"></a>
### Nested Schema for `schedules`

Read-Only:

- `domain_name` (String)
- `run_time` (Number)
- `schedule_name` (String)
- `server_name` (String)
- `start_time` (String)


Loading

0 comments on commit ce58fb6

Please sign in to comment.