Skip to content

Commit 0d2f780

Browse files
authored
Merge pull request #8 from delphix-integrations/develop
Merge Develop Into Main - New Provider !!!
2 parents 5b6d0e1 + 69d4055 commit 0d2f780

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+3429
-2236
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: '"[DATE] [BUG]"'
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
** Expected Behavior**
11+
Describe what should have happened.
12+
13+
** Actual Behavior**
14+
Describe what actually happened.
15+
16+
**Steps To Reproduce the Problem**
17+
Describe in as much detail as possible how to reproduce the problem.
18+
19+
Steps to reproduce the behavior:
20+
1. Go to '...'
21+
2. Click on '....'
22+
3. Scroll down to '....'
23+
4. See error
24+
25+
**Screenshots**
26+
If applicable, add screenshots to help explain your problem.
27+
28+
**Version**
29+
Indicate the relevant versions of components. This may include the package version, operating system version, or other components relevant to the project.
30+
31+
**Additional Context**
32+
Add any other context about the problem here, including additional logs or debugging information if appropriate.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: '"[DATE]: [FEATURE NAME]"'
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is and why it is important. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen / how you might solve this problem.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any existing workarounds, alternative solutions or features you've considered, and why you think your solution is preferable.
18+
19+
20+
**Additional context**
21+
Add any other context or screenshots about the feature request here.

.github/workflows/codeql.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# CodeQL configuration for the dxi-terraform-provider repo
2+
name: "CodeQL"
3+
4+
on:
5+
push:
6+
branches: [ main, develop ]
7+
pull_request:
8+
branches: [ develop ]
9+
10+
jobs:
11+
analyze:
12+
name: Analyze
13+
runs-on: ubuntu-latest
14+
permissions:
15+
actions: read
16+
contents: read
17+
security-events: write
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
language: [ 'go' ]
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v2
27+
28+
- uses: actions/setup-go@v2
29+
with:
30+
go-version: '^1.17.7'
31+
32+
# Initializes the CodeQL tools for scanning.
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@v1
35+
with:
36+
languages: ${{ matrix.language }}
37+
queries: +security-and-quality
38+
39+
40+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
41+
# If this step fails, then you should remove it and run the build manually (see below)
42+
- name: Autobuild
43+
uses: github/codeql-action/autobuild@v1
44+
45+
# ℹ️ Command-line programs to run using the OS shell.
46+
# 📚
47+
48+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
49+
# and modify them (or add more) to build your code if your project
50+
# uses a compiled language
51+
52+
#- run: |
53+
# make bootstrap
54+
# make release
55+
56+
- name: Perform CodeQL Analysis
57+
uses: github/codeql-action/analyze@v1

