diff --git a/docs/data-sources/account_team_project.md b/docs/data-sources/account_team_project.md index 19813446a..c6b53d901 100644 --- a/docs/data-sources/account_team_project.md +++ b/docs/data-sources/account_team_project.md @@ -32,4 +32,4 @@ data "aiven_account_team_project" "account_team_project1" { ### Read-Only - `id` (String) The ID of this resource. -- `team_type` (String) The Account team project type. The possible values are `admin`, `operator`, `developer`, `read_only` and `project:permissions:read`. +- `team_type` (String) The Account team project type. The possible values are `admin`, `operator`, `developer`, `read_only`, `project:permissions:read` and `service:logs:read`. diff --git a/docs/data-sources/project_user.md b/docs/data-sources/project_user.md index 168692096..d617fc274 100644 --- a/docs/data-sources/project_user.md +++ b/docs/data-sources/project_user.md @@ -31,4 +31,4 @@ data "aiven_project_user" "mytestuser" { - `accepted` (Boolean) Whether the user has accepted the request to join the project. Users get an invite and become project members after accepting the invite. - `id` (String) The ID of this resource. -- `member_type` (String) Project membership type. The possible values are `admin`, `developer`, `operator`, `project:permissions:read` and `read_only`. +- `member_type` (String) Project membership type. The possible values are `admin`, `developer`, `operator`, `project:permissions:read`, `read_only` and `service:logs:read`. diff --git a/docs/resources/account_team_project.md b/docs/resources/account_team_project.md index 6ac07a242..82794bd03 100644 --- a/docs/resources/account_team_project.md +++ b/docs/resources/account_team_project.md @@ -48,7 +48,7 @@ resource "aiven_account_team_project" "main" { ### Optional - `project_name` (String) The name of an already existing project -- `team_type` (String) The Account team project type. The possible values are `admin`, `operator`, `developer`, `read_only` and `project:permissions:read`. +- `team_type` (String) The Account team project type. The possible values are `admin`, `operator`, `developer`, `read_only`, `project:permissions:read` and `service:logs:read`. - `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) ### Read-Only diff --git a/docs/resources/organization_group_project.md b/docs/resources/organization_group_project.md index 1d85d0ba8..fb6beb75d 100644 --- a/docs/resources/organization_group_project.md +++ b/docs/resources/organization_group_project.md @@ -44,7 +44,7 @@ resource "aiven_organization_group_project" "example" { - `group_id` (String) The ID of the user group. - `project` (String) The project that the users in the group are members of. -- `role` (String) [Project-level role](https://aiven.io/docs/platform/reference/project-member-privileges) assigned to all users in the group. The possible values are `admin`, `operator`, `developer`, `read_only` and `project:permissions:read`. +- `role` (String) [Project-level role](https://aiven.io/docs/platform/reference/project-member-privileges) assigned to all users in the group. The possible values are `admin`, `operator`, `developer`, `read_only`, `project:permissions:read` and `service:logs:read`. ### Optional diff --git a/docs/resources/organization_permission.md b/docs/resources/organization_permission.md index 9e7138f98..58c19ee0b 100644 --- a/docs/resources/organization_permission.md +++ b/docs/resources/organization_permission.md @@ -70,7 +70,7 @@ resource "aiven_organization_permission" "developers" { Required: -- `permissions` (Set of String) List of permissions. The possible values are `admin`, `developer`, `operator`, `project:permissions:read` and `read_only`. +- `permissions` (Set of String) List of permissions. The possible values are `admin`, `developer`, `operator`, `project:permissions:read`, `read_only` and `service:logs:read`. - `principal_id` (String) ID of the user or group. - `principal_type` (String) The type of principal. The possible values are `user` and `user_group`. diff --git a/docs/resources/project_user.md b/docs/resources/project_user.md index 142e0acd5..a32225e6f 100644 --- a/docs/resources/project_user.md +++ b/docs/resources/project_user.md @@ -26,7 +26,7 @@ resource "aiven_project_user" "mytestuser" { ### Required - `email` (String) Email address of the user in lowercase. Changing this property forces recreation of the resource. -- `member_type` (String) Project membership type. The possible values are `admin`, `developer`, `operator`, `project:permissions:read` and `read_only`. +- `member_type` (String) Project membership type. The possible values are `admin`, `developer`, `operator`, `project:permissions:read`, `read_only` and `service:logs:read`. - `project` (String) The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource. ### Optional diff --git a/go.mod b/go.mod index 4f24e6ae6..89ff1f093 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/aiven/terraform-provider-aiven go 1.23 require ( - github.com/aiven/aiven-go-client/v2 v2.27.0 - github.com/aiven/go-client-codegen v0.39.0 + github.com/aiven/aiven-go-client/v2 v2.28.0 + github.com/aiven/go-client-codegen v0.41.0 github.com/avast/retry-go v3.0.0+incompatible github.com/dave/jennifer v1.7.1 github.com/docker/go-units v0.5.0 diff --git a/go.sum b/go.sum index 96960baa2..7d90d5a8c 100644 --- a/go.sum +++ b/go.sum @@ -195,12 +195,12 @@ github.com/ProtonMail/go-crypto v1.1.0-alpha.2/go.mod h1:rA3QumHc/FZ8pAHreoekgiA github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= -github.com/aiven/aiven-go-client/v2 v2.27.0 h1:iTr85xDpD8td3Okj2+djUOfGLlVvngvUwaz/bla3Hzc= -github.com/aiven/aiven-go-client/v2 v2.27.0/go.mod h1:KdHfLIlIRZIfCSEBd39j1Q81jlSb6Nd+oCQKqERfnuA= +github.com/aiven/aiven-go-client/v2 v2.28.0 h1:P2UgIeUCwtDEgeeQkC1sdcWJHat1ViDc03QHS0OrUgQ= +github.com/aiven/aiven-go-client/v2 v2.28.0/go.mod h1:KdHfLIlIRZIfCSEBd39j1Q81jlSb6Nd+oCQKqERfnuA= github.com/aiven/go-api-schemas v1.91.0 h1:jiJpRwFKf3IcuZtMIzDmNyICmX0ayqDYMh9QF0GoFZY= github.com/aiven/go-api-schemas v1.91.0/go.mod h1:qS3E/3R+aKQbHsqXzNHqlXATY1kbVNzhiJvk2IDmADI= -github.com/aiven/go-client-codegen v0.39.0 h1:jyyMd0LJyPUFb1Z7MS39uGbO4GZE2ZpxP1H2xsNbuaE= -github.com/aiven/go-client-codegen v0.39.0/go.mod h1:FfbH32Xb+Hx5zeKTIug1Y8SfMeB+AKNRzxgrzkts2oA= +github.com/aiven/go-client-codegen v0.41.0 h1:lFjl8njSqLmqbXzcHAD0nRBql/U8Ik5x68t+3f0kTnQ= +github.com/aiven/go-client-codegen v0.41.0/go.mod h1:FfbH32Xb+Hx5zeKTIug1Y8SfMeB+AKNRzxgrzkts2oA= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= diff --git a/internal/schemautil/service.go b/internal/schemautil/service.go index 9ba44c676..0d00fa544 100644 --- a/internal/schemautil/service.go +++ b/internal/schemautil/service.go @@ -415,10 +415,9 @@ func resourceServiceCreate(ctx context.Context, d *schema.ResourceData, m interf staticIps := FlattenToString(d.Get("static_ips").(*schema.Set).List()) serviceIntegrations := GetAPIServiceIntegrations(d) - diskSpaceFloat := float64(diskSpace) - var diskSpaceMb *float64 - if diskSpaceFloat > 0 { - diskSpaceMb = &diskSpaceFloat + var diskSpaceMb *int + if diskSpace > 0 { + diskSpaceMb = &diskSpace } serviceCreate := &service.ServiceCreateIn{ @@ -519,10 +518,9 @@ func ResourceServiceUpdate(ctx context.Context, d *schema.ResourceData, m interf powered := true terminationProtection := d.Get("termination_protection").(bool) - diskSpaceFloat := float64(diskSpace) - var diskSpaceMb *float64 - if diskSpaceFloat > 0 { - diskSpaceMb = &diskSpaceFloat + var diskSpaceMb *int + if diskSpace > 0 { + diskSpaceMb = &diskSpace } serviceUpdate := &service.ServiceUpdateIn{ Cloud: &cloud, @@ -677,7 +675,7 @@ func copyServicePropertiesFromAPIResponseToTerraform( diskSpace := 0 if s.DiskSpaceMb != nil { - diskSpace = int(*s.DiskSpaceMb) + diskSpace = *s.DiskSpaceMb } additionalDiskSpace := diskSpace - servicePlanParams.DiskSizeMBDefault