Commit graph

83 commits

Author SHA1 Message Date
João Palet
e48deaff59
Fix Argus scrape config internal models to use Terraform types (#349)
* Fix SAML2 model

* Fix BasicAuth model

* Fix Targets model

* Fixes after testing
2024-04-29 15:18:13 +01:00
Diogo Ferrão
46797a659a
support storage class update in postgresflex (#348) 2024-04-26 11:20:51 +02:00
João Palet
66d6ec2bd0
Remove deleted resources and datasources from Terraform state on Read (all remaining services) (#346)
* Remove deleted resources and datasources from state on Read

* Simplify code

* Fix function description

Co-authored-by: Diogo Ferrão <diogo.ferrao@freiheit.com>

* Fix function description

Co-authored-by: Diogo Ferrão <diogo.ferrao@freiheit.com>

* Fix whitespace

---------

Co-authored-by: Diogo Ferrão <diogo.ferrao@freiheit.com>
2024-04-23 08:59:43 +01:00
João Palet
464884cabe
Remove deleted resources from Terraform state on Read (LB and DSA) (#340)
* Fix for load balancer resource

* Fix for lb credential resource

* Fix for all DSA resources

* Fix for lb datasource

* Fix for all DSA datasources

* Adjustments after review

* Remove early return from all datasources
2024-04-22 15:19:10 +01:00
Simon Stier
592007de7a
DNS: Fix rrsetNameLength validation (#345)
* fix rrsetNameLength validation

* remove string length validation entirely

Co-authored-by: Diogo Ferrão <diogo.ferrao@freiheit.com>

---------

Co-authored-by: Diogo Ferrão <diogo.ferrao@freiheit.com>
2024-04-22 15:51:06 +02:00
Diogo Ferrão
9bd1da7cee
Bugfix inconsistent applies of ListAttributes (#328)
* sort the list of ACLs for MongoDBFlex

* Fix and test other cases of ListAttribute ordering

* fix linting

* revert sorting changes, introduce new reconcilestrlist function

* merge main

* Fix rabbitmq

* fix segmentation fault

* Improve testing

* pass context to mapfields, minor name fixes
2024-04-16 11:20:19 +01:00
stackit-pipeline
18d3f4d1fb
fix(deps): update stackit sdk modules (#327)
* fix(deps): update stackit sdk modules

* remove deprecated fields from credentials resources

* remove deprecated fields from credentials resources

* add newly added fields to credentials resources

* remove deprecated fields from credentials datasource

* add newly added credential fields to datasources

* update acceptance tests

---------

Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
Co-authored-by: Gökçe Gök Klingel <goekce.goek_klingel@mail.schwarz>
2024-04-15 09:52:35 +02:00
Vicente Pinto
4917eda1ad
DNS Record Set type requires replace (#325) 2024-04-09 16:12:00 +01:00
Diogo Ferrão
6e61caee19
Bugfix SKE downgrade replace in place (#315)
* add requireif to schema, extend acc testing

* fix acceptance test

* improve testing
2024-03-27 15:45:16 +00:00
Diogo Ferrão
394d5bf8d6
Onboard Argus (ACL): fix edge cases (#314)
* fix empty acl update/create, update CIDR validator

* fix sigsegv in test, acl description

* Split field mapping, better handle edge cases

* Update stackit/internal/services/argus/instance/resource.go

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

---------

Co-authored-by: Vicente Pinto <vicente.pinto@freiheit.com>
2024-03-26 13:54:09 +00:00
GokceGK
056c000acc
Update SKE project resource deprecation message (#313)
* remove redundant log message

* update description and deprecation message for project resource

* add missing space

* update docs
2024-03-26 11:11:21 +01:00
Diogo Ferrão
9528ca2307
Update Argus ACL documentation (#312)
* update argus ACL docs

* update datasource docs
2024-03-25 14:03:58 +00:00
GokceGK
0fc2a28469
Deprecate ske project resource (#309)
* add deprecation message

* edit acceptance test

* Enable project before creating first cluster // fix typo in function name

* add cluster existence check before deleting ske project // add deprecation message to project resource

* add region to acceptance test

* Update resource error message

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

* Update resource error message

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

* Update deprecation message

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

* Update error message

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

* remove model id assignment

* update error handling for cluster existence check while deleting project

* add nil check for clusters during project deletion

* add deprecation notice to documentation

* Update datasource deprecation message

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

* improve condition handling

---------

Co-authored-by: Vicente Pinto <vicente.pinto@freiheit.com>
2024-03-25 13:23:06 +01:00
Diogo Ferrão
d6c677552f
Fix bug dns record name inconsistent (#307)
* add fqdn to model, map fqdn in mapFields

* add testing

* update examples, generate docs, fix linting

* addressed comments in PR

* add comment to acc tests, explaining ignore

* update docs
2024-03-25 11:45:29 +00:00
Diogo Ferrão
c2389be47b
Onboard Argus ACL (#304)
* resource create and schema/model

* consider empty value in resource creation

* Address issue in mapfields that came up in testing

* Unit testing the mapFields func

* extend update

* extend read

* extend datasource.go

* update example

* extended acceptance tests and generated docs

* update description and comments

* improve messages and var names, fix update acceptance test

* extend acceptance tests, improve error messages
2024-03-22 17:35:10 +00:00
Vicente Pinto
9f73a568c4
Increase timeouts (#301)
* Increase timeouts

* Remove timeout from loadbalancer delete

* Incresae timeout for loadbalancer create
2024-03-13 13:37:25 +00:00
Vicente Pinto
b79c88e858
Update documentation (#298)
* Update documentation

* Update stackit/internal/services/redis/credential/resource.go

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

* Add more info

* Update datasource

---------

Co-authored-by: João Palet <joao.palet@outlook.com>
2024-03-11 15:55:05 +00:00
Peter Stolz
3ea0f81900
fix: set min ttl to 60 (#293) 2024-03-11 15:13:35 +00:00
João Palet
f0890f9ddf
Add description for MongoDB Flex instance backup_schedule field (#282) 2024-03-04 15:55:07 +00:00
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