quiet-painter-30539
10/12/2022, 11:45 AMconst a_secrets: pulumi.Output<pulumi.Output<string>[]>
...and:
pulumi stack output --stack A/infra/kari --show-secrets --json | jq '.a_secrets'
[
"this-is-secret-from-a-8929c229"
]
So, a_secrets
is of type (I'm using Typescript): const a_secrets: *pulumi*.*Output*<*pulumi*.*Output*<string>[]>
Then I use stack A in stack B:
const a_secrets = stackA.requireOutput("a_secrets") as pulumi.Output<pulumi.Output<string>[]>;
a_secrets.apply(a => {
console.log(`****************************`);
console.log(`typeof: ${typeof(a)}`);
console.log(`json: ${JSON.stringify(a)}`);
})
=> output:
****************************
typeof: object
json: {"XXXXXXXX93072939515e22adb298388d":"XXXXXXXX64138c4ac30d75fd1eb44270","value":["this-is-secret-from-a-8929c229"]}
So, what I would expect in the stack B side for the type of a_secrets
to be is the same pulumi.Output<pulumi.Output<string>[]>
, but the type is {string: string, "value": [string]}
and therefore I need to do this clumsy type conversion later on when I want to use that array:
type a_type = {string: string, "value": [string]};
...
secrets: a_secrets.apply(a => {
// NOTE: Ugly! Why cannot we use the type that the stack A is supposed to return?
const secrets_array = a as unknown as pulumi.Output<a_type>;
return secrets_array["value"];
}),
When running pulumi up
I see in the output: a_secrets: [secret]
. Perhaps this has something to do with this weird type conversion?
I have dependency "@pulumi/pulumi": "^3.42.0"
in my Pulumi / Typescript and I'm using Pulumi cli v3.42.0
on Ubuntu 2022, and the infrastructure gets created in GCP and we are using Pulumi Service to store the stacks.
Any idea if I'm missing something here? Any help would be appreciated (🧵).hundreds-yacht-71603
10/12/2022, 12:46 PMbillowy-army-68599
10/12/2022, 6:07 PMsalmon-motherboard-78006
10/12/2022, 7:41 PMTable(resource_name=name,
name=name,
database=schema.database,
schema=schema.name,
comment=comment,
cluster_bies=[to_date("dw_created_at)"],
data_retention_days=schema.data_retention_days,
change_tracking=False,
columns=[
snowflake.TableColumnArgs(
name="data",
type="VARIANT",
nullable=False,
),
snowflake.TableColumnArgs(
name="dw_created_at",
type="TIMESTAMP_LTZ",
nullable=False,
default=TableColumnDefaultArgs(expression="current_timestamp()")
),
],
opts=ResourceOptions(provider=provider))
error:
000904 (42000): SQL compilation error: error line 1 at position 65
invalid identifier 'DW_CREATED_AT'
This is what I’m seeing in query history:
ALTER TABLE "DEV_DB"."STAGING"."gu" CLUSTER BY LINEAR(dw_created_at)
Anybody seen this error?salmon-australia-56314
10/12/2022, 9:06 PMgo mod tidy
go: finding module for package <http://github.com/hashicorp/terraform-exec/tfinstall|github.com/hashicorp/terraform-exec/tfinstall>
<http://github.com/myorg/pulumi-sdm/provider|github.com/myorg/pulumi-sdm/provider> imports
<http://github.com/strongdm/terraform-provider-sdm/sdm|github.com/strongdm/terraform-provider-sdm/sdm> tested by
<http://github.com/strongdm/terraform-provider-sdm/sdm.test|github.com/strongdm/terraform-provider-sdm/sdm.test> imports
<http://github.com/hashicorp/terraform-plugin-sdk/helper/resource|github.com/hashicorp/terraform-plugin-sdk/helper/resource> imports
<http://github.com/hashicorp/terraform-plugin-test/v2|github.com/hashicorp/terraform-plugin-test/v2> imports
<http://github.com/hashicorp/terraform-exec/tfinstall|github.com/hashicorp/terraform-exec/tfinstall>: module <http://github.com/hashicorp/terraform-exec@latest|github.com/hashicorp/terraform-exec@latest> found (v0.17.3), but does not contain package <http://github.com/hashicorp/terraform-exec/tfinstall|github.com/hashicorp/terraform-exec/tfinstall>
I went through some of the old PRs and re-added this line to go.mod
<http://github.com/hashicorp/terraform-exec|github.com/hashicorp/terraform-exec> => <http://github.com/hashicorp/terraform-exec|github.com/hashicorp/terraform-exec> v0.15.0
and then go mod tidy
works.
Although, after doing that, I tried to run make tfgen
and it fails with
no required module provides package <http://github.com/myorg/pulumi-sdm/provider/cmd/pulumi-tfgen-sdm;|github.com/myorg/pulumi-sdm/provider/cmd/pulumi-tfgen-sdm;> to add it:
go get <http://github.com/myorg/pulumi-sdm/provider/cmd/pulumi-tfgen-sdm|github.com/myorg/pulumi-sdm/provider/cmd/pulumi-tfgen-sdm>
This is probably a mixture of misunderstanding on my part and a dependency issue. I’d love some help/input if anyone has any ideas.proud-pizza-80589
10/13/2022, 5:49 AMgenerateValue
to run on next runs?
export class Example extends ComponentResource {
constructor(name: string, opts?: ComponentResourceOptions) {
super('example', name, {}, opts);
const generated = somelib.generateValue();
new Secret(
name,
{
path: `somepath/${name}`,
dataJson:
JSON.stringify(generated)
},
{ parent: this, ignoreChanges: ['*'], protect: true }
);
}
}
flaky-arm-38472
10/13/2022, 6:35 AMpulumi up
it will diff from previous state and try to replace the new rules appended by the kubernetes service.
How do you deal with that?hundreds-yacht-71603
10/13/2022, 9:11 AMhundreds-yacht-71603
10/13/2022, 9:11 AMhundreds-yacht-71603
10/13/2022, 9:18 AMk8s.helm.v3.Chart
about the provider being the one I create it uses the kubeconfig from that provider. Is that way off?
import * as k8s from "@pulumi/kubernetes";
const k8sProvider = new k8s.Provider('k8s-cluster',
{
cluster: pulumi.interpolate`${cluster}`,
// kubeconfig: cluster.kubeconfig,
},
{
parent: cluster
})
const karpenterNamespace = new k8s.core.v1.Namespace('karpenter', {},
{
parent: k8sProvider
})
const nginxIngress = new k8s.helm.v3.Chart("nginx-ingress",
{
path: "./vendor/karpenter/charts/karpenter",
namespace: pulumi.interpolate`${karpenterNamespace}`,
values: {
controller: {
env: [
{
name: "AWS_REGION",
value: "eu-west-1",
}
]
}
}
},
{
provider: k8sProvider,
parent: karpenterNamespace
});
But this bails out + there are a million other resource definitions from the chart that complain, rightly so -- my local kubeconfig doesn't even know about the cluster and I don't see a reason why it should:
Diagnostics:
pulumi:pulumi:Stack (pulumi-eks-karpenter-dev):
error: update failed
error: Running program 'C:\Users\marti\src\pulumi-eks-karpenter' failed with an unhandled exception:
Error: invocation of aws:ssm/getParameter:getParameter returned an error: error reading from server: read tcp 127.0.0.1:55120->127.0.0.1:55117: use of closed network connection
at Object.callback (C:\Users\marti\src\pulumi-eks-karpenter\node_modules\@pulumi\runtime\invoke.ts:159:33)
at Object.onReceiveStatus (C:\Users\marti\src\pulumi-eks-karpenter\node_modules\@grpc\grpc-js\src\client.ts:338:26)
at Object.onReceiveStatus (C:\Users\marti\src\pulumi-eks-karpenter\node_modules\@grpc\grpc-js\src\client-interceptors.ts:426:34)
at Object.onReceiveStatus (C:\Users\marti\src\pulumi-eks-karpenter\node_modules\@grpc\grpc-js\src\client-interceptors.ts:389:48)
at C:\Users\marti\src\pulumi-eks-karpenter\node_modules\@grpc\grpc-js\src\call-stream.ts:276:24
at processTicksAndRejections (node:internal/process/task_queues:78:11)
kubernetes:<http://rbac.authorization.k8s.io/v1:ClusterRole|rbac.authorization.k8s.io/v1:ClusterRole> (nginx-ingress-karpenter-admin):
error: configured Kubernetes cluster is unreachable: unable to load Kubernetes client configuration from kubeconfig file. Make sure you have:
ΓÇó set up the provider as per <https://www.pulumi.com/registry/packages/kubernetes/installation-configuration/>
cluster "[object Object]" does not exist
curved-ice-93356
10/13/2022, 10:58 AMcurved-ice-93356
10/13/2022, 12:51 PMpulumi login
and then paste my Access token , but when I list the stacks nothing shows up. Even after doing this is a folder with a Pulumi.yaml file, I can't refresh my remote stackvictorious-exabyte-70545
10/13/2022, 5:52 PMable-ability-11203
10/13/2022, 6:32 PMmelodic-family-23496
10/13/2022, 7:18 PM<http://pulumi.com/skipAwait|pulumi.com/skipAwait>
to True
as the default in all kubernetes resources?dry-potato-52542
10/13/2022, 7:51 PMtry ...catch
or promis.catch()
What are the options?
The goals that I am chasing => have clean granular exception messages.faint-whale-905
10/13/2022, 8:01 PMquaint-salesmen-18327
10/14/2022, 6:58 AMnumerous-sunset-97789
10/14/2022, 9:02 AMmysqlProvider, err := mysql.NewProvider(ctx, "mysql", &mysql.ProviderArgs{
Endpoint: mysqlCfg.Host,
Username: mysqlCfg.User,
Password: mysqlCfg.Password,
})
if err != nil {
return err
}
_, err = mysql.NewDatabase(ctx, "test", &mysql.DatabaseArgs{
Name: pulumi.String("test"),
}, pulumi.Provider(mysqlProvider))
if err != nil {
return err
}
pulumi output is
error: could not validate provider configuration: 1 error occurred:
* invalid value for proxy (The proxy URL is not a valid socks url.)
faint-dusk-40863
10/14/2022, 6:30 PMmodern-france-96243
10/14/2022, 9:26 PMbillions-rocket-37012
10/15/2022, 7:45 AMerror: could not validate provider configuration: 1 error occurred:
* Invalid or unknown key
...
debug: AWS Auth provider used: "StaticProvider"
debug: registering resource: ty=pulumi:pulumi:Stack, name=saas-python-local, custom=False, remote=False
warning: provider config warning: Argument is deprecated
...
error Command failed with exit code 255.
Running pulumi up -d -v 3
but it gives me no information what attribute is deprecated or what key is invalidclean-oil-72875
10/16/2022, 1:48 AMreturn new awsx.ecs.FargateService(`${getConfigValue(config, 'name')}-service`, {
cluster: cluster,
securityGroups: cluster.securityGroups,
forceNewDeployment: true,
assignPublicIp: false,
taskDefinitionArgs: {
containers: {
migrations: {
image: containerImage,
essential: false,
memory: 512,
cpu: 1024,
environment: environment,
repositoryCredentials: {
credentialsParameter: credentialsParameter
},
command: [
'npm',
'run',
'migrate:deploy'
]
},
seed: {
dependsOn: [ {
containerName: 'migrations',
condition: 'SUCCESS'
}],
image: containerImage,
essential: false,
memory: 512,
cpu: 1024,
environment: environment,
repositoryCredentials: {
credentialsParameter: credentialsParameter
},
command: [
'npm',
'run',
'prisma:seed'
]
},
application: {
dependsOn: [ {
containerName: 'seed',
condition: 'SUCCESS'
}],
image: containerImage,
memory: parseInt(getConfigValue(config, 'aws-fargate-memory')),
cpu: parseInt(getConfigValue(config, 'aws-fargate-cpu')),
environment: environment,
portMappings: [ applicationListener ],
repositoryCredentials: {
credentialsParameter: credentialsParameter
},
},
},
executionRole: createSercretCredientialsForGithubRegistry(config)
},
desiredCount: 1,
deploymentMinimumHealthyPercent: 50,
deploymentMaximumPercent: 200
});
but, when i trying make "pulumi up" to deploy new service, pulumi dont do anything
Previewing update (xxxx)
View Live: ....
Type Name Plan
pulumi:pulumi:Stack XXX-api-stage
Resources:
77 unchanged
Do you want to perform this update? [Use arrows to move, enter to select, type to filter]
yes
> no
details
white-chef-55657
10/16/2022, 12:31 PMadamant-waitress-42469
10/17/2022, 9:34 AMadamant-waitress-42469
10/17/2022, 9:45 AMadamant-waitress-42469
10/17/2022, 9:45 AMadamant-waitress-42469
10/17/2022, 9:51 AMadamant-waitress-42469
10/17/2022, 9:51 AMadamant-waitress-42469
10/17/2022, 9:53 AMadamant-waitress-42469
10/17/2022, 9:53 AM