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

azurerm_app_service_connection: add support for scope, configuration_info and public_network_solution #26387

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

jiaweitao001
Copy link
Contributor

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

Description

PR Checklist

  • I have followed the guidelines in our Contributing Documentation.
  • I have checked to ensure there aren't other open Pull Requests for the same update/change.
  • I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • I have updated/added Documentation as required written in a helpful and kind way to assist users that may be unfamiliar with the resource / data source.
  • I have used a meaningful PR title to help maintainers and other users understand this change and help prevent duplicate work.
    For example: “resource_name_here - description of change e.g. adding property new_property_name_here

Changes to existing Resource / Data Source

  • I have added an explanation of what my changes do and why I'd like you to include them (This may be covered by linking to an issue above, but may benefit from additional explanation).
  • I have written new tests for my resource or datasource changes & updated any relevent documentation.
  • I have successfully run tests with my changes locally. If not, please provide details on testing challenges that prevented you running the tests.
  • (For changes that include a state migration only). I have manually tested the migration path between relevant versions of the provider.

Testing

  • My submission includes Test coverage as described in the Contribution Guide and the tests pass. (if this is not possible for any reason, please include details of why you did or could not add test coverage)

Change Log

Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.

  • azurerm_app_service_connection: add support for scope, configuration_info and public_network_solution

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Related Issue(s)

Fixes #0000

Note

If this PR changes meaningfully during the course of review please update the title and description as required.


---

A `configuration_info` block supports the following:
Copy link
Collaborator

Choose a reason for hiding this comment

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

info is redundent can we remove it?

Suggested change
A `configuration_info` block supports the following:
A `configuration` block supports the following:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Copy link
Member

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

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

Thanks @jiaweitao001 - This appears to be fine, however, the _complete test now always fails due to timeout? Can you take a look? Also, there's no update coverage at all for this resource, can you take a look at covering that also?

Thanks!

@jiaweitao001
Copy link
Contributor Author

Thanks @jiaweitao001 - This appears to be fine, however, the _complete test now always fails due to timeout? Can you take a look? Also, there's no update coverage at all for this resource, can you take a look at covering that also?

Thanks!

Thanks @jackofallops , I've fixed the failing test, the config was not correctly configured. Actually there's update acc test coverage for this resource.

Copy link
Member

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

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

Thanks for the changes @jiaweitao001 - just a couple of items to take another look at if you could?

Thanks!

@@ -551,6 +560,16 @@ resource "azurerm_app_service_connection" "test" {
authentication {
type = "systemAssignedIdentity"
}
scope = "default"
Copy link
Member

Choose a reason for hiding this comment

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

This suggests that the scope value might possibly need a default setting? And will need some validation in the schema?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is an optional field, no default value is required. As service team said, no specific validation is required.

Copy link
Collaborator

Choose a reason for hiding this comment

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

is "" a valid? ie should this at least not permit empty strings?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@jiaweitao001 - could you address this comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for reminding. Addressed.

website/docs/r/app_service_connection.html.markdown Outdated Show resolved Hide resolved
Copy link
Member

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

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

Thanks @jiaweitao001 - Just one more comment to check, and as soon as we have the response and values from the service team for the docs / validation we can look to get this merged.

Comment on lines 137 to 146
"action": {
Type: pluginsdk.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice([]string{
string(servicelinker.ActionTypeOptOut),
string(servicelinker.ActionTypeEnable),
}, false),
Copy link
Member

Choose a reason for hiding this comment

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

given this is the only property, this should be Required or there's no point specifying the block?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not a Required field, under some circumstances, users can either omit this or configuration_store.

Copy link
Member

Choose a reason for hiding this comment

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

Hi @jiaweitao001 - This is the only property in this block? Is there any point specifying the public_network_solution block if action is not specified? If not, then action should be required, or have a default? I'm referring here just to the terraform config, not whether the API marks it as required.

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 got the point. Will change this.

@jackofallops
Copy link
Member

@jiaweitao001 - also, looks like the delete for this now consistently times out on TestAccServiceConnectorAppService_complete can you investigate, and see if there's a way to fix without needing to just increase the timeout? Thanks!

@jiaweitao001
Copy link
Contributor Author

@jiaweitao001 - also, looks like the delete for this now consistently times out on TestAccServiceConnectorAppService_complete can you investigate, and see if there's a way to fix without needing to just increase the timeout? Thanks!

I don't see timeout in Team city now, could you please take a look again?

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Hi, we have a test failure:

------- Stdout: -------
=== RUN   TestAccServiceConnectorAppServiceCosmosdb_update
=== PAUSE TestAccServiceConnectorAppServiceCosmosdb_update
=== CONT  TestAccServiceConnectorAppServiceCosmosdb_update
    testcase.go:173: Step 2/4 error: Pre-apply plan check(s) failed:
        'azurerm_app_service_connection.test' - expected action to not be Replace
--- FAIL: TestAccServiceConnectorAppServiceCosmosdb_update (949.36s)
FAIL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants