Skip to content

Commit

Permalink
clean up naming
Browse files Browse the repository at this point in the history
  • Loading branch information
irubnich committed Jan 6, 2025
1 parent e4fd889 commit 5b03771
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion datadog/fwprovider/data_source_datadog_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func (d *connectionDatasource) Read(ctx context.Context, request datasource.Read
// manually set values but we need to read this from API IRL
state.Name = types.StringValue("a name")
state.AWS = &awsConnectionModel{
AssumeRole: &awsAssumeRoleModel{
AssumeRole: &awsAssumeRoleConnectionModel{
AccountID: types.StringValue("accid"),
Role: types.StringValue("role"),
ExternalID: types.StringValue("extid"),
Expand Down
26 changes: 13 additions & 13 deletions datadog/fwprovider/resource_datadog_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,45 +32,45 @@ type connectionResourceModel struct {
}

type awsConnectionModel struct {
AssumeRole *awsAssumeRoleModel `tfsdk:"assume_role"`
AssumeRole *awsAssumeRoleConnectionModel `tfsdk:"assume_role"`
}

type awsAssumeRoleModel struct {
type awsAssumeRoleConnectionModel struct {
AccountID types.String `tfsdk:"account_id"`
Role types.String `tfsdk:"role"`
ExternalID types.String `tfsdk:"external_id"`
PrincipalID types.String `tfsdk:"principal_id"`
}

type httpConnectionModel struct {
BaseURL types.String `tfsdk:"base_url"`
TokenAuth *httpTokenAuthModel `tfsdk:"token_auth"`
BaseURL types.String `tfsdk:"base_url"`
TokenAuth *httpTokenAuthConnectionModel `tfsdk:"token_auth"`
}

type httpTokenAuthModel struct {
Tokens []*tokenModel `tfsdk:"token"`
Headers []*headerModel `tfsdk:"header"`
URLParameters []*urlParameterModel `tfsdk:"url_parameter"`
Body *bodyModel `tfsdk:"body"`
type httpTokenAuthConnectionModel struct {
Tokens []*httpConnectionTokenModel `tfsdk:"token"`
Headers []*httpConnectionHeaderModel `tfsdk:"header"`
URLParameters []*httpConnectionUrlParameterModel `tfsdk:"url_parameter"`
Body *httpConnectionBodyModel `tfsdk:"body"`
}

type tokenModel struct {
type httpConnectionTokenModel struct {
Type types.String `tfsdk:"type"`
Name types.String `tfsdk:"name"`
Value types.String `tfsdk:"value"`
}

type headerModel struct {
type httpConnectionHeaderModel struct {
Name types.String `tfsdk:"name"`
Value types.String `tfsdk:"value"`
}

type urlParameterModel struct {
type httpConnectionUrlParameterModel struct {
Name types.String `tfsdk:"name"`
Value types.String `tfsdk:"value"`
}

type bodyModel struct {
type httpConnectionBodyModel struct {
ContentType types.String `tfsdk:"content_type"`
Content types.String `tfsdk:"content"`
}
Expand Down

0 comments on commit 5b03771

Please sign in to comment.