Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump the main group with 2 updates #1868

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/data-sources/account_team_project.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
2 changes: 1 addition & 1 deletion docs/data-sources/project_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
2 changes: 1 addition & 1 deletion docs/resources/account_team_project.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/organization_group_project.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/organization_permission.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/project_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
16 changes: 7 additions & 9 deletions internal/schemautil/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -677,7 +675,7 @@ func copyServicePropertiesFromAPIResponseToTerraform(

diskSpace := 0
if s.DiskSpaceMb != nil {
diskSpace = int(*s.DiskSpaceMb)
diskSpace = *s.DiskSpaceMb
}
additionalDiskSpace := diskSpace - servicePlanParams.DiskSizeMBDefault

Expand Down