Skip to content

Commit 6c0eff3

Browse files
authored
Merge branch 'stackitcloud:main' into main
2 parents 3fb95c9 + e115a0e commit 6c0eff3

File tree

80 files changed

+520
-1146
lines changed

Some content is hidden

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

80 files changed

+520
-1146
lines changed

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,11 @@ vendor/
3030

3131
# Go workspace file
3232
go.work
33-
go.work.sum
33+
go.work.sum
34+
35+
# Unit test files
36+
stackit/internal/services/iaas/test-512k.img
37+
38+
# Test coverage reports
39+
coverage.out
40+
coverage.html

.goreleaser.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,9 @@ release:
5858
# If you want to manually examine the release before its live, uncomment this line:
5959
# draft: true
6060
changelog:
61-
disable: true
61+
use: github
62+
sort: asc
63+
filters:
64+
exclude:
65+
- "^docs:"
66+
- "^test:"

CONTRIBUTION.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ These commands can be executed from the project root:
2626
- `make lint`: lint the code and examples
2727
- `make generate-docs`: generate terraform documentation
2828
- `make test`: run unit tests
29+
- `make coverage`: create unit test coverage report (output file: `stackit/coverage.html`)
2930
- `make test-acceptance-tf`: run acceptance tests
3031

3132
### Repository structure

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ test:
3737
@echo "Running tests for the terraform provider"
3838
@cd $(ROOT_DIR)/stackit && go test ./... -count=1 && cd $(ROOT_DIR)
3939

40+
# Test coverage
41+
coverage:
42+
@echo ">> Creating test coverage report for the terraform provider"
43+
@cd $(ROOT_DIR)/stackit && (go test ./... -count=1 -coverprofile=coverage.out || true) && cd $(ROOT_DIR)
44+
@cd $(ROOT_DIR)/stackit && go tool cover -html=coverage.out -o coverage.html && cd $(ROOT_DIR)
45+
4046
test-acceptance-tf:
4147
@if [ -z $(TF_ACC_PROJECT_ID) ]; then echo "Input TF_ACC_PROJECT_ID missing"; exit 1; fi
4248
@if [ -z $(TF_ACC_ORGANIZATION_ID) ]; then echo "Input TF_ACC_ORGANIZATION_ID missing"; exit 1; fi

docs/data-sources/image.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@ page_title: "stackit_image Data Source - stackit"
44
subcategory: ""
55
description: |-
66
Image datasource schema. Must have a region specified in the provider configuration.
7-
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
87
---
98

109
# stackit_image (Data Source)
1110

1211
Image datasource schema. Must have a `region` specified in the provider configuration.
1312

14-
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
15-
1613
## Example Usage
1714

1815
```terraform

docs/data-sources/key_pair.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@ page_title: "stackit_key_pair Data Source - stackit"
44
subcategory: ""
55
description: |-
66
Key pair resource schema. Must have a region specified in the provider configuration.
7-
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
87
---
98

109
# stackit_key_pair (Data Source)
1110

1211
Key pair resource schema. Must have a `region` specified in the provider configuration.
1312

14-
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
15-
1613
## Example Usage
1714

1815
```terraform

docs/data-sources/loadbalancer.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ data "stackit_loadbalancer" "example" {
2727
- `name` (String) Load balancer name.
2828
- `project_id` (String) STACKIT project ID to which the Load Balancer is associated.
2929

30+
### Optional
31+
32+
- `region` (String) The resource region. If not defined, the provider region is used.
33+
3034
### Read-Only
3135

3236
- `external_address` (String) External Load Balancer IP address where this Load Balancer is exposed.
33-
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`","`name`".
37+
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`","region","`name`".
3438
- `listeners` (Attributes List) List of all listeners which will accept traffic. Limited to 20. (see [below for nested schema](#nestedatt--listeners))
3539
- `networks` (Attributes List) List of networks that listeners and targets reside in. (see [below for nested schema](#nestedatt--networks))
3640
- `options` (Attributes) Defines any optional functionality you want to have enabled on your load balancer. (see [below for nested schema](#nestedatt--options))

docs/data-sources/network_area.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@ page_title: "stackit_network_area Data Source - stackit"
44
subcategory: ""
55
description: |-
66
Network area datasource schema. Must have a region specified in the provider configuration.
7-
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
87
---
98

109
# stackit_network_area (Data Source)
1110

1211
Network area datasource schema. Must have a `region` specified in the provider configuration.
1312

14-
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
15-
1613
## Example Usage
1714

1815
```terraform

docs/data-sources/network_area_route.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@
33
page_title: "stackit_network_area_route Data Source - stackit"
44
subcategory: ""
55
description: |-
6-
Network area route data source schema. Must have a region specified in the provider configuration.
7-
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
6+
Network area route data resource schema. Must have a region specified in the provider configuration.
87
---
98

109
# stackit_network_area_route (Data Source)
1110

12-
Network area route data source schema. Must have a `region` specified in the provider configuration.
13-
14-
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
11+
Network area route data resource schema. Must have a `region` specified in the provider configuration.
1512

1613
## Example Usage
1714

docs/data-sources/network_interface.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@ page_title: "stackit_network_interface Data Source - stackit"
44
subcategory: ""
55
description: |-
66
Network interface datasource schema. Must have a region specified in the provider configuration.
7-
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
87
---
98

109
# stackit_network_interface (Data Source)
1110

1211
Network interface datasource schema. Must have a `region` specified in the provider configuration.
1312

14-
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
15-
1613
## Example Usage
1714

1815
```terraform

0 commit comments

Comments
 (0)