Skip to content

Conversation

@estellesoulard
Copy link
Contributor

@codecov-commenter
Copy link

codecov-commenter commented Nov 4, 2025

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
132 2 130 580
View the top 2 failed test(s) by shortest run time
github.com/scaleway/terraform-provider-scaleway/v2/internal/services/audittrail::TestAccDataSourceEvent_Basic
Stack Traces | 0s run time
=== RUN   TestAccDataSourceEvent_Basic
    event_data_source_test.go:17: 
        	Error Trace:	.../internal/acctest/acctest.go:131
        	            				.../services/audittrail/event_data_source_test.go:17
        	Error:      	Received unexpected error:
        	            	requested cassette not found: .../audittrail/testdata/data-source-event-basic.cassette.yaml
        	Test:       	TestAccDataSourceEvent_Basic
--- FAIL: TestAccDataSourceEvent_Basic (0.00s)
github.com/scaleway/terraform-provider-scaleway/v2/internal/services/audittrail::TestAccDataSourceEvent_Warning
Stack Traces | 0s run time
=== RUN   TestAccDataSourceEvent_Warning
    event_data_source_test.go:154: 
        	Error Trace:	.../internal/acctest/acctest.go:131
        	            				.../services/audittrail/event_data_source_test.go:154
        	Error:      	Received unexpected error:
        	            	requested cassette not found: .../audittrail/testdata/data-source-event-warning.cassette.yaml
        	Test:       	TestAccDataSourceEvent_Warning
--- FAIL: TestAccDataSourceEvent_Warning (0.00s)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@estellesoulard estellesoulard force-pushed the feat/audit-trail-event-data-source branch from a2394cc to fe22129 Compare November 4, 2025 11:12

# scaleway_audit_trail_event

Use this data source to get a list of existing Audit Trail events.
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be helpful to specify the range of time considered if nothing is specified.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll add the recorded_after and recorded_before filters. I left out a few other filters, should I add any of these additionally?

  • method_name
  • status
  • order_by
  • service_name
  • principal_id
  • source_ip

Copy link
Member

Choose a reason for hiding this comment

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

Yes I think it would be helpful

Type: schema.TypeString,
Description: "Type of the scaleway resources associated with the listed events",
Optional: true,
ValidateDiagFunc: verify.ValidateEnum[audittrailSDK.ResourceType](),
Copy link
Member

Choose a reason for hiding this comment

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

Could you ensure that is it only a warning and not an error that is returned here? It would be helpful in case new resource_type are recognised by the API but not yet available in the provider and/or in a outdated provider version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

✔️

@estellesoulard estellesoulard force-pushed the feat/audit-trail-event-data-source branch 2 times, most recently from 51a35a1 to 93bf6a6 Compare November 5, 2025 15:11
@estellesoulard estellesoulard force-pushed the feat/audit-trail-event-data-source branch from 93bf6a6 to 2f056d3 Compare November 5, 2025 17:28
@estellesoulard estellesoulard force-pushed the feat/audit-trail-event-data-source branch from f5a6215 to 12845fc Compare November 6, 2025 13:32
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.

4 participants