Comments (5)
I'm fine with adding both name
and resourceName
, so you can close this too if you want.
from pulumi.fsharp.extensions.
That was a bit tricky from a naming perspective, but I recall I added a resourceName
operation on the builders that should map to the name of the cloud resource (rather than the Pulumi name). It should override the auto-naming in Pulumi.
Yep, that sounds about right: https://github.com/UnoSD/Pulumi.FSharp.Extensions/blob/master/Pulumi.FSharp.Myriad/Operations.fs#L236
from pulumi.fsharp.extensions.
That worked (thank you!), but with a few caveats:
-
Setting only
resourceName
results in a null ref exception forname
. But setting bothname
andresourceName
seems to work. (I'm not sure if that's order dependent). -
KeyVault.accessPolicy doesn't have a
resourceName
, onlyname
. Although that may not matter since the access policies aren't visible from the resource group listing anyway.
Since you're generating the entire computation expression (correct?), I guess it's not possible (or not very easy) to simply have the resourceName
custom operation set both?
from pulumi.fsharp.extensions.
Btw, really great idea to use Myriad here as you have done. Well done!
I used Myriad in an early alpha of SqlHydra to generate records from SQL Server SSDT .dacpac file, but have since pivoted to make it a dotnet tool instead.
from pulumi.fsharp.extensions.
That worked (thank you!), but with a few caveats:
- Setting only
resourceName
results in a null ref exception forname
. But setting bothname
andresourceName
seems to work. (I'm not sure if that's order dependent).- KeyVault.accessPolicy doesn't have a
resourceName
, onlyname
. Although that may not matter since the access policies aren't visible from the resource group listing anyway.Since you're generating the entire computation expression (correct?), I guess it's not possible (or not very easy) to simply have the
resourceName
custom operation set both?
Glad it's working; I have not had a lot of time to recently to spend on the project, so it's good to have someone else using it and getting some feedback.
- That's expected, Pulumi requires the "name", so it makes sense it throws an exception (would be nice a more functional response, but that's not in my code).
- Does an Access policy in KV have a name? Being part of a resource I don't know if it can have a name in Azure at all. In that case, it would make sense to have only the Pulumi name as the Azure REST API may not have a option to set it. Looking at https://docs.microsoft.com/en-us/rest/api/keyvault/vaults/create-or-update#accesspolicyentry it does not seem to have a name.
It would be possible to set both using the resource name, it would require a more complex implementation of the creation (if name is not set, use resourceName, if it's set, use that), but I wonder if that could be an issue where the resource name accepts certain characters and the Pulumi name doesn't; need to investigate that.
Btw, really great idea to use Myriad here as you have done. Well done!
I used Myriad in an early alpha of SqlHydra to generate records from SQL Server SSDT .dacpac file, but have since pivoted to make it a dotnet tool instead.
Thank you, it was fun using it despite the lack of documentation (there and on Fantomas), they are awesome projects, but the learning curve it's steep without many examples. Great to know that I can also have a look at your project.
from pulumi.fsharp.extensions.
Related Issues (14)
- Support default values for resources
- Cannot create EKS cluster HOT 1
- How to set AppService Identity HOT 2
- Great job.. HOT 1
- Google Cloud SDK DSL HOT 6
- Pulumi.Fsharp.Gcp HOT 3
- Pulumi.FSharp.Kubernetes type mismatch HOT 1
- CI running for a long time HOT 2
- How to use CustomResourceOptions? HOT 12
- namespaces issues HOT 1
- intellisense on types HOT 1
- Some builders don't support all setter properties HOT 3
- The future of this project HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pulumi.fsharp.extensions.