worried-queen-40276
06/01/2022, 3:51 PM.ts
is
// Create a Kubernetes cluster.
const cluster = new eks.Cluster('mlplatform-eks', {
createOidcProvider: true,
});
cluster.core.oidcProvider.arn
cluster.core.oidcProvider.url
However, I do not see any exposed method for python? Am I missing something?
I can do the same thing from aws cli but I need to do it programmatically from within pulumi to create components for another assume-policy component.
aws eks describe-cluster --name mlp-mlops-eksCluster-c2aab22 --query "cluster.identity.oidc.issuer" --output text
<https://oidc.eks.us-west-1.amazonaws.com/id/ABCFDRREJJKJEFBD0D4EABB3D90A>
aws iam list-open-id-connect-providers | grep ABCFDRREJJKJEFBD0D4EABB3D90A
"Arn": "arn:aws:iam::XXXXXXX:oidc-provider/oidc.eks.us-west-1.amazonaws.com/id/ABCFDRREJJKJEFBD0D4EABB3D90A"
most-jordan-25674
06/01/2022, 4:24 PMfancy-jelly-16159
06/01/2022, 4:34 PM<eliding>
specific info where necessary, I hope keeping the gist of it clear.
var pServiceAccountOptions []pulumi.ResourceOption
var pServiceAccount *pulumiIAM.LookupServiceAccountResult
if pServiceAccount, err = pulumiIAM.LookupServiceAccount(pctx, &pulumiIAM.LookupServiceAccountArgs{
Project: "<my-actual-google-project-id>",
ServiceAccountId: "<my-actual-service-account-id>",
}); err != nil {
err = nil // Don't propagate an error, but don't try to import it.
} else {
// Import it.
// This works, and we get the pServiceAccount
pServiceAccountOptions = append(pServiceAccountOptions, pulumi.Import(pulumi.ID(<WHAT-HERE>)))
}
The query works, and I'm trying to set up the ResourceOption to import into a following iam NewServiceAccount call (not shown here).
I've tried many properties and variants taken from the pServiceAccount for <WHAT-HERE>, but I get:
= google-native:iam/v1:ServiceAccount projects/<project-id>/serviceAccounts/<service-account-id>@<project-id>.<http://iam.gserviceaccount.com|iam.gserviceaccount.com> import
= google-native:iam/v1:ServiceAccount projects/<project-id>/serviceAccounts/s<service-account-id>@<project-id>.<http://iam.gserviceaccount.com|iam.gserviceaccount.com> import error: Preview failed: property "projectsId"/"project" not found
+ pulumi:pulumi:Stack <my-stack> create error: preview failed
= google-native:iam/v1:ServiceAccount projects/<project-id>/serviceAccounts/<service-account-id>@<project-id>.<http://iam.gserviceaccount.com|iam.gserviceaccount.com> import 1 error
+ pulumi:pulumi:Stack <my-stack> create 1 error
Note: If I do NOT use the resource import option, the preview shows that a new service account would be created.
I've done the same approach with other resources, and it works, but I know that Service Accounts are an odd beast with respect to identifiers.
What am I doing wrong here? What does <WHAT-HERE> need to be?worried-queen-40276
06/01/2022, 6:17 PMmlflow_s3_policy = aws.iam.RolePolicy("mlflow_s3_policy",
role=mlflow_s3_role.id,
policy=json.dumps({
"Version": "2012-10-17",
"Statement": [{
"Action": "*",
"Effect": "Allow",
"Resource": mlflow_bucket.bucket.apply(lambda bucket_name: f'arn:aws:s3:::{bucket_name}/*'),
}],
}))
I get the following error
TypeError: Object of type Output is not JSON serializable
worried-gold-55244
06/01/2022, 7:27 PMthankful-coat-47937
06/01/2022, 9:42 PMcfg.requireSecret()
. currently it just serializes the literal function, but not the valuesalmon-printer-16080
06/01/2022, 10:24 PMcrooked-sunset-90921
06/01/2022, 11:06 PMwhite-rain-67342
06/02/2022, 1:08 AMapi_url
is an Output type and the replace function expects a string.
The following is my snippet:
with open('./nginx.conf', 'r') as file:
config = file.read()
config = config.replace("{{API_URL}}", api_url.apply(lambda foo: foo))
print(config)
config_map = ConfigMap(
'nginx-config',
metadata=ObjectMetaArgs(labels=labels),
data={'default.conf': config}
)
white-terabyte-21934
06/02/2022, 7:09 AMpulumi.output.Output object
.
• Would like to print these values via a print statement (like terraform output format) ,what is the best way to fetch the value via Ouput() method ?bulky-agent-73210
06/02/2022, 8:10 AMquick-wolf-8403
06/02/2022, 3:12 PMgifted-restaurant-32325
06/02/2022, 3:43 PMchilly-plastic-75584
06/02/2022, 4:12 PMstraight-intern-54129
06/02/2022, 4:41 PMpulumi up
, I get this diagnostics error and it won't let me update my stack:
pulumi:pulumi:Stack (PulumiArm-prod):
The launch profile "(Default)" could not be applied.
A usable launch profile could not be located.
straight-intern-54129
06/02/2022, 5:30 PMPulumi.AzureAD
NuGet package, the Pulumi.AzureAD.Application
used to have AvailableToOtherTenants
, Oauth2AllowImplicitFlow
, and ReplyUrls
.
Have they been moved? I have been Googling but have not been able to find them.
EDIT: Resolved by reverting back to the older version and they all had deprecated attributes with guidance on the new properties.icy-jordan-58549
06/02/2022, 5:33 PMerror: could not validate provider configuration: 4 errors occurred:
* : invalid or unknown key: azure_client_id
* : invalid or unknown key: azure_client_secret
* : invalid or unknown key: azure_tenant_id
* : invalid or unknown key: azure_workspace_resource_id
quick-wolf-8403
06/02/2022, 6:56 PMgcp:project
, gcp:region
)
Can I now rely on them via something like project_id = config.require("gcp:project")
? I get an error suggesting I need to set it in my Pulumi project namespace. Is there a way to access these directly w/o duplicating them?acoustic-tiger-77630
06/02/2022, 7:13 PMdelightful-napkin-38557
06/02/2022, 8:06 PMpulumi plugin install resource xyz 0.0.1 --file ./dist/pulumi-resource-xyz-v0.0.1-linux-amd64.tar.gz
. But the last thing I can not find in the doc, it's how to use the plugin/resource in my main (python) code. Can someone help me with that ? Thanks !red-scooter-62880
06/02/2022, 9:26 PMquick-wolf-8403
06/02/2022, 9:47 PMk: await serialize_property(
File "/home/a/.cache/pypoetry/virtualenvs/nocap-api-tm7b1NnF-py3.10/lib/python3.10/site-packages/pulumi/runtime/rpc.py", line 450, in serialize_property
raise ValueError(f"unexpected input of type {type(value).__name__}")
ValueError: unexpected input of type tuple
echoing-autumn-99089
06/02/2022, 10:21 PMmysterious-hamburger-19066
06/02/2022, 10:23 PMgreat-byte-67992
06/03/2022, 1:53 AMconst mongodbPassword = new random.RandomPassword(
`my-password`,
{
length: 32,
special: false,
},
{
parent: this, // <-- previously undefined
aliases: [
{
name: `my-password`,
project: pulumi.getProject(),
stack: pulumi.getStack(),
parent: pulumi.rootStackResource,
},
],
}
);
Have I done something obviously wrong? I've also tried using a full URN for the "name" in the alias object but I get the same result.
Pulumi thinks it needs to delete and create the resource because of the parent change. I'm having this problem for all resources in my stack including a helm Chart resource.proud-cricket-86351
06/03/2022, 6:56 AMbreezy-book-15761
06/03/2022, 2:57 PMfreezing-daybreak-42018
06/03/2022, 3:01 PMfreezing-daybreak-42018
06/03/2022, 3:01 PMfreezing-daybreak-42018
06/03/2022, 3:01 PM