pulumi | Collection of Pulumi modules | AWS library
kandi X-RAY | pulumi Summary
kandi X-RAY | pulumi Summary
A collection of Pulumi modules we have built.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of pulumi
pulumi Key Features
pulumi Examples and Code Snippets
Community Discussions
Trending Discussions on pulumi
QUESTION
I created a simple example Pulumi TypeScript program that should deploy a Spring Boot application into a AWS ECS Fargate Cluster. The Spring Boot app is containerized/Dockerized with the help of Cloud Native Buildpacks/Paketo.io and published to the GitHub Container Registry at ghcr.io/jonashackt/microservice-api-spring-boot
(example project here).
I've read through some Pulumi tutorials and started with the usual pulumi new aws-typescript
. I now have the following index.ts
:
ANSWER
Answered 2021-May-05 at 16:35The default AWS TargetGroup HealthCheckPath
is simply /
(see the docs). And as a standard Spring Boot application often responds with a HTTP 404
like this:
the ApplicationLoadBalancers health checks Status
inside the TargetGroups go to unhealthy
, thus triggering a restart of the Fargate Services.
How do we solve this? In Spring Boot you would normally use the spring-boot-actuator. Adding it to your pom.xml
the application responds to localhost:yourPort/actuator/health
:
QUESTION
I'am working on a AWS Fargate Cluster setup with Pulumi and my current program already successfully creates a Cluster incl. Fargate Tasks that run a public accessible container image. My image is based on Spring Boot (project code on GitHub):
...ANSWER
Answered 2021-May-10 at 11:30In the AWS docs there's a detailed guide on how to grant ECS EC2 & Fargate launch type Tasks access to private Registries. Derived from that there are 4 steps to take:
- Obtain Token or credentials to access private Container Registry
- Create AWS Secrets Manager Secret containing Token/Creds to private Registry
- Craft Task Execution Role (using aws.iam.Role) containing inlinePolicy for private Container Registry access
- Enhance awsx.ecs.FargateService to use our Task Execution Role & Secret ARN in repositoryCredentials
0. Obtain Token or credentials to access private Container Registry
If you don't already have them, you'll need to create an Access Token or credentials inside our private Registry so that an external service is able to access it. With GitHub Container Registry for example we need to create a Personal Access Token (see docs here) using the read:packages
scope as a minimum:
1. Create AWS Secrets Manager Secret containing Token/Creds to private Registry
Now head over to the AWS Secrets Manager console at https://console.aws.amazon.com/secretsmanager/ and create a new Secret via the Store a new secret
button. In the GUI choose Other type of secrets
and Plaintext
- and then fill in your private Registry credentials as JSON:
QUESTION
I want to use pulumi to import one of my existing resources on AWS.
So I ran pulumi import aws:elasticache/cluster:Cluster my-redis my-redis
command and got the following details in the output:
ANSWER
Answered 2021-May-06 at 02:43In https://github.com/pulumi/pulumi/issues/6856, you can see that one of the developers of pulumi says
This is the expected behavior. For the purposes of importing the resource to be managed by Pulumi, the necessary inputs are specified in the code generated. You are of course welcome to include the additional details in your code, but Pulumi has generated what is necessary to import the resource.
To see all of the inputs/outputs of your resources, you can take a look at your state file (
pulumi stack export
).
So this is an expected behavior. The developers of pulumi don't want to show all the details in the code by default.
And currently, there's no way generate a code with all the details.
Those details are stored in the backend of pulumi. They can be found in .pulumi/stacks/.json
in the backend.
QUESTION
My goal is to create a GCP CloudBuild Trigger using Pulumi. I'm using the Typescript client.
When creating a Google-managed secret (as opposed to customer-managed) I don't use KMS.
What would I put into the required (!) variable build.secrets[0].kmsKeyName? This is trivial when using KMS, but I found no "default" or "global" KMS name that would work when running the trigger with a Google-managed secret. I can create the trigger with a "fake" KMS name, but it doesn't run, complaining with:
Failed to trigger build: generic::invalid_argument: invalid build: invalid secrets: kmsKeyName "?WHAT TO PUT HERE?" is not a valid KMS key resource
.
Thank you in advance for any suggestions.
...ANSWER
Answered 2021-Apr-29 at 17:30I don't think you can use a SecretManager
secret with cloud build through Pulumi. I solved it by creating a kms key and encrypting my data using gcp.kms.Ciphertext
. Here's what it looks like:
QUESTION
In the Create an AWS S3 Website in Under 5 Minutes YT video and Host a Static Website on Amazon S3 Pulumi tutorial there are great explanations how to create a website hosting on S3 using Pulumi.
In the example code Pulumi's Bucket and BucketObject are used. The first creates a S3 Bucket and the latter creates the objects, which are mostly an index.html
for public access like this:
ANSWER
Answered 2021-Apr-29 at 13:36I went on with the approach and tried to build a recursive TypeScript function, that either creates files or directories based on Pulumi's BucketObject, as recommended by the tutorials.
This got me down a complicated way! I needed to create directories using BucketObject
, what could be achieved using a appended "/"
inside the key
argument (see this answer). Just for the record, the function for that looked like this:
QUESTION
I'm trying to build a docker file with Pulumi. I have the following Pulumi code
...ANSWER
Answered 2021-Apr-11 at 19:55Your Pulumi projects builds inside your infra
directory, not in the folder your Pulumi.yaml
is in.
The Pulumi provider needs to know the path of the Dockerfile
using the docker build context (more info about these here)
Adding the context should fix this:
QUESTION
I am trying to automate what can be done via the Azure portal with the following screen.
I have defined a WebApp and a WebAppAzureStorageAccounts
When trying to construct the WebAppAzureStorageAccounts
I get the following error:
error: parent resource does not exist for resource
I think this is because I don't know how to associate the WebAppAzureStorageAccounts
to the WebApp
.
I was expecting a property named something like StorageAccounts
or PathMappings
to be on WebApp SiteConfigArgs
Pulumi version: 2.23.1
Language C#
Pulumi.AzureNative: 0.7.1
--- Update ---
Some code snippets... I wrap the Pulumi classes in so I can use the builder pattern with some reusable defaults. So not your normal.
...ANSWER
Answered 2021-Mar-31 at 20:44If I read your code correctly, you assign an arbitrary name to the WebAppAzureStorageAccounts
resource. Instead, you should assign the Name
property to the name of your web app (the parent resource). It's not the best naming choice from the Azure API but the comment says Name of the app.
Here is the idea that should work:
QUESTION
I've code to deploy a helm chart using pulumi
kubernetes.
I would like to patch the StatefulSet
(change serviceAccountName
) after deploying the chart. Chart doesn't come with an option to specify service account for StatefulSet
.
here's my code
...ANSWER
Answered 2021-Mar-25 at 14:15Pulumi has a powerful feature called Transformations which is exactly what you need here(Example). A transformation is a callback that gets invoked by the Pulumi runtime and can be used to modify resource input properties before the resource is created.
I've not tested the code but you should get the idea:
QUESTION
I'm trying to initialize a managed PostgreSQL database using Pulumi. The PostgreSQL server itself is hosted and managed by Google Cloud SQL, but I set it up using Pulumi.
I can successfully create the database, but I'm stumped how to actually initialize it with my schemas, users, tables, etc. Does anyone know how to achieve this?
I believe I need to use the Postgres provider, similar to what they do for MySQL in this tutorial or this example. The below code shows what I have so far:
...ANSWER
Answered 2021-Mar-25 at 19:57Here is sample code with an explanation on how we set everything up including create/delete table with Pulumi.
The code will look like this:
QUESTION
I am trying to deploy localstack with Pulumi. In particular I am trying to follow this example.
The code is the following.
...ANSWER
Answered 2021-Mar-23 at 17:55The solution was to add network_mode: bridge
to my docker compose file, which I show here.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pulumi
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page