Azure / bicep-registry-modules

Bicep registry modules
MIT License
390 stars 257 forks source link

Public IP address DDoS Settings #1940

Closed darrenFrowen closed 1 week ago

darrenFrowen commented 2 weeks ago

Check for previous/existing GitHub issues

Issue Type?

I'm not sure

Module Name

avm/res/network/public-ip-address

(Optional) Module Version

0.4.0

Description

Hi,

In my own public IP resource Bicep templates using 'Microsoft.Network/publicIPAddresses@2023-04-01' i have public IP address IP protection enabled not part of a DDoS Protection plan. This is defined using the following property. It appear this is not supported in the AVM module? If i specify only the protectionMode i see the following error "The specified "object" declaration is missing the following required properties: "ddosProtectionPlan".

ddosSettings: {
  protectionMode: 'Enabled'
}

(Optional) Correlation Id

No response

AlexanderSehr commented 1 week ago

Hey @ChrisSidebotham could you take a look at this issue?

@darrenfrowen, sorry for not coming around earlier. It seems something went wrong with the automatic issue assignment.

darrenFrowen commented 1 week ago

Hi Alex,No problem at all thanks for your response.RegardsOn 21 May 2024, at 18:35, Alexander Sehr @.***> wrote: Hey @ChrisSidebotham could you take a look at this issue? @darrenfrowen, sorry for not coming around earlier. It seems something went wrong with the automatic issue assignment.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

ChrisSidebotham commented 1 week ago

@darrenfrowen - Thanks for submitting this, good to see you in this space! I have updated the ddosSettingType in #2006, once this is approved and merged a new version will be available for use

darrenFrowen commented 1 week ago

Hi Chris,

Thanks for the update and hope your well. I only found AVM a few months ago and think its such a great resource. Great community call on Tuesday by the way.

Regards

darrenFrowen commented 1 week ago

@ChrisSidebotham

There seems to be an issue, if i set the object on the module as follows, we can see a conflict where it specifies as both required and optional for the ddosProtectionPlan

image

If i set the parameter object outside of the module then reference the parameter i see no error but the IP protection fails. without any error.

image

Can you confirm that it does work with the following result under Protect IP address of the public IP resource please?

image

ChrisSidebotham commented 1 week ago

@darrenFrowen - Leave this with me and will investigate today! :)

darrenFrowen commented 1 week ago

@ChrisSidebotham thank you very much appreciated

ChrisSidebotham commented 1 week ago

@darrenFrowen it seems the CDN is being slow but the module version should actually be 0.4.1.

example:

module pip 'br/public:avm/res/network/public-ip-address:0.4.1' = {
  name: 'myPipTest01'
  params: {
    name: 'csuk-tst-avmpip02'
    ddosSettings:{
      protectionMode: 'Enabled'
    }
    skuTier: 'Regional'
  }
}

This is my output: image

darrenFrowen commented 1 week ago

@ChrisSidebotham yes i wasn't picking any new version up which i found strange.

image

So i have just forced the module to version 4.0.1 the module now accepts the single protectionMode property and the deployment now works as expected.

image

Thanks for your support Chris really appreciated.

ChrisSidebotham commented 1 week ago

Thanks for confirming @darrenFrowen. Sometimes your local client may be caching the available versions - il close this issue now :)

darrenFrowen commented 1 week ago

Thanks Chris I’ll keep that in mind next timeOn 24 May 2024, at 14:17, ChrisSidebotham-MSFT @.***> wrote: Thanks for confirming @darrenFrowen. Sometimes your local client may be caching the available versions - il close this issue now :)

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

darrenFrowen commented 1 week ago

thanks @ChrisSidebotham ill keep that in mind next time