Skip to content
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

feat(apig): add datasource to get basic configurations of the api #4805

Merged
merged 1 commit into from
May 21, 2024

Conversation

wuzhuanhong
Copy link
Contributor

What this PR does / why we need it:

Add new datasource to get basci configurations of the api under specified dedicated APIG instance.

Which issue this PR fixes:
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)
fixes #xxx

Special notes for your reviewer:

Release note:

 1. add new dataSource to get basci configurations of the api.
 2. add corresponding to document and acceptance test.

PR Checklist

  • Tests added/passed.
  • Documentation updated.
  • Schema updated.

Acceptance Steps Performed

make testacc TEST=./huaweicloud/services/acceptance/apig TESTARGS='-run TestAccDataSourceApiBasicConfigurations_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/apig -v -run TestAccDataSourceApiBasicConfigurations_basic -timeout 360m -parallel 4
=== RUN   TestAccDataSourceApiBasicConfigurations_basic
=== PAUSE TestAccDataSourceApiBasicConfigurations_basic
=== CONT  TestAccDataSourceApiBasicConfigurations_basic
--- PASS: TestAccDataSourceApiBasicConfigurations_basic (680.19s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/apig      680.234s

@wuzhuanhong
Copy link
Contributor Author

make testacc TEST=./huaweicloud/services/acceptance/apig TESTARGS='-run TestAccDataSourceApiBasicConfigurations_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/apig -v -run TestAccDataSourceApiBasicConfigurations_basic -timeout 360m -parallel 4
=== RUN TestAccDataSourceApiBasicConfigurations_basic
=== PAUSE TestAccDataSourceApiBasicConfigurations_basic
=== CONT TestAccDataSourceApiBasicConfigurations_basic
--- PASS: TestAccDataSourceApiBasicConfigurations_basic (692.73s)
PASS
ok github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/apig 692.795s

@wuzhuanhong wuzhuanhong changed the title feat(apig): add datasource to get basci configurations of the api feat(apig): add datasource to get basic configurations of the api May 15, 2024
Comment on lines 54 to 55
* `precise_search` - (Optional, String) Specifies the parameter name for exact matching.
The valid value is `name` or `req_uri`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* `precise_search` - (Optional, String) Specifies the parameter name for exact matching.
The valid value is `name` or `req_uri`.
* `precise_search` - (Optional, String) Specifies the parameter name that you want to match exactly.
The valid values are:
+ **name**: API name, corresponding to the field `name` in this data source arguments.
+ **req_uri**: Request path, corresponding to the field `request_path` in this data source arguments.
This parameter takes effect only after the corresponding parameter(s) is(are) set.

And check whether this parameter can be set to multiple enumerated values, e.g. name,req_uri.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Comment on lines 110 to 111
* `matching` - The matching mode of the API.
The valid value is `Exact` or `Prefix`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you want to list the enumerated values of the property, write as:

Suggested change
* `matching` - The matching mode of the API.
The valid value is `Exact` or `Prefix`.
* `matching` - The matching mode of the API.
+ **Exact**
+ **Prefix**

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

value = length(local.id_filter_result) > 0 && alltrue(local.id_filter_result)
}

# Filter by name (fuzzy search)
Copy link
Collaborator

Choose a reason for hiding this comment

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

please test whether the corresponding parameter (name) supports exact match.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@wuzhuanhong
Copy link
Contributor Author

make testacc TEST=./huaweicloud/services/acceptance/apig TESTARGS='-run TestAccDataSourceApiBasicConfigurations_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/apig -v -run TestAccDataSourceApiBasicConfigurations_basic -timeout 360m -parallel 4
=== RUN TestAccDataSourceApiBasicConfigurations_basic
=== PAUSE TestAccDataSourceApiBasicConfigurations_basic
=== CONT TestAccDataSourceApiBasicConfigurations_basic
--- PASS: TestAccDataSourceApiBasicConfigurations_basic (735.06s)
PASS
ok github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/apig 735.131s

@Lance52259
Copy link
Collaborator

/approve
/lgtm

@github-ci-robot github-ci-robot added LGTM /lgtm approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 21, 2024
Copy link
Collaborator

@github-ci-robot github-ci-robot left a comment

Choose a reason for hiding this comment

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

This PR has been approved by: @Lance52259

/approve
/lgtm

@github-ci-robot github-ci-robot merged commit dfb5e49 into huaweicloud:master May 21, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. feature LGTM /lgtm size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants