unosd / pulumi.fsharp.extensions Goto Github PK
View Code? Open in Web Editor NEWF# computational expressions to reduce boilerplate in Pulumi code
License: GNU General Public License v2.0
F# computational expressions to reduce boilerplate in Pulumi code
License: GNU General Public License v2.0
Hello, I'm trying to create EKS cluster but it seems that there is not possible to set vpcConfig with the computation expression. The vpcConfig is mentioned in the comments of the ClustedBuilder but the function is missing and after running pulumi up
I get an error:
System.ArgumentNullException: [Input] Pulumi.Aws.Eks.ClusterArgs.VpcConfig is required but was not given a value (Parameter 'VpcConfig')
my code is:
let rolePolicy = """{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "eks.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}"""
let eksClusterRole = role {
name "eksClusterRole"
assumeRolePolicy rolePolicy
}
let myCluster = cluster {
name "my-cluster"
roleArn eksClusterRole.Arn
//vpcConfig myVpc
}
nuget packages used:
<ItemGroup>
<PackageReference Include="Pulumi.FSharp" Version="2.*"/>
<PackageReference Include="Pulumi.Aws" Version="3.*"/>
<PackageReference Include="Pulumi.FSharp.Aws" Version="2.13.1.22"/>
<PackageReference Include="Pulumi.FSharp.Core" Version="2.0.2"/>
</ItemGroup>
also as a side note, there seems to be some error with required nuget versions Pulumi.FSharp.Aws
wants to use Pulumi.FSharp.Core
of version 2.13.1.22
but this version doesn't exist.
i receive that error on type mismatch, code was taken from readme as an example but had to adjust a bit on metadata, the other part i coudlnt' figure out
// create k8s deployment
module K8s =
open Pulumi.FSharp.Kubernetes
open Pulumi.FSharp.Kubernetes.Apps.V1
open Pulumi.FSharp.Kubernetes.Apps.V1.Inputs
open Pulumi.FSharp.Kubernetes.Meta.V1.Inputs
open Pulumi.FSharp.Kubernetes.Core.V1.Inputs
let test_k8s_dep () project_name =
deployment {
objectMeta {
name "application"
}
deploymentSpec {
replicas 1
labelSelector {
matchLabels [ ("app", input "nginx") ]
}
podTemplateSpec {
objectMeta {
labels ([ "app", input "nginx" ])
}
podSpec {
containers [
container {
name "nginx"
image "nginx"
ports [ containerPort { containerPortValue 80 } ]
}
]
}
}
}
}
Once again, amazing job on this library!
Myriad is a steep learning curve, I know; but the fact that you are generating the CEs makes this library incredibly reliable and resilient. Also, the embedded computation expressions make it so clean and a joy to use.
I only had to fallback to the base Pulumi API once, and that was because I had a pre-existing resource group that I needed to import via pulumi import
, so I needed to create it with the Protect = true
option:
let rgName = $"my-resourcegroup"
let rg =
Pulumi.AzureNative.Resources.ResourceGroup(
rgName,
Pulumi.AzureNative.Resources.ResourceGroupArgs(
Location = pIn "northcentralus",
ResourceGroupName = pIn rgName
), Pulumi.CustomResourceOptions(Protect = true))
But I was able to do everything else via your CEs. ๐๐
Hi,
I've been looking through the code and am really struggling to understand how to use CustomResourceOptions
(e.g. to mark a resource as protected when importing).
Any pointers on how this can be done?
Happy to submit a PR with docs if you can point me in the right direction.
maybe type intellisense could get an improvement somehow, the description of types and usage are quite complex and also seems wrong, so it's not easy to pass arguments to functions in the CE...
or another example...
e.g. container image is a standard string
type
i think in many cases the type suggetion of intellisense are totally wrong / misleading, and could be much simplified
VpcPeeringConnectionArgs
has a R/W property Accepter: Input<Inputs.VpcPeeringConnectionAccepterArgs>
but vpcPeeringConnection { accepter ... }
doesn't work (i.e. VpcPeeringConnectionBuilder
lacks Accepter()
)
PeeringConnectionOptionsBuilder
seems to have the same problem.
Might they be unique in that they take a single option object rather than InputList
, InputMap
?
My issue is that Pulumi is appending generated characters to my resource names.
pulumi/pulumi#7368
Is it possible to specify resource names in such a way that generated characters are not appended?
According the the Pulumi docs, you must do this:
var role = new Aws.Iam.Role("my-role", new Aws.Iam.RoleArgs
{
Name = "my-role-001",
});
It seems that name
in the F# builder only takes a string. Would it be possible to overload it to take a resource name that will not be changed?
Hi there,
First of all I would like to thank you so much for this amazing project. We have been using the libraries quite heavily in our projects. I'd say that we strongly depend on them nowadays.
Unfortunately, looking at the commits history and the open issues it is obvious the you don't have much time for maintenance.
I was wondering what is the future of this project? Are you planning to put effort into it or you are going to abandon it completely?
If my team offers support on maintenance, how should we better do that? Would you have time to review our PRs?
Or maybe you can add me/us as collaborators so we can continue keeping the project up to date? In this case I would highly appreciate if you find time for an introduction call, just to go over the project structure and code style conventions. We don't want to spoil all the hard work you've done. We don't want to fork the project and create duplicates in the Nuget repository, we'd rather contribute to the original version.
Please let me know your thoughts. I'd be happy to discuss any details.
Hi,
I was wondering if you knew why sometimes the CI would just not complete running for certain packages? E.g. https://github.com/UnoSD/Pulumi.FSharp.Extensions/runs/5834434536 has been running for a while now, which I figured was normal until I looked further up the CI history and saw that some jobs had been queued for 60+ days. My previous MR's main purpose was to get the latest version of Pulumi.FSharp.Gcp, and I'm wondering if there's something missing to make that happen? Please LMK if I can help.
Edit: Example of 60+ queued job: https://github.com/UnoSD/Pulumi.FSharp.Extensions/runs/4941344244
lt would be awesome if we could support something like:
let defaultK8sDeployment = deployment {
...
}
let k8sDeploy = deployment {
withDefault defaultK8sDeployment
}
The k8s is just an example, we should be able to do that for everything. That will make it super easy to create small helpers that are reusable.
I am trying to set a web AppService Identity
property, but the appService
computation expression doesn't have an identity
custom operation.
I'm trying to set it to "SystemAssigned" per this example so that I can give it access to a KeyVault resource.
Is there a way to set the identity?
is google cloud sdk DSL also supported for GCP resources?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.