.github/workflows/release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This GitHub action can publish assets for release when a tag is created.
2+
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
3+
#
4+
# This uses an action (hashicorp/ghaction-import-gpg) that assumes you set your
5+
# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `PASSPHRASE`
6+
# secret. If you would rather own your own GPG handling, please fork this action
7+
# or use an alternative one for key handling.
8+
#
9+
# You will need to pass the `--batch` flag to `gpg` in your signing step
10+
# in `goreleaser` to indicate this is being used in a non-interactive mode.
11+
#
12+
name: release
13+
on:
14+
push:
15+
tags:
16+
- 'v*'
17+
jobs:
18+
goreleaser:
19+
runs-on: ubuntu-latest
20+
steps:
21+
-
22+
name: Checkout
23+
uses: actions/checkout@v3
24+
-
25+
name: Unshallow
26+
run: git fetch --prune --unshallow
27+
-
28+
name: Set up Go
29+
uses: actions/setup-go@v2
30+
with:
31+
go-version: 1.16
32+
-
33+
name: Import GPG key
34+
id: import_gpg
35+
uses: hashicorp/ghaction-import-gpg@v2.1.0
36+
env:
37+
# These secrets will need to be configured for the repository:
38+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
39+
PASSPHRASE: ${{ secrets.PASSPHRASE }}
40+
-
41+
name: Run GoReleaser
42+
uses: goreleaser/goreleaser-action@v2.9.1
43+
with:
44+
version: latest
45+
args: release --rm-dist
46+
env:
47+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
48+
# GitHub sets this automatically
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,39 @@
1+
*.dll
2+
*.exe
3+
.DS_Store
4+
example.tf
5+
terraform.tfplan
6+
terraform.tfstate
7+
bin/
8+
dist/
9+
modules-dev/
10+
/pkg/
11+
website/.vagrant
12+
website/.bundle
13+
website/build
14+
website/node_modules
15+
.vagrant/
16+
*.backup
17+
./*.tfstate
18+
.terraform/
19+
*.log
20+
*.bak
21+
*~
22+
.*.swp
123
.idea
2-
backups
324
*.iml
4-
terraform-provider-delphix
5-
build_instructions.txt
6-
code_snippets.sh
25+
*.test
26+
*.iml
27+
*.terraform.lock.hcl
28+
website/vendor
29+
30+
# Test exclusions
31+
!command/test-fixtures/**/*.tfstate
32+
!command/test-fixtures/**/.terraform/
33+
34+
# Keep windows files with windows line endings
35+
*.winfile eol=crlf
36+
37+
# examples executions
38+
./examples/environment/*.terraform*
39+
./examples/vdb/*.terraform*

.goreleaser.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Visit https://goreleaser.com for documentation on how to customize this
2+
# behavior.
3+
env:
4+
- PROVIDER_VERSION=1.0-beta
5+
before:
6+
hooks:
7+
# this is just an example and not a requirement for provider building/publishing
8+
- go mod tidy
9+
snapshot:
10+
name_template: '{{ .Env.PROVIDER_VERSION }}'
11+
builds:
12+
- env:
13+
# goreleaser does not work with CGO, it could also complicate
14+
# usage by users in CI/CD systems like Terraform Cloud where
15+
# they are unable to install libraries.
16+
- CGO_ENABLED=0
17+
mod_timestamp: '{{ .CommitTimestamp }}'
18+
flags:
19+
- -trimpath
20+
ldflags:
21+
- '-s -w -X main.version={{.Env.PROVIDER_VERSION}} -X main.commit={{.Commit}}'
22+
goos:
23+
- freebsd
24+
- windows
25+
- linux
26+
- darwin
27+
goarch:
28+
- amd64
29+
- '386'
30+
- arm
31+
- arm64
32+
ignore:
33+
- goos: darwin
34+
goarch: '386'
35+
binary: terraform-provider-delphix
36+
hooks:
37+
post:
38+
- cmd: ./dev_copy.sh
39+
env:
40+
- CP_PATH={{ .Path }}
41+
- CP_TARGET={{ .Target }}
42+
- CP_VERSION={{ .Env.PROVIDER_VERSION }}
43+
archives:
44+
- format: zip
45+
name_template: '{{ .ProjectName }}_{{ .Env.PROVIDER_VERSION }}_{{ .Os }}_{{ .Arch }}'
46+
checksum:
47+
extra_files:
48+
- glob: 'terraform-registry-manifest.json'
49+
name_template: '{{ .ProjectName }}_{{ .Env.PROVIDER_VERSION }}_manifest.json'
50+
name_template: '{{ .ProjectName }}_{{ .Env.PROVIDER_VERSION }}_SHA256SUMS'
51+
algorithm: sha256
52+
release:
53+
extra_files:
54+
- glob: 'terraform-registry-manifest.json'
55+
name_template: '{{ .ProjectName }}_{{ .Env.PROVIDER_VERSION }}_manifest.json'
56+
# If you want to manually examine the release before its live, uncomment this line:
57+
# draft: true
58+
changelog:
59+
skip: true

CODE_OF_CONDUCT.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Delphix Code of Conduct
2+
## Our Pledge
3+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
4+
5+
## Our Standards
6+
Examples of behavior that contributes to creating a positive environment include:
7+
8+
* Using welcoming and inclusive language
9+
* Being respectful of differing viewpoints and experiences
10+
* Gracefully accepting constructive criticism
11+
* Focusing on what is best for the community
12+
* Showing empathy towards other community members
13+
14+
Examples of unacceptable behavior by participants include:
15+
16+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
17+
* Trolling, insulting/derogatory comments, and personal or political attacks
18+
* Public or private harassment
19+
* Publishing others’ private information, such as a physical or electronic address, without explicit permission
20+
* Other conduct which could reasonably be considered inappropriate in a professional setting
21+
22+
## Our Responsibilities
23+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
24+
25+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
26+
27+
## Scope
28+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
29+
30+
## Enforcement
31+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting Delphix at open-source@delphix.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
32+
33+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project’s leadership.
34+
35+
## Attribution
36+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 1.4, available at contributor-convenant.org
37+
38+
39+
Copyright (c) 2019 by Delphix

CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Contributing
2+
1. Fork the project.
3+
1. Make your bug fix or new feature.
4+
1. Add tests for your code.
5+
1. Send a pull request.
6+
7+
Contributions must be signed as `User Name <user@email.com>`. Make sure to [set up Git with user name and email address](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup). Bug fixes should branch from the current stable branch. New features should be based on the release branch.
8+
9+
## Contributor Agreement
10+
All contributors are required to sign the Delphix Contributor agreement prior to contributing code to an open source repository. This process is handled automatically by [cla-assistant](https://cla-assistant.io/). Simply open a pull request and a bot will automatically check to see if you have signed the latest agreement. If not, you will be prompted to do so as part of the pull request process.
11+
12+
## Code of Conduct
13+
This project operates under the Delphix Code of Conduct. By participating in this project you agree to abide by its terms.

GNUmakefile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
TEST?=$$(go list ./... | grep -v 'vendor')
2+
HOSTNAME=delphix.com
3+
NAMESPACE=dct
4+
NAME=delphix
5+
BINARY=terraform-provider-${NAME}
6+
VERSION=1.0-beta
7+
OS_ARCH=darwin_amd64
8+
9+
default: install
10+
11+
build:
12+
go build -o ${BINARY}
13+
14+
release:
15+
GOOS=darwin GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_darwin_amd64
16+
GOOS=freebsd GOARCH=386 go build -o ./bin/${BINARY}_${VERSION}_freebsd_386
17+
GOOS=freebsd GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_freebsd_amd64
18+
GOOS=freebsd GOARCH=arm go build -o ./bin/${BINARY}_${VERSION}_freebsd_arm
19+
GOOS=linux GOARCH=386 go build -o ./bin/${BINARY}_${VERSION}_linux_386
20+
GOOS=linux GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_linux_amd64
21+
GOOS=linux GOARCH=arm go build -o ./bin/${BINARY}_${VERSION}_linux_arm
22+
GOOS=openbsd GOARCH=386 go build -o ./bin/${BINARY}_${VERSION}_openbsd_386
23+
GOOS=openbsd GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_openbsd_amd64
24+
GOOS=solaris GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_solaris_amd64
25+
GOOS=windows GOARCH=386 go build -o ./bin/${BINARY}_${VERSION}_windows_386
26+
GOOS=windows GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_windows_amd64
27+
28+
install: build
29+
mkdir -p ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/${VERSION}/${OS_ARCH}
30+
mv ${BINARY} ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/${VERSION}/${OS_ARCH}
31+
32+
test:
33+
go test -i $(TEST) || exit 1
34+
echo $(TEST) | xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4
35+
36+
testacc:
37+
TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m

0 commit comments

Comments
 (0)