Skip to content

Commit 09b39a9

Browse files
committed
feat: Add provider
1 parent 79f6cf6 commit 09b39a9

File tree

26 files changed

+2290
-0
lines changed

26 files changed

+2290
-0
lines changed

Diff for: .github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @hashicorp/terraform-provider-devex

Diff for: .github/CODE_OF_CONDUCT.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Code of Conduct
2+
3+
HashiCorp Community Guidelines apply to you when interacting with the community here on GitHub and contributing code.
4+
5+
Please read the full text at https://www.hashicorp.com/community-guidelines

Diff for: .github/ISSUE_TEMPLATE.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
Hi there,
2+
3+
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
4+
5+
### Terraform Version
6+
Run `terraform -v` to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.
7+
8+
### Affected Resource(s)
9+
Please list the resources as a list, for example:
10+
- opc_instance
11+
- opc_storage_volume
12+
13+
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
14+
15+
### Terraform Configuration Files
16+
```hcl
17+
# Copy-paste your Terraform configurations here - for large Terraform configs,
18+
# please use a service like Dropbox and share a link to the ZIP file. For
19+
# security, you can also encrypt the files using our GPG public key.
20+
```
21+
22+
### Debug Output
23+
Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.
24+
25+
### Panic Output
26+
If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the `crash.log`.
27+
28+
### Expected Behavior
29+
What should have happened?
30+
31+
### Actual Behavior
32+
What actually happened?
33+
34+
### Steps to Reproduce
35+
Please list the steps required to reproduce the issue, for example:
36+
1. `terraform apply`
37+
38+
### Important Factoids
39+
Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?
40+
41+
### References
42+
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
43+
- GH-1234

Diff for: .github/dependabot.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# See GitHub's docs for more information on this file:
2+
# https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/configuration-options-for-dependency-updates
3+
version: 2
4+
updates:
5+
# Maintain dependencies for GitHub Actions
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
# Check for updates to GitHub Actions every weekday
10+
interval: "daily"
11+
12+
# Maintain dependencies for Go modules
13+
- package-ecosystem: "gomod"
14+
directory: "/"
15+
schedule:
16+
# Check for updates to Go modules every weekday
17+
interval: "daily"

Diff for: .github/workflows/release.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
- name: Checkout
22+
uses: actions/checkout@v3
23+
24+
- name: Unshallow
25+
run: git fetch --prune --unshallow
26+
27+
- name: Set up Go
28+
uses: actions/setup-go@v2
29+
with:
30+
go-version: 1.17
31+
32+
- name: Import GPG key
33+
id: import_gpg
34+
uses: hashicorp/[email protected]
35+
env:
36+
# These secrets will need to be configured for the repository:
37+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
38+
PASSPHRASE: ${{ secrets.PASSPHRASE }}
39+
40+
- name: Run GoReleaser
41+
uses: goreleaser/[email protected]
42+
with:
43+
version: latest
44+
args: release --rm-dist
45+
env:
46+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
47+
# GitHub sets this automatically
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Diff for: .github/workflows/test.yml

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# This GitHub action runs your tests for each commit push and/or PR. Optionally
2+
# you can turn it on using a cron schedule for regular testing.
3+
#
4+
name: Tests
5+
on:
6+
pull_request:
7+
paths-ignore:
8+
- 'README.md'
9+
push:
10+
paths-ignore:
11+
- 'README.md'
12+
13+
jobs:
14+
build:
15+
name: Build
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 5
18+
steps:
19+
20+
- name: Set up Go
21+
uses: actions/[email protected]
22+
with:
23+
go-version: '1.17'
24+
id: go
25+
26+
- name: Check out code into the Go module directory
27+
uses: actions/checkout@v3
28+
29+
- name: Get dependencies
30+
run: |
31+
go mod download
32+
33+
- name: Build
34+
run: |
35+
go build -v .
36+
37+
# run acceptance tests in a matrix with Terraform core versions
38+
test:
39+
name: Matrix Test
40+
needs: build
41+
runs-on: ubuntu-latest
42+
timeout-minutes: 15
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
terraform:
47+
- '1.0.*'
48+
- '1.1.*'
49+
steps:
50+
51+
- name: Set up Go
52+
uses: actions/[email protected]
53+
with:
54+
go-version: '1.17'
55+
id: go
56+
57+
- uses: hashicorp/setup-terraform@v1
58+
with:
59+
terraform_version: ${{ matrix.terraform }}
60+
terraform_wrapper: false
61+
62+
- name: Check out code into the Go module directory
63+
uses: actions/checkout@v3
64+
65+
- name: Get dependencies
66+
run: |
67+
go mod download
68+
69+
- name: TF acceptance tests
70+
timeout-minutes: 10
71+
env:
72+
TF_ACC: "1"
73+
run: |
74+
go test -v -cover ./internal/provider/

Diff for: .gitignore

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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
23+
.idea
24+
*.iml
25+
*.test
26+
*.iml
27+
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

Diff for: .goreleaser.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Visit https://goreleaser.com for documentation on how to customize this
2+
# behavior.
3+
before:
4+
hooks:
5+
# this is just an example and not a requirement for provider building/publishing
6+
- go mod tidy
7+
builds:
8+
- env:
9+
# goreleaser does not work with CGO, it could also complicate
10+
# usage by users in CI/CD systems like Terraform Cloud where
11+
# they are unable to install libraries.
12+
- CGO_ENABLED=0
13+
mod_timestamp: '{{ .CommitTimestamp }}'
14+
flags:
15+
- -trimpath
16+
ldflags:
17+
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
18+
goos:
19+
- freebsd
20+
- windows
21+
- linux
22+
- darwin
23+
goarch:
24+
- amd64
25+
- '386'
26+
- arm
27+
- arm64
28+
ignore:
29+
- goos: darwin
30+
goarch: '386'
31+
binary: '{{ .ProjectName }}_v{{ .Version }}'
32+
archives:
33+
- format: zip
34+
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
35+
checksum:
36+
extra_files:
37+
- glob: 'terraform-registry-manifest.json'
38+
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
39+
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
40+
algorithm: sha256
41+
signs:
42+
- artifacts: checksum
43+
args:
44+
# if you are using this in a GitHub action or some other automated pipeline, you
45+
# need to pass the batch flag to indicate its not interactive.
46+
- "--batch"
47+
- "--local-user"
48+
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
49+
- "--output"
50+
- "${signature}"
51+
- "--detach-sign"
52+
- "${artifact}"
53+
release:
54+
extra_files:
55+
- glob: 'terraform-registry-manifest.json'
56+
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
57+
# If you want to manually examine the release before its live, uncomment this line:
58+
# draft: true
59+
changelog:
60+
skip: true

0 commit comments

Comments
 (0)