Skip to content

Commit 7a92b6c

Browse files
committed
Adjust project files and configurations
Signed-off-by: Alexander Dahmen <[email protected]>
1 parent 109647d commit 7a92b6c

File tree

12 files changed

+162
-168
lines changed

12 files changed

+162
-168
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Bug report
3-
about: Report a bug in the STACKIT pulumi provider
3+
about: Report a bug in the STACKIT Pulumi Provider
44
title: ''
55
labels: bug
66
assignees: ''
@@ -26,16 +26,17 @@ assignees: ''
2626

2727
## Actual behavior
2828

29-
*Please describe the current behavior of the STACKIT pulumi provider. Don't forget to add detailed information like error messages.*
29+
*Please describe the current behavior of the STACKIT Pulumi Provider. Don't forget to add detailed information like error messages.*
3030

3131
## Expected behavior
3232

33-
*Please describe the behavior which you would expect from the STACKIT pulumi provider in that case.*
33+
*Please describe the behavior which you would expect from the STACKIT Pulumi Provider in that case.*
3434

3535
## Environment
3636
- OS:
37-
- pulumi version (see `pulumi --version`): `vX.X.X`
38-
- Version of the STACKIT pulumi provider: `vX.X.X`
37+
- pulumi version (see `pulumi version`): `vX.X.X`
38+
- pulumictl version (see `pulumictl version`) `X.X.X`
39+
- Version of the STACKIT Pulumi Provider: `vX.X.X`
3940

4041
**Additional information**
4142

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Feature request
3-
about: Suggest an idea for the STACKIT pulumi provider
3+
about: Suggest an idea for the STACKIT Pulumi Provider
44
title: ''
55
labels: enhancement
66
assignees: ''

.golangci.yml

Lines changed: 89 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,95 @@
1+
# This file contains all available configuration options
2+
# with their default values.
3+
4+
# options for analysis running
5+
run:
6+
# default concurrency is a available CPU number
7+
concurrency: 4
8+
9+
# timeout for analysis, e.g. 30s, 5m, default is 1m
10+
timeout: 5m
11+
linters-settings:
12+
goimports:
13+
# put imports beginning with prefix after 3rd-party packages;
14+
# it's a comma-separated list of prefixes
15+
local-prefixes: github.com/freiheit-com/nmww
16+
depguard:
17+
rules:
18+
main:
19+
list-mode: lax # Everything is allowed unless it is denied
20+
deny:
21+
- pkg: "github.com/stretchr/testify"
22+
desc: Do not use a testing framework
23+
misspell:
24+
# Correct spellings using locale preferences for US or UK.
25+
# Default is to use a neutral variety of English.
26+
# Setting locale to US will correct the British spelling of 'colour' to 'color'.
27+
locale: US
28+
golint:
29+
min-confidence: 0.8
30+
gosec:
31+
excludes:
32+
# Suppressions: (see https://github.com/securego/gosec#available-rules for details)
33+
- G104 # "Audit errors not checked" -> which we don't need and is a badly implemented version of errcheck
34+
- G102 # "Bind to all interfaces" -> since this is normal in k8s
35+
- G304 # "File path provided as taint input" -> too many false positives
36+
- G307 # "Deferring unsafe method "Close" on type "io.ReadCloser" -> false positive when calling defer resp.Body.Close()
37+
nakedret:
38+
max-func-lines: 0
39+
revive:
40+
ignore-generated-header: true
41+
severity: error
42+
# https://github.com/mgechev/revive
43+
rules:
44+
- name: errorf
45+
- name: context-as-argument
46+
- name: error-return
47+
- name: increment-decrement
48+
- name: indent-error-flow
49+
- name: superfluous-else
50+
- name: unused-parameter
51+
- name: unreachable-code
52+
- name: atomic
53+
- name: empty-lines
54+
- name: early-return
55+
gocritic:
56+
enabled-tags:
57+
- performance
58+
- style
59+
- experimental
60+
disabled-checks:
61+
- wrapperFunc
62+
- typeDefFirst
63+
- ifElseChain
64+
- dupImport # https://github.com/go-critic/go-critic/issues/845
165
linters:
266
enable:
3-
- deadcode
4-
- errcheck
5-
- goconst
6-
- gofmt
7-
- golint
8-
- gosec
67+
# https://golangci-lint.run/usage/linters/
68+
# default linters
69+
- gosimple
970
- govet
1071
- ineffassign
11-
- interfacer
12-
- lll
13-
- megacheck
72+
- staticcheck
73+
- typecheck
74+
- unused
75+
# additional linters
76+
- errorlint
77+
- gochecknoinits
78+
- gocritic
79+
- gofmt
80+
- goimports
81+
- gosec
1482
- misspell
1583
- nakedret
16-
- structcheck
17-
- unconvert
18-
- varcheck
19-
enable-all: false
20-
run:
21-
skip-files:
22-
- schema.go
23-
- pulumiManifest.go
24-
timeout: 20m
84+
- revive
85+
- depguard
86+
- bodyclose
87+
- sqlclosecheck
88+
- wastedassign
89+
- forcetypeassert
90+
- errcheck
91+
disable:
92+
- noctx # false positive: finds errors with http.NewRequest that dont make sense
93+
- unparam # false positives
94+
issues:
95+
exclude-use-default: false

CODE-OF-CONDUCT.md

Lines changed: 0 additions & 73 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

