Skip to content

Fix CI Suite, support circleci stanza, other fixes #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Apr 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- uses: actions/checkout@v4.2.2
with:
# Allow goreleaser to access older tag information.
fetch-depth: 0
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
- uses: actions/setup-go@v5.3.0
with:
go-version-file: 'go.mod'
cache: true
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@d6f3f49f3345e29369fe57596a3ca8f94c4d2ca7 # v5.4.0
uses: crazy-max/ghaction-import-gpg@v6.2.0
id: import_gpg
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@5fdedb94abba051217030cc86d4523cf3f02243d # v4.6.0
uses: goreleaser/goreleaser-action@v6.2.1
with:
args: release --clean
env:
Expand Down
26 changes: 17 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,34 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
- uses: actions/checkout@v4.2.2
- uses: actions/setup-go@v5.3.0
with:
go-version-file: "go.mod"
cache: true
- uses: hashicorp/[email protected]
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
- run: go mod download
- run: go build -v .
- name: Run linters
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
uses: golangci/golangci-lint-action@v6.5.0
with:
version: latest

generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
- uses: actions/checkout@v4.2.2
- uses: actions/setup-go@v5.3.0
with:
go-version-file: "go.mod"
cache: true
- uses: hashicorp/[email protected]
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
- run: go generate ./...
- name: git diff
run: |
Expand All @@ -61,14 +69,14 @@ jobs:
matrix:
# list whatever Terraform versions here you would like to support
terraform:
- "1.4.*"
- "1.10.*"
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
- uses: actions/checkout@v4.2.2
- uses: actions/setup-go@v5.3.0
with:
go-version-file: "go.mod"
cache: true
- uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3
- uses: hashicorp/setup-terraform@v3.1.2
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
Expand Down
7 changes: 5 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Visit https://golangci-lint.run/ for usage documentation
# and information on other useful linters
run:
concurrency: 4
allow-parallel-runners: true
timeout: 4m
issues:
max-per-linter: 0
exclude-dirs-use-default: true
max-same-issues: 0

linters:
Expand All @@ -19,7 +23,6 @@ linters:
- nilerr
- predeclared
- staticcheck
- tenv
- unconvert
- unparam
- unused
Expand Down
21 changes: 21 additions & 0 deletions docs/resources/catalog_entity.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Catalog Entity
- `checkmarx` (Attributes) Checkmarx configuration for the entity. (see [below for nested schema](#nestedatt--checkmarx))
- `children` (Attributes List) List of child entities for the entity. Only used for entities of type `TEAM` or `DOMAIN`. (see [below for nested schema](#nestedatt--children))
- `ci_cd` (Attributes) CI/CD configuration for the entity. (see [below for nested schema](#nestedatt--ci_cd))
- `circle_ci` (Attributes) CircleCI configuration for the entity. (see [below for nested schema](#nestedatt--circle_ci))
- `coralogix` (Attributes) Coralogix configuration for the entity. (see [below for nested schema](#nestedatt--coralogix))
- `dashboards` (Attributes) Dashboards configuration for the entity. (see [below for nested schema](#nestedatt--dashboards))
- `definition` (String) Set when the entity is a Resource. These are the properties defined by the Resource Definition, in JSON format in a string (use the `jsonencode` function to convert a JSON object to a string).
Expand Down Expand Up @@ -176,6 +177,26 @@ Required:



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

Optional:

- `projects` (Attributes List) List of CircleCI projects for the entity. (see [below for nested schema](#nestedatt--circle_ci--projects))

<a id="nestedatt--circle_ci--projects"></a>
### Nested Schema for `circle_ci.projects`

Required:

- `slug` (String) The slug of the project in CircleCI.

Optional:

- `alias` (String) CircleCI alias. Only relevant if you've opted into multi-account support.



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

Expand Down
6 changes: 6 additions & 0 deletions examples/resources/catalog_entity/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,12 @@ resource "cortex_catalog_entity" "products-service" {
]
}

circle_ci = {
projects = [
{ name = "products-service" }
]
}

coralogix = {
applications = [
{ name = "products-service" }
Expand Down
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/cortexapps/terraform-provider-cortex

go 1.22
go 1.24.1

require (
github.com/dghubble/sling v1.4.1
Expand Down Expand Up @@ -71,12 +71,12 @@ require (
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/zclconf/go-cty v1.14.0 // indirect
golang.org/x/crypto v0.13.0 // indirect
golang.org/x/crypto v0.36.0 // indirect
golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.13.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.37.0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
google.golang.org/grpc v1.57.0 // indirect
Expand Down
Loading
Loading