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_web_application_firewall_policy - http_listener_ids and path_based_rule_ids are now Computed only #11196

Merged
merged 3 commits into from
Apr 2, 2021

Conversation

mbfrahry
Copy link
Member

@mbfrahry mbfrahry commented Apr 1, 2021

Unfortunately, http_listener_ids and path_based_rule_ids are listed as READONLY in all versions of the azure-sdk. This PR sets those fields as Computed and removes the failing test.

// HTTPListeners - READ-ONLY; A collection of references to application gateway http listeners.
HTTPListeners *[]SubResource `json:"httpListeners,omitempty"`
// PathBasedRules - READ-ONLY; A collection of references to application gateway path rules.
PathBasedRules *[]SubResource `json:"pathBasedRules,omitempty"`

@ghost ghost added the size/XS label Apr 1, 2021
@ghost ghost added size/L and removed size/XS labels Apr 2, 2021
@mbfrahry mbfrahry requested a review from a team April 2, 2021 18:03
@mbfrahry mbfrahry marked this pull request as ready for review April 2, 2021 18:03
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.

LGTM 👍

@mbfrahry mbfrahry changed the title Test Fix: azurerm_application_gateway customHttpListenerFirewallPolicyWithAssociations azurerm_web_application_firewall_policy - http_listener_ids and path_based_rule_ids are now Computed only Apr 2, 2021
@mbfrahry mbfrahry merged commit a0cc916 into master Apr 2, 2021
@mbfrahry mbfrahry deleted the tf-app-gateway-httplistener branch April 2, 2021 19:17
mbfrahry added a commit that referenced this pull request Apr 2, 2021
@aberva
Copy link

aberva commented Apr 6, 2021

Hi,

The import for Web Application Firewall Policy does not include http_listener_ids and path_based_rule_ids.

Additionally, could you provide an example http_listener_ids or path_based_rule_ids declaration?
I did not find any related examples.
I was hoping to be able to base myself on the azurerm_application_gateway resource (in the same configuration file) but in the documentation it does not seem possible to export the "http_listener".

Thank you for your help.

@mbfrahry mbfrahry added this to the v2.55.0 milestone Apr 6, 2021
@mbfrahry
Copy link
Member Author

mbfrahry commented Apr 6, 2021

Hi @aberva. These changes will go out in the next version of the Azure provider. Also, http_listener_ids and path_based_rule_ids are not declarable because the API treats these attributes as read only.

If you have any other questions, please open a new issue and we can continue our conversation there.

@ghost
Copy link

ghost commented Apr 9, 2021

This has been released in version 2.55.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.55.0"
}
# ... other configuration ...

@sirlatrom
Copy link
Contributor

I'm surprised to learn this, but then I didn't know where to check for read only status.

It is possible to set the attributes through the Azure Portal, so when I added them to the provider, it was with the impression it was possible. I tested it in a sandbox subscription, too, so I think it might be the docs on these attributes that are wrong...

@aberva
Copy link

aberva commented Apr 9, 2021

I just opened an issue on the import of the zurerm_web_application_firewall_policy (version v.2.55.0) which is closely related to the subject.

#11273 (comment)

@sirlatrom
Copy link
Contributor

I'm surprised to learn this, but then I didn't know where to check for read only status.

It is possible to set the attributes through the Azure Portal, so when I added them to the provider, it was with the impression it was possible. I tested it in a sandbox subscription, too, so I think it might be the docs on these attributes that are wrong...

Turns out this is fixed in #11239

@ghost
Copy link

ghost commented May 3, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators May 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants