Skip to content

Commit

Permalink
Update the version. (#2644)
Browse files Browse the repository at this point in the history
* Update the version.

* fix

* Update docs.

* Update cassettes.

* revert cassettes and fix dash

* rerecord cassettes that were left behind

* remove withDefault call for gcp

* fix cassettes

* revert cassette and rebase

---------

Co-authored-by: Sherzod Karimov <sherzod.karimov@datadoghq.com>
  • Loading branch information
jack-edmonds-dd and skarimo authored Nov 6, 2024
1 parent 9ffde5c commit ba07aab
Show file tree
Hide file tree
Showing 17 changed files with 323 additions and 382 deletions.
7 changes: 4 additions & 3 deletions datadog/fwprovider/resource_datadog_integration_gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,10 @@ func (r *integrationGcpResource) getGCPIntegration(state integrationGcpModel) (*
}

func (r *integrationGcpResource) buildIntegrationGcpRequestBodyBase(state integrationGcpModel) *datadogV1.GCPAccount {
body := datadogV1.NewGCPAccountWithDefaults()
body.SetProjectId(state.ProjectID.ValueString())
body.SetClientEmail(state.ClientEmail.ValueString())
body := &datadogV1.GCPAccount{
ProjectId: state.ProjectID.ValueStringPointer(),
ClientEmail: state.ClientEmail.ValueStringPointer(),
}

return body
}
Expand Down
2 changes: 1 addition & 1 deletion datadog/fwprovider/resource_datadog_user_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func (r *userRoleResource) Delete(ctx context.Context, request resource.DeleteRe
response.Diagnostics.Append(response.State.Set(ctx, &state)...)
}

func (r *userRoleResource) buildUserRoleRequestBody(ctx context.Context, state *UserRoleModel) (*datadogV2.RelationshipToUser, diag.Diagnostics) {
func (r *userRoleResource) buildUserRoleRequestBody(_ context.Context, state *UserRoleModel) (*datadogV2.RelationshipToUser, diag.Diagnostics) {
diags := diag.Diagnostics{}

relationship := &datadogV2.RelationshipToUser{
Expand Down
9 changes: 5 additions & 4 deletions datadog/resource_datadog_dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -8066,11 +8066,12 @@ func buildDatadogToplistStyle(terraformToplistStyle map[string]interface{}) data
if v, ok := display[0].(map[string]interface{}); ok && len(v) > 0 {
if t, ok := v["type"].(string); ok && len(t) != 0 {
if t == "stacked" {
toplistWidgetStacked := &datadogV1.ToplistWidgetStacked{
Legend: datadogV1.TOPLISTWIDGETLEGEND_AUTOMATIC.Ptr(),
Type: datadogV1.TOPLISTWIDGETSTACKEDTYPE_STACKED,
}
datadogToplistStyle.SetDisplay(datadogV1.ToplistWidgetDisplay{
ToplistWidgetStacked: datadogV1.NewToplistWidgetStacked(
datadogV1.TOPLISTWIDGETLEGEND_AUTOMATIC,
datadogV1.TOPLISTWIDGETSTACKEDTYPE_STACKED,
),
ToplistWidgetStacked: toplistWidgetStacked,
})
} else if t == "flat" {
datadogToplistStyle.SetDisplay(datadogV1.ToplistWidgetDisplay{
Expand Down
9 changes: 5 additions & 4 deletions datadog/resource_datadog_synthetics_test_.go
Original file line number Diff line number Diff line change
Expand Up @@ -3114,10 +3114,11 @@ func buildDatadogTestOptions(d *schema.ResourceData) *datadogV1.SyntheticsTestOp
if rawTimeframes, ok := scheduling.(map[string]interface{})["timeframes"]; ok {
var timeFrames []datadogV1.SyntheticsTestOptionsSchedulingTimeframe
for _, tf := range rawTimeframes.(*schema.Set).List() {
timeframe := datadogV1.NewSyntheticsTestOptionsSchedulingTimeframe()
timeframe.SetDay(int32(tf.(map[string]interface{})["day"].(int)))
timeframe.SetFrom(tf.(map[string]interface{})["from"].(string))
timeframe.SetTo(tf.(map[string]interface{})["to"].(string))
timeframe := datadogV1.NewSyntheticsTestOptionsSchedulingTimeframe(
int32(tf.(map[string]interface{})["day"].(int)),
tf.(map[string]interface{})["from"].(string),
tf.(map[string]interface{})["to"].(string),
)
timeFrames = append(timeFrames, *timeframe)
}
optionsScheduling.SetTimeframes(timeFrames)
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-08-27T15:43:03.269833-04:00
2024-11-06T08:46:56.750396-05:00
36 changes: 17 additions & 19 deletions datadog/tests/cassettes/TestAccDatadogCatalogEntity_Order.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interactions:
host: api.datadoghq.com
remote_addr: ""
request_uri: ""
body: "apiVersion: v3\nkind: service\nmetadata: \n name: tf-testaccdatadogcatalogentity_order-local-1724787783\n contacts:\n - name: AA\n type: slack\n contact: AAA\n - name: BB\n type: email\n contact: BBB@example.com\n - name: AA\n type: email\n contact: AAA@example.com\n - name: BB\n type: email\n contact: AAA@example.com\n - name: AA\n type: email\n contact: BBB@example.com\n tags:\n - 'bbb'\n - 'aaa'\n"
body: "apiVersion: v3\nkind: service\nmetadata: \n name: tf-testaccdatadogcatalogentity_order-local-1730900816\n contacts:\n - name: AA\n type: slack\n contact: AAA\n - name: BB\n type: email\n contact: BBB@example.com\n - name: AA\n type: email\n contact: AAA@example.com\n - name: BB\n type: email\n contact: AAA@example.com\n - name: AA\n type: email\n contact: BBB@example.com\n tags:\n - 'bbb'\n - 'aaa'\n"
form: {}
headers:
Content-Type:
Expand All @@ -25,15 +25,15 @@ interactions:
proto_minor: 1
transfer_encoding: []
trailer: {}
content_length: -1
uncompressed: true
body: '{"data":[{"id":"b5dca440-5302-4917-b084-2bfcd9516a3b","type":"entity","attributes":{"apiVersion":"v3","kind":"service","name":"tf-testaccdatadogcatalogentity_order-local-1724787783","namespace":"default","tags":["bbb","aaa"]},"relationships":{"schema":{"data":{"id":"b5dca440-5302-4917-b084-2bfcd9516a3b","type":"schema"}}},"meta":{"createdAt":"2024-08-27T19:43:04.799711772Z","modifiedAt":"2024-08-27T19:43:04.799711665Z","ingestionSource":"api","origin":"unknown"}}],"meta":{"count":1,"includeCount":1},"included":[{"id":"b5dca440-5302-4917-b084-2bfcd9516a3b","type":"schema","attributes":{"schema":{"apiVersion":"v3","kind":"service","metadata":{"name":"tf-testaccdatadogcatalogentity_order-local-1724787783","namespace":"default","tags":["bbb","aaa"],"contacts":[{"name":"AA","type":"slack","contact":"AAA"},{"name":"BB","type":"email","contact":"BBB@example.com"},{"name":"AA","type":"email","contact":"AAA@example.com"},{"name":"BB","type":"email","contact":"AAA@example.com"},{"name":"AA","type":"email","contact":"BBB@example.com"}],"managed":{"origin":{"origin":"unknown"},"ingestionSource":"api","createdAt":"2024-08-27T19:43:04.799711772Z","modifiedAt":"2024-08-27T19:43:04.799711665Z","status":{"warnings":[{"keyword_location":"/allOf/0/$ref/properties/metadata/$ref/properties/contacts/items/else/properties/contact/format","instance_location":"/metadata/contacts/0/contact","message":"''AAA'' is not valid ''uri''"}]}}}}}}]}'
content_length: 1154
uncompressed: false
body: '{"data":[{"id":"fe22bcbc-9dcc-483c-8537-31d4d20ac3ce","type":"entity","attributes":{"apiVersion":"v3","kind":"service","name":"tf-testaccdatadogcatalogentity_order-local-1730900816","namespace":"default","tags":["bbb","aaa"]},"relationships":{"schema":{"data":{"id":"fe22bcbc-9dcc-483c-8537-31d4d20ac3ce","type":"schema"}}},"meta":{"createdAt":"2024-11-06T13:46:58.542513502Z","modifiedAt":"2024-11-06T13:46:58.542513402Z","ingestionSource":"api"}}],"meta":{"count":1,"includeCount":1},"included":[{"id":"fe22bcbc-9dcc-483c-8537-31d4d20ac3ce","type":"schema","attributes":{"schema":{"apiVersion":"v3","kind":"service","metadata":{"name":"tf-testaccdatadogcatalogentity_order-local-1730900816","namespace":"default","tags":["bbb","aaa"],"contacts":[{"name":"AA","type":"slack","contact":"AAA"},{"name":"BB","type":"email","contact":"BBB@example.com"},{"name":"AA","type":"email","contact":"AAA@example.com"},{"name":"BB","type":"email","contact":"AAA@example.com"},{"name":"AA","type":"email","contact":"BBB@example.com"}],"managed":{"ingestionSource":"api","createdAt":"2024-11-06T13:46:58.542513502Z","modifiedAt":"2024-11-06T13:46:58.542513402Z"}}}}}]}'
headers:
Content-Type:
- application/vnd.api+json
status: 202 Accepted
code: 202
duration: 100.970792ms
duration: 339.534042ms
- id: 1
request:
proto: HTTP/1.1
Expand All @@ -50,7 +50,7 @@ interactions:
headers:
Content-Type:
- application/json
url: https://api.datadoghq.com/api/v2/catalog/entity?filter%5Bref%5D=service%3Adefault%2Ftf-testaccdatadogcatalogentity_order-local-1724787783&include=schema
url: https://api.datadoghq.com/api/v2/catalog/entity?filter%5Bref%5D=service%3Adefault%2Ftf-testaccdatadogcatalogentity_order-local-1730900816&include=raw_schema
method: GET
response:
proto: HTTP/1.1
Expand All @@ -60,13 +60,13 @@ interactions:
trailer: {}
content_length: -1
uncompressed: true
body: '{"data":[{"id":"b5dca440-5302-4917-b084-2bfcd9516a3b","type":"entity","attributes":{"apiVersion":"v3","kind":"service","name":"tf-testaccdatadogcatalogentity_order-local-1724787783","namespace":"default","tags":["bbb","aaa"]},"relationships":{"schema":{"data":{"id":"b5dca440-5302-4917-b084-2bfcd9516a3b","type":"schema"}}},"meta":{"createdAt":"2024-08-27T19:43:04.799711772Z","modifiedAt":"2024-08-27T19:43:04.799711665Z","ingestionSource":"api","origin":"unknown"}}],"meta":{"count":1,"includeCount":1},"links":{"self":"/api/v2/catalog/entity?filter%5Bref%5D=service%3Adefault%2Ftf-testaccdatadogcatalogentity_order-local-1724787783\u0026include=schema\u0026page%5Blimit%5D=100\u0026page%5Boffset%5D=0"},"included":[{"id":"b5dca440-5302-4917-b084-2bfcd9516a3b","type":"schema","attributes":{"schema":{"apiVersion":"v3","kind":"service","metadata":{"name":"tf-testaccdatadogcatalogentity_order-local-1724787783","namespace":"default","tags":["bbb","aaa"],"contacts":[{"name":"AA","type":"slack","contact":"AAA"},{"name":"BB","type":"email","contact":"BBB@example.com"},{"name":"AA","type":"email","contact":"AAA@example.com"},{"name":"BB","type":"email","contact":"AAA@example.com"},{"name":"AA","type":"email","contact":"BBB@example.com"}],"managed":{"origin":{"origin":"unknown"},"ingestionSource":"api","createdAt":"2024-08-27T19:43:04.799711772Z","modifiedAt":"2024-08-27T19:43:04.799711665Z","status":{"warnings":[{"keyword_location":"/allOf/0/$ref/properties/metadata/$ref/properties/contacts/items/else/properties/contact/format","instance_location":"/metadata/contacts/0/contact","message":"''AAA'' is not valid ''uri''"}]}}}}}}]}'
body: '{"data":[{"id":"fe22bcbc-9dcc-483c-8537-31d4d20ac3ce","type":"entity","attributes":{"apiVersion":"v3","kind":"service","name":"tf-testaccdatadogcatalogentity_order-local-1730900816","namespace":"default","tags":["bbb","aaa"]},"relationships":{"rawSchema":{"data":{"id":"fe22bcbc-9dcc-483c-8537-31d4d20ac3ce","type":"rawSchema"}}},"meta":{"createdAt":"2024-11-06T13:46:58.542513Z","modifiedAt":"2024-11-06T13:46:58.542513402Z","ingestionSource":"api"}}],"meta":{"count":1,"includeCount":1},"links":{"self":"/api/v2/catalog/entity?filter%5Bref%5D=service%3Adefault%2Ftf-testaccdatadogcatalogentity_order-local-1730900816\u0026include=raw_schema\u0026page%5Blimit%5D=100\u0026page%5Boffset%5D=0"},"included":[{"id":"fe22bcbc-9dcc-483c-8537-31d4d20ac3ce","type":"rawSchema","attributes":{"rawSchema":"LS0tCmFwaVZlcnNpb246IHYzCmtpbmQ6IHNlcnZpY2UKbWV0YWRhdGE6CiAgbmFtZTogdGYtdGVzdGFjY2RhdGFkb2djYXRhbG9nZW50aXR5X29yZGVyLWxvY2FsLTE3MzA5MDA4MTYKICBjb250YWN0czoKICAgIC0gbmFtZTogQUEKICAgICAgdHlwZTogc2xhY2sKICAgICAgY29udGFjdDogQUFBCiAgICAtIG5hbWU6IEJCCiAgICAgIHR5cGU6IGVtYWlsCiAgICAgIGNvbnRhY3Q6IEJCQkBleGFtcGxlLmNvbQogICAgLSBuYW1lOiBBQQogICAgICB0eXBlOiBlbWFpbAogICAgICBjb250YWN0OiBBQUFAZXhhbXBsZS5jb20KICAgIC0gbmFtZTogQkIKICAgICAgdHlwZTogZW1haWwKICAgICAgY29udGFjdDogQUFBQGV4YW1wbGUuY29tCiAgICAtIG5hbWU6IEFBCiAgICAgIHR5cGU6IGVtYWlsCiAgICAgIGNvbnRhY3Q6IEJCQkBleGFtcGxlLmNvbQogIHRhZ3M6CiAgICAtICdiYmInCiAgICAtICdhYWEnCg=="}}]}'
headers:
Content-Type:
- application/vnd.api+json
status: 200 OK
code: 200
duration: 36.993375ms
duration: 50.986917ms
- id: 2
request:
proto: HTTP/1.1
Expand All @@ -83,7 +83,7 @@ interactions:
headers:
Content-Type:
- application/json
url: https://api.datadoghq.com/api/v2/catalog/entity?filter%5Bref%5D=service%3Adefault%2Ftf-testaccdatadogcatalogentity_order-local-1724787783&include=schema
url: https://api.datadoghq.com/api/v2/catalog/entity?filter%5Bref%5D=service%3Adefault%2Ftf-testaccdatadogcatalogentity_order-local-1730900816&include=raw_schema
method: GET
response:
proto: HTTP/1.1
Expand All @@ -93,13 +93,13 @@ interactions:
trailer: {}
content_length: -1
uncompressed: true
body: '{"data":[{"id":"b5dca440-5302-4917-b084-2bfcd9516a3b","type":"entity","attributes":{"apiVersion":"v3","kind":"service","name":"tf-testaccdatadogcatalogentity_order-local-1724787783","namespace":"default","tags":["bbb","aaa"]},"relationships":{"schema":{"data":{"id":"b5dca440-5302-4917-b084-2bfcd9516a3b","type":"schema"}}},"meta":{"createdAt":"2024-08-27T19:43:04.799711772Z","modifiedAt":"2024-08-27T19:43:04.799711665Z","ingestionSource":"api","origin":"unknown"}}],"meta":{"count":1,"includeCount":1},"links":{"self":"/api/v2/catalog/entity?filter%5Bref%5D=service%3Adefault%2Ftf-testaccdatadogcatalogentity_order-local-1724787783\u0026include=schema\u0026page%5Blimit%5D=100\u0026page%5Boffset%5D=0"},"included":[{"id":"b5dca440-5302-4917-b084-2bfcd9516a3b","type":"schema","attributes":{"schema":{"apiVersion":"v3","kind":"service","metadata":{"name":"tf-testaccdatadogcatalogentity_order-local-1724787783","namespace":"default","tags":["bbb","aaa"],"contacts":[{"name":"AA","type":"slack","contact":"AAA"},{"name":"BB","type":"email","contact":"BBB@example.com"},{"name":"AA","type":"email","contact":"AAA@example.com"},{"name":"BB","type":"email","contact":"AAA@example.com"},{"name":"AA","type":"email","contact":"BBB@example.com"}],"managed":{"origin":{"origin":"unknown"},"ingestionSource":"api","createdAt":"2024-08-27T19:43:04.799711772Z","modifiedAt":"2024-08-27T19:43:04.799711665Z","status":{"warnings":[{"keyword_location":"/allOf/0/$ref/properties/metadata/$ref/properties/contacts/items/else/properties/contact/format","instance_location":"/metadata/contacts/0/contact","message":"''AAA'' is not valid ''uri''"}]}}}}}}]}'
body: '{"data":[{"id":"fe22bcbc-9dcc-483c-8537-31d4d20ac3ce","type":"entity","attributes":{"apiVersion":"v3","kind":"service","name":"tf-testaccdatadogcatalogentity_order-local-1730900816","namespace":"default","tags":["bbb","aaa"]},"relationships":{"rawSchema":{"data":{"id":"fe22bcbc-9dcc-483c-8537-31d4d20ac3ce","type":"rawSchema"}}},"meta":{"createdAt":"2024-11-06T13:46:58.542513Z","modifiedAt":"2024-11-06T13:46:58.542513402Z","ingestionSource":"api"}}],"meta":{"count":1,"includeCount":1},"links":{"self":"/api/v2/catalog/entity?filter%5Bref%5D=service%3Adefault%2Ftf-testaccdatadogcatalogentity_order-local-1730900816\u0026include=raw_schema\u0026page%5Blimit%5D=100\u0026page%5Boffset%5D=0"},"included":[{"id":"fe22bcbc-9dcc-483c-8537-31d4d20ac3ce","type":"rawSchema","attributes":{"rawSchema":"LS0tCmFwaVZlcnNpb246IHYzCmtpbmQ6IHNlcnZpY2UKbWV0YWRhdGE6CiAgbmFtZTogdGYtdGVzdGFjY2RhdGFkb2djYXRhbG9nZW50aXR5X29yZGVyLWxvY2FsLTE3MzA5MDA4MTYKICBjb250YWN0czoKICAgIC0gbmFtZTogQUEKICAgICAgdHlwZTogc2xhY2sKICAgICAgY29udGFjdDogQUFBCiAgICAtIG5hbWU6IEJCCiAgICAgIHR5cGU6IGVtYWlsCiAgICAgIGNvbnRhY3Q6IEJCQkBleGFtcGxlLmNvbQogICAgLSBuYW1lOiBBQQogICAgICB0eXBlOiBlbWFpbAogICAgICBjb250YWN0OiBBQUFAZXhhbXBsZS5jb20KICAgIC0gbmFtZTogQkIKICAgICAgdHlwZTogZW1haWwKICAgICAgY29udGFjdDogQUFBQGV4YW1wbGUuY29tCiAgICAtIG5hbWU6IEFBCiAgICAgIHR5cGU6IGVtYWlsCiAgICAgIGNvbnRhY3Q6IEJCQkBleGFtcGxlLmNvbQogIHRhZ3M6CiAgICAtICdiYmInCiAgICAtICdhYWEnCg=="}}]}'
headers:
Content-Type:
- application/vnd.api+json
status: 200 OK
code: 200
duration: 42.53075ms
duration: 45.081ms
- id: 3
request:
proto: HTTP/1.1
Expand All @@ -116,7 +116,7 @@ interactions:
headers:
Content-Type:
- application/json
url: https://api.datadoghq.com/api/v2/catalog/entity/service:default/tf-testaccdatadogcatalogentity_order-local-1724787783
url: https://api.datadoghq.com/api/v2/catalog/entity/service:default/tf-testaccdatadogcatalogentity_order-local-1730900816
method: DELETE
response:
proto: HTTP/1.1
Expand All @@ -127,12 +127,10 @@ interactions:
content_length: 0
uncompressed: false
body: ""
headers:
Content-Type:
- application/vnd.api+json
headers: {}
status: 204 No Content
code: 204
duration: 77.101958ms
duration: 510.100333ms
- id: 4
request:
proto: HTTP/1.1
Expand All @@ -149,7 +147,7 @@ interactions:
headers:
Content-Type:
- application/json
url: https://api.datadoghq.com/api/v2/catalog/entity?filter%5Bref%5D=service%3Adefault%2Ftf-testaccdatadogcatalogentity_order-local-1724787783
url: https://api.datadoghq.com/api/v2/catalog/entity?filter%5Bref%5D=service%3Adefault%2Ftf-testaccdatadogcatalogentity_order-local-1730900816
method: GET
response:
proto: HTTP/1.1
Expand All @@ -159,10 +157,10 @@ interactions:
trailer: {}
content_length: 228
uncompressed: false
body: '{"data":[],"meta":{"count":0,"includeCount":0},"links":{"self":"/api/v2/catalog/entity?filter%5Bref%5D=service%3Adefault%2Ftf-testaccdatadogcatalogentity_order-local-1724787783\u0026page%5Blimit%5D=100\u0026page%5Boffset%5D=0"}}'
body: '{"data":[],"meta":{"count":0,"includeCount":0},"links":{"self":"/api/v2/catalog/entity?filter%5Bref%5D=service%3Adefault%2Ftf-testaccdatadogcatalogentity_order-local-1730900816\u0026page%5Blimit%5D=100\u0026page%5Boffset%5D=0"}}'
headers:
Content-Type:
- application/vnd.api+json
status: 200 OK
code: 200
duration: 38.293541ms
duration: 38.7315ms
4 changes: 2 additions & 2 deletions datadog/tests/cassettes/TestAccDatadogIntegrationGCP.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ interactions:
remote_addr: ""
request_uri: ""
body: |
{"client_email":"tf-TestAccDatadogIntegrationGCP-local-1728591727@awesome-project-id.iam.gserviceaccount.com","is_security_command_center_enabled":false,"project_id":"tf-TestAccDatadogIntegrationGCP-local-1728591727"}
{"client_email":"tf-TestAccDatadogIntegrationGCP-local-1728591727@awesome-project-id.iam.gserviceaccount.com","project_id":"tf-TestAccDatadogIntegrationGCP-local-1728591727"}
form: {}
headers:
Accept:
Expand Down Expand Up @@ -546,7 +546,7 @@ interactions:
remote_addr: ""
request_uri: ""
body: |
{"client_email":"tf-TestAccDatadogIntegrationGCP-local-1728591727@awesome-project-id.iam.gserviceaccount.com","is_security_command_center_enabled":false,"project_id":"tf-TestAccDatadogIntegrationGCP-local-1728591727"}
{"client_email":"tf-TestAccDatadogIntegrationGCP-local-1728591727@awesome-project-id.iam.gserviceaccount.com","project_id":"tf-TestAccDatadogIntegrationGCP-local-1728591727"}
form: {}
headers:
Accept:
Expand Down
Loading

0 comments on commit ba07aab

Please sign in to comment.