pulumi | Build infrastructure | Infrastructure Automation library
kandi X-RAY | pulumi Summary
kandi X-RAY | pulumi Summary
Pulumi's Infrastructure as Code SDK is the easiest way to create and deploy cloud software that use containers, serverless functions, hosted services, and infrastructure, on any cloud. Simply write code in your favorite language and Pulumi automatically provisions and manages your AWS, Azure, Google Cloud Platform, and/or Kubernetes resources, using an infrastructure-as-code approach. Skip the YAML, and use standard language features like loops, functions, classes, and package management that you already know and love.
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
let aws = require("@pulumi/aws");
let sg = new aws.ec2.SecurityGroup("web-sg", {
ingress: [{ protocol: "tcp", fromPort: 80, toPort: 80, cidrBlocks: ["0.0.0.0/0"] }],
});
for (let i = 0; i < 3; i++) {
new aws.ec2.Instance(`web-${i}`, {
$ curl -fsSL https://get.pulumi.com/ | sh
$ mkdir pulumi-demo && cd pulumi-demo
$ pulumi new hello-aws-javascript
$ pulumi up
$ curl $(pulumi stack output url)
$ pulumi logs -f
$ pulumi destroy -y
from pulumi_azure_native import documentdb
containers_name = {
'mytest1': '/test1',
'mytest2': '/test2',
'mytest3': '/test3',
}
# Create Containers
for container in containers_name.keys():
sql_api_resource_con
...
app_settings={
"FUNCTIONS_WORKER_RUNTIME": "python"
},
...
import pulumi
from pulumi_command import local
random = local.Command("random",create=" bq query --use_legacy_sql=false <
test.sql" )
pulumi.export("random", random.stdout)
cat ~/.ssh/id_rsa | pulumi config set secretKey --secret
task_definition = aws.ecs.TaskDefinition(
"app-task",
family="fargate-task-definition",
cpu="256",
memory="512",
network_mode="awsvpc",
requires_compatibilities=["FARGATE"],
execution_role_arn=role.arn,
cont
// Create a VPC for our cluster.
const vpc = new awsx.ec2.Vpc("vpc", { numberOfAvailabilityZones: 2 });
// Create the EKS cluster itself and a deployment of the Kubernetes dashboard.
const cluster = new eks.Cluster("cluster", {
vpcId:
# using concat
conn_str = pulumi.Output.concat(
"DefaultEndpointsProtocol=https;AccountName=",
storage_name,
";AccountKey=",
storage_primary_key,
";EndpointSuffix=core.windows.net",
)
resource_group = = azure_native.resources.ResourceGroup("main",
location="eastus",
resource_group_name="{0}-{1}-{2}-{3}".format(org, tenant, environment, rgname))
Community Discussions
Trending Discussions on pulumi
QUESTION
I want to create some servers on DigitalOcean using Pulumi. I have the following code:
...ANSWER
Answered 2022-Apr-15 at 22:45The short answer is that because these values are Output
s, if you want the strings, you'll need to use .apply
:
https://www.pulumi.com/docs/intro/concepts/inputs-outputs/#apply
To access the raw value of an output and transform that value into a new value, use
apply
. This method accepts a callback that will be invoked with the raw value, once that value is available.
You can print
these IPs by iterating over the list and calling the apply
method on the ipv4_address
output value:
QUESTION
I'm creating a droplet in DigitalOcean with Pulumi. I have the following code:
...ANSWER
Answered 2022-Apr-15 at 21:59This is a result of auto-naming, which is explained here in the Pulumi docs:
https://www.pulumi.com/docs/intro/concepts/resources/names/#autonaming
The extra characters tacked onto the end of the resource name allow you to use the same "logical" name (your "server"
) with multiple stacks without risk of a collision (as cloud providers often require resources of the same kind to ba named uniquely). Auto-naming looks a bit strange at first, but it's incredibly useful in practice, and once you start working with multiple stacks, you'll almost surely appreciate it.
That said, you can generally override this name by providing a name
in your list of resource arguments:
QUESTION
I tried to create some containers on my Cosmos Db with the Pulumi from this reference.
Regrading the above reference the Partition ID Input should be String
.
My code is:
...ANSWER
Answered 2022-Mar-28 at 17:03Make the paths
option an array:
QUESTION
A containerDefinition within a Task Definition needs to be provided as a single valid JSON document. I'm creating a generic ECS service that should handle dynamic data. Here is the code:
...ANSWER
Answered 2022-Mar-23 at 19:08Assuming clientTemplate
works correctly and the error happens in the snippet that you shared, you should be able to solve it with
QUESTION
I am trying to create a sql.ServerVulnerabilityAssessment
resource in the following way:
ANSWER
Answered 2022-Mar-17 at 10:04Storage Account and Container names are Pulumi outputs, meaning they may not be known yet at the time when the program runs. You need to format the path using Output.all
:
QUESTION
in a pulumi script i get the following error running pulumi up
ANSWER
Answered 2022-Mar-11 at 16:08sql_server.resource_group_name
does not exist. Use resource_group.name
instead.
QUESTION
We have a AWS EKS setup (full repo here), where we install Traefik using Helm. This creates a Kubernetes Service
called traefik
which gets provisioned an AWS Elastic Load Balancer. The ELB url can be obtained using kubectl
like this:
ANSWER
Answered 2022-Mar-11 at 12:36We choose to use AWS CLI to do that for us. The docs provide a starting point. But we can't do this using a static file like with the proposed --change-batch file://sample.json
- instead we need to have it dynamic so we can use a command inside our GitHub Actions workflow.
The idea is derived from this so answer, where we can simply use the json snippet inline without an extra file. Also need to have an idempotent solution which we can run 1 or many times in GitHub Actions CI. Therefore we used the "Action" : "UPSERT"
(see https://aws.amazon.com/premiumsupport/knowledge-center/simple-resource-record-route53-cli/).
QUESTION
I am new to Pulumi. Is there any option to lock a particular stack in Pulumi to prevent accidental updates or deletion? I understand that RBAC is enforced to provide this functionality to only members with required permissions.However, I still want to prevent accidental changes to the stack even when the persons with all necessary permissions attempt to do it.
...ANSWER
Answered 2022-Mar-09 at 11:30You're correct in that only members of teams with the correct permissions on stacks can update them or destroy them. There's no way to lock a stack.
What I would do is have a separate stack for your production deployment and then only give access to your CI/CD pipeline tool of choice so that no one else can do the update.
This is also why Pulumi has previews so that you can see what is being changed before you agree to the update.
Recently, Pulumi announced "Update Plans" (blog post announcing this: https://www.pulumi.com/blog/announcing-public-preview-update-plans/) that might help you out.
QUESTION
I create a Pulumi.AzureNative.OperationalInsights.Workspace with the following:
...ANSWER
Answered 2022-Mar-01 at 14:16The WorkspaceId
is derived from the workspace.CustomerId
The WorkspaceKey
isn't returned directly by the workspace, you need to retrieve it using GetSharedKeys
Here's a full working example that provisions successfully for me
QUESTION
I currently create a service principal using the Azure CLI:
az ad sp create-for-rbac --name foo --role Contributor
I need the service principal to have enough permissions to create/modify/delete various Azure AD resources including Applications, other Service Principals and Service Principal Passwords. When I use the above service principal to create other service principals, I currently get 403 Forbidden errors.
I have also tried using the 'Owner' and 'User Access Administrator' roles but these still give me a 403 error. What do I need to add to the above Azure CLI command or what additional role assignments do I need to add?
I'd like to use the service principal in a Pulumi program with their Azure AD provider (based on Terraform's Azure AD provider). See:
...ANSWER
Answered 2022-Feb-11 at 14:22You need to add the scope of this service principal and also change the Azure role of this Service Principal to 'User Access Administrator' to enable you to modify resources in Azure AD. Also, 'User Access Administrator' role will give the service principal the required permissions for that Azure role to assign RBAC permissions. Please refer the below command for more details: -
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