Commit graph

465 commits

Author SHA1 Message Date
stackit-pipeline
71177d8348
fix(deps): update module github.com/stackitcloud/stackit-sdk-go/core to v0.10.0 (#280)
* fix(deps): update module github.com/stackitcloud/stackit-sdk-go/core to v0.10.0

* Remove usages of RetryTimeout in tests

---------

Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
Co-authored-by: João Palet <joao.palet@freiheit.com>
2024-02-28 14:47:24 +00:00
Vicente Pinto
9d3d888178
Small acc test fixes (#279) 2024-02-26 16:01:12 +00:00
Vicente Pinto
d1ceb77081
Return available ske versions in the error message (#278) 2024-02-26 09:55:04 +00:00
Jorge Turrado Ferrero
32d176ee86
fix: validates the record conent based on record type (#267)
* fix:  validates the record conent based on record type

Signed-off-by: Jorge Turrado <jorge.turrado@scrm.lidl>

* fix typo

Signed-off-by: Jorge Turrado <jorge.turrado@scrm.lidl>

* apply feedback

Signed-off-by: Jorge Turrado <jorge.turrado@scrm.lidl>

* apply feedback

Signed-off-by: Jorge Turrado <jorge.turrado@scrm.lidl>

---------

Signed-off-by: Jorge Turrado <jorge.turrado@scrm.lidl>
2024-02-20 15:17:27 +00:00
Henrique Santos
3700ad3018
Fix loadbalancer internal models to use TF types (#264)
* Unexport types

* Modify structs to use TF types, uniformize comments

* Adapt to new models

* Adapt to new models

* Adapt tests

* Bug fixes

* Lint fix

* Fix bugs

* Fix wrong reference

Co-authored-by: Vicente Pinto <vicente.pinto@freiheit.com>

* Rename variable

* Rename variable

* Rename variables

---------

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
Co-authored-by: Vicente Pinto <vicente.pinto@freiheit.com>
2024-02-15 09:55:56 +00:00
Vicente Pinto
8b74ec2700
Fix load balancer acc tes (#263) 2024-02-13 13:40:58 +00:00
Vicente Pinto
d5bd5fa402
Get credentials in cluster read and add default to kubeconfig expiration (#259)
* Get credentials in cluster read and add default to expiration

* Fix docs

* Fix docs

* Update warning
2024-02-09 16:59:00 +00:00
Vicente Pinto
e9b2d7aa91
Remove UseStateForUnknown for kubeconfig field in ske cluster (#258)
* Remove UseStateForUnknown

* Fix acc test
2024-02-09 11:59:34 +00:00
Vicente Pinto
bde1fc55e4
Deprecate kubeconfig field and add stackit_ske_kubeconfig resource (#256)
* Implement kubeconfig resource

* Update acc test, skip get credentials

* Update acc test

* Add warning on Create

* Add option to refresh

* Fix lint

* Add comment, generate docs

* Update stackit/internal/services/ske/cluster/resource.go

Co-authored-by: João Palet <joao.palet@outlook.com>

* Update stackit/internal/services/ske/kubeconfig/resource.go

Co-authored-by: João Palet <joao.palet@outlook.com>

* Changes after review

* Fix schema

* Gen docs

* Rename

* Credentials handling in datasource, update acc test

* Fix datasource

* Update descriptions

---------

Co-authored-by: João Palet <joao.palet@outlook.com>
2024-02-09 10:17:04 +00:00
Mouhsen Ibrahim
91b2c42a19
Add support to ServerNameIndicators for load balancers (#251)
* Add support to ServerNameIndicators for load balancers

* Change argument type to a pointer

* Replace custom struct with TF struct

* Fix names for server_name_indicators fields

* Add Optional

---------

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
Co-authored-by: vicentepinto98 <vicente.pinto@freiheit.com>
2024-02-08 15:01:16 +00:00
João Palet
d8734270f5
Add new resource and datasource for Load Balancer credentials (#255)
* Implement and test credential resource and data source

* Fix descriptions in load balancer instance schema

* Extend acceptance tests

* Add acceptance test requirements to README

* Generate updated docs

* Fix linter issues

* Add examples and update docs

* Fix examples

* Improvements from review

* Remove credential data source
2024-02-08 12:49:05 +01:00
Henrique Santos
80666ec3d3
Fix documentation (#253)
Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
2024-02-07 13:51:59 +00:00
Henrique Santos
a29c954c84
Add deprecation message for postgresql resources and data sources (#247)
* Update dependency

* Add deprecation messages

* Modify markdown description

* Add year

* Typo fix

---------

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
2024-02-06 16:05:19 +01:00
Mouhsen Ibrahim
b171e8a745
Add support for session persistence to the load balancer (#238)
* Add support for session persistence to the load balancer

* Set use_source_ip_address optional to true

* Add unit tests for SessionPersistence Settings in LoadBalancer

* Add acceptance test for using session persistence

* Add session persistence to data source and fix acceptance tests

* Update stackit/internal/services/loadbalancer/loadbalancer/resource.go

Co-authored-by: Vicente Pinto <vicente.pinto@freiheit.com>

* Update stackit/internal/services/loadbalancer/loadbalancer/datasource.go

Co-authored-by: Vicente Pinto <vicente.pinto@freiheit.com>

---------

Co-authored-by: Vicente Pinto <vicente.pinto@freiheit.com>
2024-02-06 12:41:04 +00:00
João Palet
dfc9e391d5
Fix Argus Scrape Config SAML2 field default (#239)
* Fix Argus Scrape Config SAML2 field default

* Adjust acceptance test
2024-01-31 10:05:48 +01:00
João Palet
bb8df8b1b2
Extend Argus acc test to update instance plan (#236)
* Extend Argus acc test to update instance plan

* Update Argus SDK module to have longer wait timeouts
2024-01-26 18:38:17 +01:00
João Palet
09d658942c
Fix inconsistent result after updating Argus instance plan (#233) 2024-01-25 11:00:07 +01:00
Piet van der Meulen
c975a933bc
add sample limit for argus scraper jobs (#219)
* add sample limit for argus scraper jobs

* adjust range

* Add sampleLimit to acceptance test

* Fix missing config

---------

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
2024-01-18 14:13:54 +00:00
Vicente Pinto
ad561a0367
Update example and remove regex validation (#207) 2024-01-12 17:32:51 +00:00
Vicente Pinto
1e103ac7fe
Move checkAllowPriviledgedContainers to the Create and Update functions in the SKE resource (#206)
* Move checkAllowPriviledgedContainers to the Create and Update functions

* Remove ValidateConfig

* Add comment
2024-01-12 17:32:08 +00:00
Henrique Santos
b6801a89b9
Rename model for uniformity, add comments (#197)
Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
2024-01-09 10:33:26 +00:00
Vicente Pinto
cfaf8f2605
Fix object storage credential custom endpoint and resource manager regex commnet (#178) 2023-12-22 16:03:18 +00:00
Henrique Santos
c7effac5c7
Update SDK dependency (#177)
* Update dependencies

* Update dependencies

* Update dependencies

* Update dependencies

---------

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
2023-12-21 09:33:36 +00:00
Vicente Pinto
506d1afdc2
Fix error handling on object storage service enablement (#165)
* Fix error handling on objecto storage service enablement

* Add message about depends_on

* Update docs
2023-12-18 14:51:32 +00:00
Vicente Pinto
62b6a1b3de
Support project UUID identifier in resource manager project (#161)
* Add projectId to resource manager project, fix value conversion error

* Support both uuid and container id, update acceptance tests

* Update docs

* Fix unit tests

* Adapt acc test names
2023-12-13 14:17:28 +00:00
Vicente Pinto
45e8981350
Add UseStateForUnknown for all Computed fields that RequireReplacement and dont change after an update (#149) 2023-11-14 17:16:50 +00:00
Vicente Pinto
d1b10d23c1
SKE Cluster: fix extensions and hibernations mapping (#135)
* Fix bug in extensions.argus conversion

* Fix mapExtensions

* Fix extensions mapping, add test case

* Check disabled argus or acl independently

* Add last fixes

* Replace NewListValueFrom with NewListValue

* Remove unused argument
2023-11-08 16:01:35 +00:00
Henrique Santos
cbbf3a00c5
SKE Acc tests - Remove max_surge from min cluster (#130)
* Remove max_surge

* Simplify import

---------

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
2023-11-07 11:27:43 +00:00
Vicente Pinto
4728a49845
Fix bug in extensions.argus conversion (#133) 2023-11-06 13:01:20 +00:00
Vicente Pinto
0d438a4a9c
SKE Cluster - Change Extensions field model to use types.Object (#127)
* Convert SKE Extensions field to TF model

* Fix unit test

* Check error

* Update stackit/internal/services/ske/cluster/resource.go

Co-authored-by: João Palet <joao.palet@outlook.com>

* Fix error messages

* Replace ListValueMust with ListValue

* Replace types.ListValue with types.ListValueFrom

* Add context

* Add separator

---------

Co-authored-by: João Palet <joao.palet@outlook.com>
2023-11-06 10:59:36 +00:00
Vicente Pinto
03d0e28016
Move functions to conversion pkg (#123) 2023-11-03 08:49:05 +00:00
Henrique Santos
71bf63cbc9
Acceptance tests fixes (#120)
* Update Kubernetes version

* Update nodepool OS

* Revert Kubernetes version to 1.24

* Add maintenance field to cluster-min

* Remove hardcoded kubernetes version

* Remove hardcoded setting

* Revert minor version of Kubernetes upgrade

* Fix post test check destroy

* Fix missing pointer

* Fix labels using wrong delimiters

* Fix typo in provider config

* Lint fix

---------

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
2023-11-02 15:31:47 +00:00
Vicente Pinto
b6100ec8d5
Replace ValuePointer function with custom conversion (#121) 2023-11-02 15:28:06 +00:00
João Palet
b10302c6de
Use random UUIDs for LoadBalance XRequestID headers (#119) 2023-11-02 12:40:48 +01:00
Henrique Santos
852516e081
SKE Cluster - Change field model lists to use types.List (#118)
* Change cluster model lists to types.List

* Lint fix

* Fix inconsistent state

* Acc test fixes

---------

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
2023-10-31 17:35:03 +00:00
João Palet
7188e13e92
Onboard Load Balancer (part 4: acc tests, examples and documentation) (#117)
* Implement acceptance test

* Add resource and data source to the provider

* Add examples and markdown description

* Generate docs

* Adjustments after review

* Move load balancer supporting infrastructure from resource config to example
2023-10-31 18:13:50 +01:00
João Palet
b804dc789e
Onboard Load Balancer (part 3: add remaining CRUD login and datasource) (#116)
* Finish implementation for CRUD functionality

* Register resource in the provider

* Adjustments to resource

* Implement data source

* Unregister resource and data source from provider

* Fix external_address schema field

* Remove oneOf validators from datasource
2023-10-31 12:52:18 +01:00
João Palet
19a679e0bc
Onboard Load Balancer (part 2: add update payload and API response map helpers) (#111)
* Add mapFields and tests

* Extend Create function

* Adjust function signature

* Fix toCreatePayload

* Add toTargetPoolUpdatePayload and tests

* Wait for creation

* Use waiter response for mapFields

* Adjust after dependency update
2023-10-27 18:48:31 +02:00
Henrique Santos
8f5850cdf1
Update dependencies (#112)
* Update dependencies

* Remove set timeout

* Remove set sleep before wait

* Update to new signature, remove unnecessary calls

---------

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
2023-10-27 15:48:54 +01:00
João Palet
8323db836d
Onboard Load Balancer (part 1: implement creation payload helpers) (#107)
* Add initial resource schema and model

* Configure client

* Implement toCreatePayload and test

* Unwire load balancer resource from the provider

* Add schema fields descriptions

* Review adjustments

* Lint adjustments
2023-10-27 11:40:29 +02:00
João Palet
25992d6ae4
Increase create and update timeouts for instances (#103) 2023-10-24 17:57:47 +02:00
Henrique Santos
c3618f2b63
Update SDK dependencies (#100)
* Update dependencies

* Fix tests

* Fix field assignment

* Update field assignment

* Remove unused functions

---------

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
2023-10-24 14:54:04 +01:00
João Palet
e61bfe09a5
Set backupSchedule as required in MongoDB Flex instance (#96)
* Set backupSchedule as required in MongoDB Flex instance

* Update example and generate docs

* Add regex explanation comment

* Fix acceptance test

* Fix map fields
2023-10-20 14:38:19 +02:00
Henrique Santos
7a7f28a306
Implement Secrets Manager User, change ACL to Set (#94)
* Implement secrets manager user

* Add user tests

* Add secrets manager user

* Fix typo

* Change ACL to set

* Fix field name

* Change ACLs to set

* Fix typo

* Fix formatting

* Fix update not using existing password

* Add repeating ACLs to test case

* Fix signature

* Add user checks

* Reorder list

---------

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
2023-10-19 13:56:24 +01:00
Henrique Santos
e1265578ce
Implement Secrets Manager ACL (#93)
* Add CIDR validator

* Implement `syncACL`, add it to creation

* Rename function

* Rename variables

* Add mapACLs

* Implement instance update

* Add ACLs to acc test

* Add ACL to schema

* Add new line

* Fix not using the ACLs read from config

* Add test case where ACLs aren't set

* Fix lint

* Generate docs

* Add uniqueness check for ACLs

* Add repeated ACLs test cases

* Remove debug leftover

* Change test cases

* Rename data

* Add ACL description

* Generate docs

* Change ACL attribute type

* Remove test case

---------

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
2023-10-18 13:25:54 +01:00
João Palet
3c6748545d
Fix PostgresFlex references in MongoDB Flex (#91)
* Fix PostgresFlex references in MongoDB Flex

* Update docs

* Re-generate docs
2023-10-17 17:53:45 +02:00
Henrique Santos
9d11098102
Improve region details (#90)
* Make client config error message more clear

* Add missing log

* Add region detail to resource/data source description

* Generate docs

* Remove resourcemanager using region

* Apply changes to MongoDBFlex user

* Generate docs

* Fix wrong description

---------

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
2023-10-17 16:02:13 +01:00
João Palet
20f3496242
Onboard MongoDB Flex user (#88)
* Onboard user

* Add examples and generate docs

* Adjustments after review
2023-10-17 15:09:02 +02:00
João Palet
ade77eb544
Onboard MongoDB Flex instance (#86)
* Onboard instance resource

* Add options.type as required field

* Implement resource unit tests

* Implement data source

* Implement acc tests

* Adjust update acc test

* Fix typo

* Adjust update unit tests

* Adjustments after review

* Minor adjustment for uniformity

* Adjustments after review
2023-10-17 11:20:22 +02:00
Henrique Santos
6372434e56
Implement Secrets Manager instance (#85)
* Implement secrets manager instance resource

* Implement secrets manager data source

* Implement secrets manager acc tests

* Add secrets manager to provider

* Fix typos

* Fix test name

* Fix typo

* Fix instance name

* Lint fix

* Remove unnecessary modifier

---------

Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
2023-10-16 11:37:34 +01:00