Skip to content

New data source and resource - s3_user#650

Merged
csahu9 merged 13 commits intointegration/mainfrom
508-new-resource-s3_user
Apr 9, 2026
Merged

New data source and resource - s3_user#650
csahu9 merged 13 commits intointegration/mainfrom
508-new-resource-s3_user

Conversation

@csahu9
Copy link
Copy Markdown
Contributor

@csahu9 csahu9 commented Mar 31, 2026

Issue #507 & #508

ACC test result:

[root@scs000952326 protocols]# TF_ACC=1 go test `go list ./... | grep -e provider` -v -run=TestAccS3UserResource
=== RUN   TestAccS3UserResource
--- PASS: TestAccS3UserResource (17.66s)
PASS
ok      github.com/netapp/terraform-provider-netapp-ontap/internal/provider/protocols   17.676s
[root@scs000952326 protocols]#

@csahu9 csahu9 linked an issue Mar 31, 2026 that may be closed by this pull request
@csahu9 csahu9 linked an issue Apr 1, 2026 that may be closed by this pull request
if !state.AccessKey.IsNull() && !state.AccessKey.IsUnknown() && strings.TrimSpace(state.AccessKey.ValueString()) != "" {
keysPresent = true
}
if !keysPresent && !state.SecretKey.IsNull() && !state.SecretKey.IsUnknown() && strings.TrimSpace(state.SecretKey.ValueString()) != "" {
Copy link
Copy Markdown
Contributor

@chuyich chuyich Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!keyPresent actually is not needed here. Basically, as long as AccessKey or SecretKey exists, keyPresent is true. You have done the similar thing on line 190 area.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing that out, I've modified the conditional statement.

when creating or modifying a user or when the user keys were last regenerated, after which the user keys expire and are no longer valid.
Valid format is: 'PnDTnHnMnS|PnW'. For example, P2DT6H3M10S specifies a time period of 2 days, 6 hours, 3 minutes, and 10 seconds.
If the value specified is '0' seconds, then the keys won't expire.
It can only be used when the keys regeneration operation is performed.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In https://docs.netapp.com/us-en/ontap-restapi/swagger-ui/index.html#/Object-Store/s3_user_create, "when creating or modifying a user or
when the user keys were last regenerated, after which the user keys expire and are no longer valid.
"
Does it mean create/modify/regenerated (one of them) this parameter can be used not limited to regenerated?

Can you verify it manually if the statement is true?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested in postman - key_time_to_live is a valid option for POST call.
I've added changes to the create function and updated the docs for this param too.

Copy link
Copy Markdown
Contributor

@chuyich chuyich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple suggsetion/questions need your clarification.

@csahu9 csahu9 requested a review from chuyich April 6, 2026 07:44
@csahu9
Copy link
Copy Markdown
Contributor Author

csahu9 commented Apr 6, 2026

A couple suggsetion/questions need your clarification.

I've added new changes, please review the same.

@csahu9 csahu9 merged commit e786652 into integration/main Apr 9, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[New Resource]: s3_user [New Data Source]: s3_user

3 participants