salmon-guitar-84472
09/20/2021, 7:30 AMred-football-97286
09/20/2021, 9:23 AMpulumi imports
work? Getting an issue trying to import a WAFv2 using Go.handsome-state-59775
09/20/2021, 9:30 AMpulumi config --show-secrets --stack ...
into a selected stack?average-ability-11166
09/20/2021, 3:33 PMred-kangaroo-44125
09/20/2021, 4:53 PMDiagnostics:
pulumi:pulumi:Stack (strapi-strapi-kubernetes):
error: Program failed with an unhandled exception:
error: Traceback (most recent call last):
File "/home/dishant/.pulumi/bin/pulumi-language-python-exec", line 92, in <module>
loop.run_until_complete(coro)
File "/usr/lib64/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/home/dishant/Projects/cloud-poc/infrastructure/stacks/strapi/venv/lib64/python3.9/site-packages/pulumi/runtime/stack.py", line 110, in run_in_stack
await run_pulumi_func(lambda: Stack(func))
File "/home/dishant/Projects/cloud-poc/infrastructure/stacks/strapi/venv/lib64/python3.9/site-packages/pulumi/runtime/stack.py", line 43, in run_pulumi_func
func()
File "/home/dishant/Projects/cloud-poc/infrastructure/stacks/strapi/venv/lib64/python3.9/site-packages/pulumi/runtime/stack.py", line 110, in <lambda>
await run_pulumi_func(lambda: Stack(func))
File "/home/dishant/Projects/cloud-poc/infrastructure/stacks/strapi/venv/lib64/python3.9/site-packages/pulumi/runtime/stack.py", line 133, in __init__
func()
File "/home/dishant/.pulumi/bin/pulumi-language-python-exec", line 91, in <lambda>
coro = pulumi.runtime.run_in_stack(lambda: runpy.run_path(args.PROGRAM, run_name='__main__'))
File "/usr/lib64/python3.9/runpy.py", line 285, in run_path
return _run_code(code, mod_globals, init_globals,
File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/dishant/Projects/cloud-poc/infrastructure/stacks/strapi/./__main__.py", line 41, in <module>
ingress = Ingress(
TypeError: __init__() takes 1 positional argument but 2 positional arguments (and 2 keyword-only arguments) were given
error: an unhandled error occurred: Program exited with non-zero exit code: 1
This is my pulumi code:
"""A Kubernetes Python Pulumi program"""
import http
from importlib.resources import path
import pulumi
from pulumi_kubernetes.apps.v1 import Deployment, DeploymentSpecArgs
from pulumi_kubernetes.networking.v1 import *
from pulumi_kubernetes.networking.v1.outputs import *
from pulumi_kubernetes.meta.v1 import LabelSelectorArgs, ObjectMetaArgs
from pulumi_kubernetes.core.v1 import *
app_labels = { "app": "strapi" }
deployment = Deployment(
"strapi",
spec=DeploymentSpecArgs(
selector=LabelSelectorArgs(match_labels=app_labels),
replicas=2,
template=PodTemplateSpecArgs(
metadata=ObjectMetaArgs(labels=app_labels),
spec=PodSpecArgs(containers=[ContainerArgs(name="nginx", image="strapi/strapi")])
),
))
pulumi.export("name", deployment.metadata["name"])
strapiService = Service("strapiService",
api_version="v1",
kind="Service",
metadata=ObjectMetaArgs(
name="strapi",
),
spec=ServiceSpecArgs(
selector=app_labels,
ports=[ServicePortArgs(
protocol="TCP",
port=80,
target_port=1337,
)],
))
ingress = Ingress(
"strapi",
metadata=ObjectMetaArgs(
name="strapi",
),
spec=IngressSpecArgs(
ingress_class_name="nginx",
rules=IngressRuleArgs(
host="strapi.test.cluster",
http=HTTPIngressRuleValueArgs(
paths=HTTPIngressPathArgs(
backend=IngressBackendArgs(
service=IngressServiceBackendArgs(
name="strapi",
port=ServiceBackendPortArgs(
name="http",
number="80"
),
)
),
path_type="Prefix",
path="/"
)
)
))
)
miniature-nest-23801
09/20/2021, 5:39 PMdry-autumn-28966
09/20/2021, 8:20 PMinfra
stack that outputs a kubeconfig file with temporary token. The kubeconfig is then used from a different app
stack using pulumi.NewStackReference(). Everything works fine until the temporary token expire… Running refresh>up against infra
update the kubeconfig file but then the app
refresh still uses the old one and fail. Is there any workaround?great-sunset-355
09/21/2021, 8:52 AMgorgeous-country-43026
09/21/2021, 9:49 AMbillions-mechanic-26704
09/21/2021, 12:28 PMbillions-mechanic-26704
09/21/2021, 2:25 PMvariable "org" {
type = string
validation {
condition = length(<http://var.org|var.org>) <= 3
error_message = "The org variable cannot be larger than 3 characters."
}
}
variable "tenant" {
type = string
validation {
condition = length(var.tenant) <= 4
error_message = "The tenant variable cannot be larger than 4 characters."
}
}
variable "environment" {
type = string
validation {
condition = length(var.environment) <= 4
error_message = "The environment variable cannot be larger than 4 characters."
}
}
And I use the above variables to name an azure resource group like:
module "resource_group_name" {
source = "gsoft-inc/naming/azurerm//modules/general/resource_group"
name = "main"
prefixes = [<http://var.org|var.org>, var.tenant, var.environment]
}
Is possible to do something similar in pulumi? I saw a similar issue reported here, but looks like this is more under programatically control?hallowed-teacher-48474
09/22/2021, 12:30 AMtall-nightfall-10556
09/22/2021, 1:00 AM~ advancedOptions: {
- override_main_response_version: "false"
}
I think this must be related to the recent Elasticsearch -> OpenSearch change.steep-sunset-89396
09/22/2021, 1:45 AMbulky-policeman-29913
09/22/2021, 2:00 PMacoustic-ram-46099
09/22/2021, 3:56 PMicy-engineer-10830
09/22/2021, 4:28 PMerror: over stack limit: you are using 9 of 5 stacks - manage stack limits for your organization at <https://app.pulumi.com/><my-org>/settings/subscription
are stacks not unlimited?
also, click this does nothing:dry-teacher-74595
09/22/2021, 6:15 PMrandom.RandomPassword
and its not stored in the configuration. that and is there a way to do it if my rds cluster is not publically accessible?victorious-exabyte-70545
09/22/2021, 9:32 PMvictorious-exabyte-70545
09/22/2021, 9:32 PMAttributeError: 'NoneType' object has no attribute '__name__'
In [27]: auto.select_stack("stackname", work_dir="/path_to_project")
victorious-exabyte-70545
09/22/2021, 9:32 PMbroad-gold-44713
09/22/2021, 10:09 PMterraform plan
? The closest I can think of is pulumi preview -r -j
. Is that correct?cuddly-tailor-40542
09/23/2021, 1:16 AMoidcProvider := cluster.Core.OidcProvider().ApplyT(func(oidcUrl string) string {
return strings.Trim(oidcUrl, "https://")
})
The error is in the image below. Has anyone used this EKS package and did they find a workaround for this?quiet-architect-74241
09/23/2021, 9:57 AMcreamy-nail-67991
09/23/2021, 1:46 PMComponentResource
receives an argument of using the InputList<T>
where T is a custom class which we manipulate before creating the cloud resources.
This means we have to iterate over the InputList
property and create resources within the Apply()
block. According to the documentation (https://www.pulumi.com/docs/intro/concepts/inputs-outputs)
“During some program executions, apply doesn’t run. For example, it won’t run during a preview, when resource output values may be unknown. Therefore, you should avoid side-effects within the callbacks. For this reason, you should not allocate new resources inside of your callbacks either, as it could lead to pulumi preview being wrong.”Is there a better way of doing this, without creating resources within the
Apply()
?
Here is a code snippet for some reference.
frontendEndpointArgs.Apply(endpoints =>
{
....
foreach (var frontend in endpoints)
{
if (frontend.HttpsConfiguration == null)
{
continue;
}
var httpsConfigurationArgs = new CustomHttpsConfigurationArgs
{
FrontendEndpointId = Output.Format($"/subscriptions/{currentSubscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontend.Name}"),
CustomHttpsProvisioningEnabled = true,
CustomHttpsConfigurationConfig = new CustomHttpsConfigurationCustomHttpsConfigurationArgs
{
CertificateSource = "AzureKeyVault",
AzureKeyVaultCertificateVaultId = frontend.HttpsConfiguration.Apply(fe => fe.AzureKeyVaultCertificateVaultId),
AzureKeyVaultCertificateSecretName = frontend.HttpsConfiguration.Apply(fe => fe.AzureKeyVaultCertificateSecretName),
AzureKeyVaultCertificateSecretVersion = frontend.HttpsConfiguration.Apply(fe => fe.AzureKeyVaultCertificateSecretVersion),
//MinimumTlsVersion = "1.2"
},
};
_ = frontend.Name.Apply(frontendName =>
new CustomHttpsConfiguration($"{frontendName}-SslCertificate", httpsConfigurationArgs, new CustomResourceOptions
{
Provider = provider,
Parent = parent,
}));
}
....
});
billions-mechanic-26704
09/23/2021, 2:42 PMBranchProtection
github resource https://www.pulumi.com/docs/reference/pkg/github/branchprotection/#branchprotection
And
BranchProtectionV3
github resource ?
https://www.pulumi.com/docs/reference/pkg/github/branchprotectionv3/#branchprotectionv3
I see there are some different resource properties inputs like in v3 there is branch
and in normal version i choose the branch using pattern
parameter
Which one should I choose?clean-toddler-25770
09/23/2021, 3:44 PMpurple-train-14007
09/23/2021, 5:27 PMrefined-tent-12187
09/23/2021, 5:58 PMbillions-mechanic-26704
09/23/2021, 8:53 PM__main__.py
azure-appservice.py
But it seems my code is only executed when it is in __main__.py
and the resources defined on azure-appservice.py
are not readed when I execute pulumi up
command.
Is there a way to use more than one python file similar to terraform?billions-mechanic-26704
09/23/2021, 8:53 PM__main__.py
azure-appservice.py
But it seems my code is only executed when it is in __main__.py
and the resources defined on azure-appservice.py
are not readed when I execute pulumi up
command.
Is there a way to use more than one python file similar to terraform?billowy-army-68599
09/23/2021, 9:04 PMbillions-mechanic-26704
09/23/2021, 9:23 PM