-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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_palo_alto_next_generation_firewall_*
- support for new properties marketplace_offer_id
and plan_id
#28537
base: main
Are you sure you want to change the base?
azurerm_palo_alto_next_generation_firewall_*
- support for new properties marketplace_offer_id
and plan_id
#28537
Conversation
…k - support for new properties marketplace_offer_id and plan_id
…port for new properties marketplace_offer_id and plan_id
…stack - support for new properties marketplace_offer_id and plan_id
… support for new properties marketplace_offer_id and plan_id
if !features.FivePointOhBeta() { | ||
return fmt.Sprintf(` | ||
%[1]s | ||
resource "azurerm_palo_alto_next_generation_firewall_virtual_hub_local_rulestack" "import" { | ||
name = azurerm_palo_alto_next_generation_firewall_virtual_hub_local_rulestack.test.name | ||
resource_group_name = azurerm_palo_alto_next_generation_firewall_virtual_hub_local_rulestack.test.resource_group_name | ||
rulestack_id = azurerm_palo_alto_next_generation_firewall_virtual_hub_local_rulestack.test.rulestack_id | ||
plan_id = azurerm_palo_alto_next_generation_firewall_virtual_hub_local_rulestack.test.plan_id | ||
network_profile { | ||
virtual_hub_id = azurerm_palo_alto_next_generation_firewall_virtual_hub_local_rulestack.test.network_profile.0.virtual_hub_id | ||
network_virtual_appliance_id = azurerm_palo_alto_next_generation_firewall_virtual_hub_local_rulestack.test.network_profile.0.network_virtual_appliance_id | ||
public_ip_address_ids = azurerm_palo_alto_next_generation_firewall_virtual_hub_local_rulestack.test.network_profile.0.public_ip_address_ids | ||
} | ||
} | ||
`, r.basic(data)) | ||
} | ||
return fmt.Sprintf(` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is necessary since plan_id
is an optional property, the existing config for the requires import test should still work?
if !features.FivePointOhBeta() { | ||
return fmt.Sprintf(` | ||
provider "azurerm" { | ||
features {} | ||
} | ||
%[1]s | ||
resource "azurerm_palo_alto_next_generation_firewall_virtual_hub_local_rulestack" "test" { | ||
name = "acctest-ngfwvh-%[2]d" | ||
resource_group_name = azurerm_resource_group.test.name | ||
rulestack_id = azurerm_palo_alto_local_rulestack.test.id | ||
plan_id = "panw-cngfw-payg" | ||
network_profile { | ||
virtual_hub_id = azurerm_virtual_hub.test.id | ||
network_virtual_appliance_id = azurerm_palo_alto_virtual_network_appliance.test.id | ||
public_ip_address_ids = [azurerm_public_ip.test.id] | ||
} | ||
} | ||
`, r.template(data), data.RandomInteger) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The basic test config shouldn't include optional arguments. I think this can be removed since we've added plan_id
to the complete
test configuration
resource_group_name = azurerm_resource_group.test.name | ||
rulestack_id = azurerm_palo_alto_local_rulestack.test.id | ||
marketplace_offer_id = "pan_swfw_cloud_ngfw" | ||
plan_id = "panw-cngfw-payg" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be panw-cloud-ngfw-payg
so we can test the update path of this property?
if !features.FivePointOhBeta() { | ||
return fmt.Sprintf(` | ||
provider "azurerm" { | ||
features {} | ||
} | ||
|
||
%[1]s | ||
|
||
resource "azurerm_palo_alto_next_generation_firewall_virtual_hub_panorama" "test" { | ||
name = "acctest-ngfwvh-%[2]d" | ||
resource_group_name = azurerm_resource_group.test.name | ||
location = azurerm_resource_group.test.location | ||
panorama_base64_config = "%[3]s" | ||
plan_id = "panw-cngfw-payg" | ||
|
||
network_profile { | ||
virtual_hub_id = azurerm_virtual_hub.test.id | ||
network_virtual_appliance_id = azurerm_palo_alto_virtual_network_appliance.test.id | ||
public_ip_address_ids = [azurerm_public_ip.test.id] | ||
} | ||
} | ||
`, r.template(data), data.RandomInteger, os.Getenv("ARM_PALO_ALTO_PANORAMA_CONFIG")) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remark here, optional properties shouldn't be added to basic tests, I think this can be removed since it's been added to the complete
config. This comment applies to all the other resource tests that have been modified in this PR.
### `azurerm_palo_alto_next_generation_firewall_virtual_hub_local_rulestack` | ||
|
||
* The `plan_id` property now defaults to `panw-cngfw-payg`. | ||
|
||
### `azurerm_palo_alto_next_generation_firewall_virtual_hub_panorama` | ||
|
||
* The `plan_id` property now defaults to `panw-cngfw-payg`. | ||
|
||
### `azurerm_palo_alto_next_generation_firewall_virtual_network_local_rulestack` | ||
|
||
* The `plan_id` property now defaults to `panw-cngfw-payg`. | ||
|
||
### `azurerm_palo_alto_next_generation_firewall_virtual_network_panorama` | ||
|
||
* The `plan_id` property now defaults to `panw-cngfw-payg`. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The upgrade guide follows alphabetical ordering, these need to be moved up
Community Note
Description
Recently, I noticed that the test cases related to "azurerm_palo_alto_next_generation_firewall_" have been consistently failing with below error on TeamCity Daily Run. The error message indicates that "panw-cloud-ngfw-payg" has been deprecated. So service API doesn't allow it while provisioning the resource. Additionally, the service team has recently reached out to us, requesting that we update the default value of planId and make both planId and offerId configurable parameters. The following linked GitHub issue was also created by the service team.
Error Message:
PR Checklist
For example: “
resource_name_here
- description of change e.g. adding propertynew_property_name_here
”Changes to existing Resource / Data Source
Testing
TF 4.x:
TF 5.x:
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_palo_alto_next_generation_firewall_*
- support for new propertiesmarketplace_offer_id
andplan_id
This is a (please select all that apply):
Related Issue(s)
Fixes #28267
Fixes #28526
Note
If this PR changes meaningfully during the course of review please update the title and description as required.