-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
128 changed files
with
6,839 additions
and
0 deletions.
There are no files selected for viewing
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,41 @@ | ||
# Terraform Provider release workflow. | ||
name: Release | ||
|
||
# This GitHub action creates a release when a tag that matches the pattern | ||
# "v*" (e.g. v0.1.0) is created. | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
# Releases need permissions to read and write the repository contents. | ||
# GitHub considers creating releases and uploading assets as writing contents. | ||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
# Allow goreleaser to access older tag information. | ||
fetch-depth: 0 | ||
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache: true | ||
- name: Import GPG key | ||
uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # v6.0.0 | ||
id: import_gpg | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.PASSPHRASE }} | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0 | ||
with: | ||
args: release --clean | ||
env: | ||
# GitHub sets the GITHUB_TOKEN secret automatically. | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} |
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,81 @@ | ||
# Terraform Provider testing workflow. | ||
name: Tests | ||
|
||
# This GitHub action runs your tests for each pull request and push. | ||
# Optionally, you can turn it on using a schedule for regular testing. | ||
on: | ||
pull_request: | ||
paths-ignore: | ||
- 'README.md' | ||
push: | ||
paths-ignore: | ||
- 'README.md' | ||
|
||
# Testing only needs permissions to read the repository contents. | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
# Ensure project builds before running testing matrix | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache: true | ||
- run: go mod download | ||
- run: go build -v . | ||
- name: Run linters | ||
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0 | ||
with: | ||
version: latest | ||
|
||
generate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | ||
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 CLI versions | ||
test: | ||
name: Terraform Provider Acceptance Tests | ||
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.*' | ||
- '1.2.*' | ||
- '1.3.*' | ||
- '1.4.*' | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache: true | ||
- uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3 | ||
with: | ||
terraform_version: ${{ matrix.terraform }} | ||
terraform_wrapper: false | ||
- run: go mod download | ||
- env: | ||
TF_ACC: "1" | ||
run: go test -v -cover ./internal/provider/ | ||
timeout-minutes: 10 |
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,10 @@ | ||
*.dll | ||
*.exe | ||
.DS_Store | ||
example.tf | ||
terraform.tfplan | ||
terraform.tfstate | ||
bin/ | ||
dist/ | ||
|
||
.env |
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,27 @@ | ||
# Visit https://golangci-lint.run/ for usage documentation | ||
# and information on other useful linters | ||
issues: | ||
max-per-linter: 0 | ||
max-same-issues: 0 | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- durationcheck | ||
- errcheck | ||
- exportloopref | ||
- forcetypeassert | ||
- godot | ||
- gofmt | ||
- gosimple | ||
- ineffassign | ||
- makezero | ||
- misspell | ||
- nilerr | ||
- predeclared | ||
- staticcheck | ||
- tenv | ||
- unconvert | ||
- unparam | ||
- unused | ||
- vet |
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,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 |
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,2 @@ | ||
provider-test: | ||
TF_ACC=a go test ./... |
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,61 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "bluechip_cidr Data Source - terraform-provider-bluechip" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# bluechip_cidr (Data Source) | ||
|
||
|
||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Optional | ||
|
||
- `metadata` (Block List) (see [below for nested schema](#nestedblock--metadata)) | ||
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
- `spec` (List of Object) (see [below for nested schema](#nestedatt--spec)) | ||
|
||
<a id="nestedblock--metadata"></a> | ||
### Nested Schema for `metadata` | ||
|
||
Required: | ||
|
||
- `name` (String) Name is the name of the resource. | ||
- `namespace` (String) Namespace is the namespace of the resource. | ||
|
||
Optional: | ||
|
||
- `annotations` (Map of String) Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. | ||
- `labels` (Map of String) Labels are key value pairs that may be used to scope and select individual resources. They are not queryable and should be preserved when modifying objects. | ||
|
||
Read-Only: | ||
|
||
- `creation_timestamp` (String) CreationTimestamp is a timestamp representing the server time when this object was created. | ||
- `update_timestamp` (String) UpdateTimestamp is a timestamp representing the server time when this object was last updated. | ||
|
||
|
||
<a id="nestedblock--timeouts"></a> | ||
### Nested Schema for `timeouts` | ||
|
||
Optional: | ||
|
||
- `default` (String) | ||
|
||
|
||
<a id="nestedatt--spec"></a> | ||
### Nested Schema for `spec` | ||
|
||
Read-Only: | ||
|
||
- `ipv4_cidrs` (Set of String) | ||
- `ipv6_cidrs` (Set of String) |
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,96 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "bluechip_cluster Data Source - terraform-provider-bluechip" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# bluechip_cluster (Data Source) | ||
|
||
|
||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Optional | ||
|
||
- `metadata` (Block List) (see [below for nested schema](#nestedblock--metadata)) | ||
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
- `spec` (List of Object) (see [below for nested schema](#nestedatt--spec)) | ||
|
||
<a id="nestedblock--metadata"></a> | ||
### Nested Schema for `metadata` | ||
|
||
Required: | ||
|
||
- `name` (String) Name is the name of the resource. | ||
- `namespace` (String) Namespace is the namespace of the resource. | ||
|
||
Optional: | ||
|
||
- `annotations` (Map of String) Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. | ||
- `labels` (Map of String) Labels are key value pairs that may be used to scope and select individual resources. They are not queryable and should be preserved when modifying objects. | ||
|
||
Read-Only: | ||
|
||
- `creation_timestamp` (String) CreationTimestamp is a timestamp representing the server time when this object was created. | ||
- `update_timestamp` (String) UpdateTimestamp is a timestamp representing the server time when this object was last updated. | ||
|
||
|
||
<a id="nestedblock--timeouts"></a> | ||
### Nested Schema for `timeouts` | ||
|
||
Optional: | ||
|
||
- `default` (String) | ||
|
||
|
||
<a id="nestedatt--spec"></a> | ||
### Nested Schema for `spec` | ||
|
||
Read-Only: | ||
|
||
- `environment` (String) | ||
- `kubernetes` (List of Object) (see [below for nested schema](#nestedobjatt--spec--kubernetes)) | ||
- `organization_unit` (String) | ||
- `platform` (String) | ||
- `project` (String) | ||
- `pubg` (List of Object) (see [below for nested schema](#nestedobjatt--spec--pubg)) | ||
- `vendor` (List of Object) (see [below for nested schema](#nestedobjatt--spec--vendor)) | ||
|
||
<a id="nestedobjatt--spec--kubernetes"></a> | ||
### Nested Schema for `spec.kubernetes` | ||
|
||
Read-Only: | ||
|
||
- `ca_cert` (String) | ||
- `endpoint` (String) | ||
- `sa_issuer` (String) | ||
- `version` (String) | ||
|
||
|
||
<a id="nestedobjatt--spec--pubg"></a> | ||
### Nested Schema for `spec.pubg` | ||
|
||
Read-Only: | ||
|
||
- `infra` (String) | ||
- `site` (String) | ||
|
||
|
||
<a id="nestedobjatt--spec--vendor"></a> | ||
### Nested Schema for `spec.vendor` | ||
|
||
Read-Only: | ||
|
||
- `account_id` (String) | ||
- `engine` (String) | ||
- `name` (String) | ||
- `region` (String) |
Oops, something went wrong.