I appreciate this is something of an edge case, but it would help to significantly reduce the amount of code we have to managed in our Azure Landing Zones and Azure Verified Modules.
We support both GitHub and Azure DevOps as options for our customers to bootstrap their version control system.
Due to a limitation of Terraform Core, we are unable to reference both the github and azuredevops provider in the same module. Terraform Core does not support optional providers. It always attempts to initialise the provider even if no resources or data sources for that provider are part of the graph.
If someone chooses the Azure DevOps option, then we cannot expect them to supply working GitHub credentials as they don't even have access to GitHub.
This means that every module in our module tree has to have 3 versions: github, azuredevops and local (local file system). This is a significant maintenance overhead requiring a lot of copy and paste code.
In order to work around this it would be great if we could add a flag that skips attempting to auth the provider and just returns a success from the init command.
The obvious limitation with this is that if someone does reference a GitHub resource or data source when this provider variable is set they will get an auth error.
If this is something you think could work I would be happy to submit a PR for the code.
SDK Version
No response
API Version
No response
Relevant log output
No response
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Describe the need
I appreciate this is something of an edge case, but it would help to significantly reduce the amount of code we have to managed in our Azure Landing Zones and Azure Verified Modules.
We support both GitHub and Azure DevOps as options for our customers to bootstrap their version control system.
Due to a limitation of Terraform Core, we are unable to reference both the
github
andazuredevops
provider in the same module. Terraform Core does not support optional providers. It always attempts to initialise the provider even if no resources or data sources for that provider are part of the graph.If someone chooses the Azure DevOps option, then we cannot expect them to supply working GitHub credentials as they don't even have access to GitHub.
This means that every module in our module tree has to have 3 versions:
github
,azuredevops
andlocal
(local file system). This is a significant maintenance overhead requiring a lot of copy and paste code.In order to work around this it would be great if we could add a flag that skips attempting to auth the provider and just returns a success from the init command.
e.g.
The obvious limitation with this is that if someone does reference a GitHub resource or data source when this provider variable is set they will get an auth error.
If this is something you think could work I would be happy to submit a PR for the code.
SDK Version
No response
API Version
No response
Relevant log output
No response
Code of Conduct