-
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
palo_alto_next_generation_firewall make Marketplace Details and Plan Data configurable #28402
palo_alto_next_generation_firewall make Marketplace Details and Plan Data configurable #28402
Conversation
@@ -73,6 +75,10 @@ func (r NextGenerationFirewallVHubLocalRuleStackResource) Arguments() map[string | |||
|
|||
"destination_nat": schema.DestinationNATSchema(), | |||
|
|||
"plan_data": schema.PlanDataSchema(), | |||
|
|||
"marketplace_details": schema.MarketplaceDetailsSchema(), |
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.
Suggest to arrange the newly added fields in alphabetical order. So please swap the position of "plan_data" and "marketplace_details". Other places also need to be updated. Thanks.
"plan_id": { | ||
Type: pluginsdk.TypeString, | ||
Optional: true, | ||
ForceNew: true, |
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.
Could you double confirm that this property is updateable once it's created since service team mentioned that planId should be updateable without the need to delete and recreate the resource? Please also check if "billing_cycle" and "usage_type" is updateable. Thanks.
Type: pluginsdk.TypeString, | ||
Optional: true, | ||
ForceNew: true, | ||
Default: "panw-cloud-ngfw-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.
Service team mentioned that the default value is changed to "panw-cngfw-payg". Could you double check it? Thanks.
Optional: true, | ||
ForceNew: true, | ||
Default: "panw-cloud-ngfw-payg", | ||
ValidateFunc: validation.StringIsNotEmpty, |
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.
Suggest adding validation per property description.
@@ -0,0 +1,72 @@ | |||
// Copyright (c) HashiCorp, Inc. |
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.
Suggest adding these new properties to resource docs. Thanks.
@@ -29,10 +29,12 @@ type NextGenerationFirewallVHubLocalRuleStackModel struct { | |||
ResourceGroupName string `tfschema:"resource_group_name"` |
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.
Suggest triggering the related test cases for the changed resources on your local environment to ensure there is no regression issue. Please also paste the test result in this PR. Thanks.
@@ -29,10 +29,12 @@ type NextGenerationFirewallVHubLocalRuleStackModel struct { | |||
ResourceGroupName string `tfschema:"resource_group_name"` | |||
RuleStackId string `tfschema:"rulestack_id"` |
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.
Suggest add/update test case for newly added properties. Thanks.
Type: pluginsdk.TypeString, | ||
Optional: true, | ||
ForceNew: true, | ||
Default: firewalls.UsageTypePAYG, |
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.
Could you double check if it has the default value since Swagger indicates it's not a required property? Thanks.
result.PlanId = p.PlanId | ||
} | ||
|
||
if p.UsageType != "" { |
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.
Suggest use "pointer.To(firewalls.UsageType(p.UsageType))".
@aochsner , thanks for raising this PR. I've taken a look through and left some comments inline. If we can fix those up, this should be good to go. May I ask if there is ETA for the fix? Your PR is also very useful for other customers, which is why both Microsoft and Hashicorp are paying attention to it. |
@aochsner , Thanks for raising this issue. If we have not received your comments or fixes by this Friday, we will take over the fix. Thank you for your understanding. |
Hi sorry for not responding sooner. I will do my best to review the comments. Thank you for the feedback. I have no problem letting yall take over for it. We have been able to work around our immediate blockers via the azapi provider. But I did a best effort to raise the issue for a proper fix while it's all fresh in my mind |
@aochsner , I noticed that you also made "marketplaceDetails.publisherId," "planData.BillingCycle," and "planData.usageType" configurable parameters. However, the service team only expects planId and offerId to be configurable. Therefore, I will submit a new PR where only planId and offerId will be made configurable parameters. Would that be okay? If you agree, please close this PR. Thanks. |
Yep I agree. Happy to close |
Community Note
Description
Closes #28267
Palo Alto changed the plan id and the one hard coded in the provider is no longer valid. This keeps the old one for backwards compatibility. Would like to backport this to v3.
PR Checklist
For example: “
resource_name_here
- description of change e.g. adding propertynew_property_name_here
”Changes to existing Resource / Data Source
Testing
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_virtual_network_panorama
- support formarketplace_details
andplan_data
properties [palo_alto_next_generation_firewall make Marketplace Details and Plan Data configurable #28402]azurerm_palo_alto_next_generation_firewall_virtual_network_local_rulestack
- support formarketplace_details
andplan_data
properties [palo_alto_next_generation_firewall make Marketplace Details and Plan Data configurable #28402]azurerm_palo_alto_next_generation_firewall_virtual_hub_panorama
- support formarketplace_details
andplan_data
properties [palo_alto_next_generation_firewall make Marketplace Details and Plan Data configurable #28402]azurerm_palo_alto_next_generation_firewall_virtual_hub_local_rulestack
- support formarketplace_details
andplan_data
properties [palo_alto_next_generation_firewall make Marketplace Details and Plan Data configurable #28402]This is a (please select all that apply):
Related Issue(s)
Fixes #28267
Note
If this PR changes meaningfully during the course of review please update the title and description as required.