Giter Site home page Giter Site logo

Comments (4)

mblaschke avatar mblaschke commented on May 24, 2024 1

Create a certificate with multiple SANs using Azure DNS zones which are in multiple resourceGroups or subscriptions.

As a user i expect that Lego finds the DNS zones automatically in my subscriptions based on the assigned roleAssignments of the serviceprincipal. It should not need a AZURE_SUBSCRIPTION_ID or AZURE_RESOURCE_GROUP but could be possible to filter service discovery.

without AZURE_SUBSCRIPTION_ID and AZURE_RESOURCE_GROUP:
(find all DNS zones in visible scope)

resources
| where type =~ "microsoft.network/dnszones"
| project id, subscriptionId, resourceGroup, name

with only AZURE_SUBSCRIPTION_ID:
(find all DNS zones in one subscription)

resources
| where type =~ "microsoft.network/dnszones"
| where subscriptionId =~ "${AZURE_SUBSCRIPTION_ID}"
| project id, subscriptionId, resourceGroup, name

with AZURE_SUBSCRIPTION_ID and AZURE_RESOURCE_GROUP:
(find all DNS zones in a specific resourcegroup)

resources
| where type =~ "microsoft.network/dnszones"
| where subscriptionId =~ "${AZURE_SUBSCRIPTION_ID}" and resourceGroup =~ "${AZURE_RESOURCE_GROUP}"
| project id, subscriptionId, resourceGroup, name

This would make Azure DNS provider more flexible and easier to use.

I'm willing to create a PR if you are ok with this feature using resourceGraph for service discovery.

from lego.

mblaschke avatar mblaschke commented on May 24, 2024 1

@pchanvallon

implemented a first working preview (tested only with public zones)

as another idea we can also implement an AZURE_SERVICEDISCOVERY_FILTER env var for additional filtering, eg:

resources
| where type =~ "microsoft.network/dnszones"
| where subscriptionId =~ "${AZURE_SUBSCRIPTION_ID}" and resourceGroup =~ "${AZURE_RESOURCE_GROUP}"
| ${AZURE_SERVICEDISCOVERY_FILTER}
| project id, subscriptionId, resourceGroup, name

this could allow validating zones eg. by resourcegroup tags via Kusto subquery

from lego.

ldez avatar ldez commented on May 24, 2024

@pchanvallon do you have any thoughts on this issue?

from lego.

pchanvallon avatar pchanvallon commented on May 24, 2024

Hello @mblaschke ,

I am a bit confused about the underlying use-case.
Can you explain a bit more what you attend to do with this new feature ?

from lego.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.