-
Notifications
You must be signed in to change notification settings - Fork 410
[datadog_gcp_uc_config] Add support for Cloud Cost Google Cloud Usage Cost Config resource and data source #3258
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
[datadog_gcp_uc_config] Add support for Cloud Cost Google Cloud Usage Cost Config resource and data source #3258
Conversation
…resource and data source
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving with one minor update requested for accessibility
ProjectId types.String `tfsdk:"project_id"` | ||
ServiceAccount types.String `tfsdk:"service_account"` | ||
Status types.String `tfsdk:"status"` | ||
StatusUpdatedAt types.String `tfsdk:"status_updated_at"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we convert timestamps to RFC 3339 format? Terraform has a library for timestamps and that's the recommended format: https://github.com/hashicorp/terraform-plugin-framework-timetypes
Caveat that we need timezone information for the timestamp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only used in one place int he datadog terraform provider with other timestamps across data sources represented as strings. For consistency I will leave this as is for now. Given this is a data source I'd expect users to infrequently use this anyways (referencing an already existing config independent of the actual resource referencing it)
Description: "The current status of the GCP Usage Cost configuration (for example, active, error, or archived).", | ||
}, | ||
"status_updated_at": schema.StringAttribute{ | ||
Computed: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is converted to RFC 3339 then we'd add:
CustomType: timetypes.NewRFC3339Type()
and it would validate automatically.
state.CreatedAt = types.StringValue(attributes.GetCreatedAt()) | ||
state.Months = types.Int64Value(int64(attributes.GetMonths())) | ||
state.ProjectId = types.StringValue(attributes.GetProjectId()) | ||
state.StatusUpdatedAt = types.StringValue(attributes.GetStatusUpdatedAt()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sure this is where the actual conversion would take place from 2025-10-01T18:20:01.684913
. If we're using UTC for timestamps then we'd need to add that as an assumption.
/merge |
View all feedbacks in Devflow UI.
The expected merge time in
|
No description provided.