CONTRIBUTION.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Contribute to the STACKIT Pulumi Provider
2+
3+
Your contribution is welcome! Thank you for your interest in contributing to the STACKIT Pulumi Provider. We greatly value your feedback, feature requests, additions to the code, bug reports or documentation extensions.
4+
5+
## Table of contents
6+
7+
- [Developer Guide](#developer-guide)
8+
- [Useful Make commands](#useful-make-commands)
9+
- [Code Contributions](#code-contributions)
10+
- [Bug Reports](#bug-reports)
11+
12+
13+
## Developer Guide
14+
15+
Prerequisites:
16+
17+
- [`Pulumi`](https://www.pulumi.com/docs/iac/download-install/)
18+
- [`pulumictl`](https://github.com/pulumi/pulumictl)
19+
- [`Go`](https://go.dev/doc/install) 1.23+
20+
21+
### Useful Make commands
22+
23+
These commands can be executed from the project root:
24+
25+
- `make build`: command to compile and install everything which is needed
26+
- `make tfgen`: installs the provider plugins
27+
- `make generate_sdks`: generates the sdks for all languages
28+
- `make lint_provider`: lint the provider code
29+
- `make fmt`: run code formatter
30+
31+
## Code Contributions
32+
33+
To make your contribution, follow these steps:
34+
35+
1. Check open or recently closed [Pull Requests](https://github.com/stackitcloud/pulumi-stackit/pulls) and [Issues](https://github.com/stackitcloud/pulumi-stackit/issues) to make sure the contribution you are making has not been already tackled by someone else.
36+
2. Fork the repo.
37+
3. Make your changes in a branch that is up-to-date with the original repo's `main` branch.
38+
4. Commit your changes including a descriptive message
39+
5. Create a pull request with your changes.
40+
6. The pull request will be reviewed by the repo maintainers. If you need to make further changes, make additional commits to keep commit history. When the PR is merged, commits will be squashed.
41+
42+
## Bug Reports
43+
44+
If you would like to report a bug, please open a [GitHub issue](https://github.com/stackitcloud/pulumi-stackit/issues/new).
45+
46+
To ensure we can provide the best support to your issue, follow these guidelines:
47+
48+
1. Go through the existing issues to check if your issue has already been reported.
49+
2. Make sure you are using the latest version of the STACKIT Pulumi Provider, we will not provide bug fixes for older versions. Also, latest versions may have the fix for your bug.
50+
3. Please provide as much information as you can about your environment, e.g. your versions used, your version of the STACKIT Pulumi Provider, which operating system you are using and the corresponding version.
51+
4. Include in your issue the steps to reproduce it, along with code snippets and/or information about your specific use case. This will make the support process much easier and efficient.

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,5 @@ install_sdks:: install_dotnet_sdk install_python_sdk install_nodejs_sdk
140140
test::
141141
cd examples && go test -v -tags=all -parallel ${TESTPARALLELISM} -timeout 2h
142142

143+
fmt:
144+
@gofmt -s -w .

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
# STACKIT Resource Provider
1+
# STACKIT Pulumi Provider (BETA)
22

33
![logo.svg](docs/logo.svg)
44

5-
The STACKIT Resource Provider lets you manage [STACKIT](https://www.stackit.de/en/) resources.
5+
The STACKIT Pulumi Provider lets you manage [STACKIT](https://www.stackit.de/en/) resources.
6+
7+
This STACKIT Pulumi Provider is in a BETA state. More functionality will be supported soon. Your feedback is appreciated! Feel free to open GitHub issues to provide feature requests and bug reports.
68

79
## Installing
810

@@ -52,7 +54,6 @@ The following configuration points are available for the `stackit` provider:
5254

5355
| Configuration Variable | Environment Variable | Description |
5456
|------------------------|---------------------|-------------|
55-
| `stackit:argusCustomEndpoint` | `STACKIT_ARGUS_CUSTOM_ENDPOINT` | Custom endpoint for the Argus service ⚠️ **Deprecated**: Argus service has been deprecated and integration will be removed after February 26th 2025. Please use `observability_custom_endpoint` and `observability` resources instead |
5657
| `stackit:authorizationCustomEndpoint` | `STACKIT_AUTHORIZATION_CUSTOM_ENDPOINT` | Custom endpoint for the Membership service |
5758
| `stackit:cdnCustomEndpoint` | `STACKIT_CDN_CUSTOM_ENDPOINT` | Custom endpoint for the CDN service |
5859
| `stackit:credentialsPath` | `STACKIT_CREDENTIALS_PATH` | Path of JSON from where the credentials are read. Default value is `~/.stackit/credentials.json` |

provider/cmd/pulumi-resource-stackit/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ package main
1919
import (
2020
"context"
2121
_ "embed"
22-
stackit "github.com/stackitcloud/pulumi-stackit/provider"
22+
2323
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf/tfbridge"
24+
stackit "github.com/stackitcloud/pulumi-stackit/provider"
2425
)
2526

2627
//go:embed schema-embed.json

provider/cmd/pulumi-tfgen-stackit/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
package main
1616

1717
import (
18-
stackit "github.com/stackitcloud/pulumi-stackit/provider"
1918
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf/tfgen"
19+
stackit "github.com/stackitcloud/pulumi-stackit/provider"
2020
)
2121

2222
func main() {

0 commit comments

Comments
 (0)