rhythmic-accountant-71070
12/08/2023, 9:33 PMbitter-coat-14741
12/18/2023, 3:53 PMEncryptionConfigurations
method and I searched all the documentation online for a solution and couldn't find one.
pulumi.Run(func(ctx *pulumi.Context) error {
repo, err := ecr.NewRepository(ctx, "rundeck", &ecr.RepositoryArgs{
Name: pulumi.String("rundeck"),
ImageScanningConfiguration: &ecr.RepositoryImageScanningConfigurationArgs{
ScanOnPush: pulumi.Bool(true),
},
EncryptionConfigurations: &ecr.RepositoryEncryptionConfigurationArgs{
EncryptionType: pulumi.String("AES256"),
},
ImageTagMutability: pulumi.String("IMMUTABLE"),
})
This is the error message that I'm experiencing.
/home/fearfactor3/repos/rundeck.iac/main.go:19:30 cannot use &ecr.RepositoryEncryptionConfigurationArgs{β¦} (value of type *ecr.RepositoryEncryptionConfigurationArgs) as ecr.
RepositoryEncryptionConfigurationArrayInput value in struct literal: *ecr.
RepositoryEncryptionConfigurationArgs does not implement ecr.
RepositoryEncryptionConfigurationArrayInput (missing method ToRepositoryEncryptionConfigurationArrayOutput) (compile)
Can anyone provide assistance here?colossal-tailor-72573
12/28/2023, 1:35 AMminiature-library-50162
01/04/2024, 11:12 PM[00] pkg/stack/program.go:85:19: cannot use ipv4.ID() (value of type pulumi.IDOutput) as pulumi.IntPtrInput value in struct literal: pulumi.IDOutput does not implement pulumi.IntPtrInput (missing method ToIntPtrOutput)
[00] pkg/stack/program.go:87:19: cannot use ipv6.ID() (value of type pulumi.IDOutput) as pulumi.IntPtrInput value in struct literal: pulumi.IDOutput does not implement pulumi.IntPtrInput (missing method ToIntPtrOutput)
miniature-library-50162
01/05/2024, 12:24 PMsparse-intern-71089
01/09/2024, 6:06 PMminiature-library-50162
01/10/2024, 1:57 PMminiature-library-50162
01/10/2024, 1:59 PMcuddly-journalist-77210
02/01/2024, 4:24 PMmagnificent-vase-49161
02/06/2024, 2:00 PMIAC-PULUMI
βββ dev
β βββ eks
β βββ iam
β βββ rds
β βββ vpc
β βββ dev.go
βββ prod
β βββ eks
β βββ iam
β βββ rds
β βββ vpc
β βββ prod.go
βββ shared
β βββ eks
β βββ iam
β βββ rds
β βββ vpc
β βββ shared.go
βββ modules
β βββ eks
β βββ iam
β βββ rds
β βββ vpc
βββ .gitignore
βββ go.mod
βββ go.sum
βββ main.go
βββ Pulumi.iac-pulumi-dev.yaml
βββ Pulumi.iac-pulumi-prod.yaml
βββ Pulumi.iac-pulumi-shared.yaml
βββ Pulumi.yaml
βββ vendor
My main.go is as follows:
package main
import (
"fmt"
"log"
"os"
"os/exec"
"iac-pulumi/shared"
)
func runPulumiCommand(env string) {
// Construct the stack name based on the environment variable
stackName := fmt.Sprintf("<<MY-COMPANY>>/iac-pulumi/%s", env)
// Select the stack
cmd := exec.Command("pulumi", "stack", "select", stackName)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
err := cmd.Run()
if err != nil {
log.Fatalf("Failed to select Pulumi stack: %v", err)
}
}
func main() {
env := os.Getenv("DEPLOY_ENV")
if env == "" {
fmt.Println("Please run: export DEPLOY_ENV=<your-environment>")
return
}
switch env {
case "shared":
shared.Deploy()
runPulumiCommand(env)
default:
panic("Unknown environment")
}
}
However, when running the command pulumi up or pulumi preview
I receive the following error:
Diagnostics:
pulumi:pulumi:Stack (iac-pulumi-shared):
error: Duplicate resource URN 'urn:pulumi:shared::iac-pulumi::pulumi:pulumi:Stack::iac-pulumi-shared'; try giving it a unique name
As if it is trying to recreate the stack but the stack already exists so in theory it should just select the existing one.
I searched slack and the internet for the same problem and only found this: https://github.com/pulumi/pulumi/issues/13779
Does anyone have any insight into how to resolve this?
Thanks!stale-france-31173
02/15/2024, 7:18 PMthankful-fall-44419
02/19/2024, 4:11 PMhas a problem: looks like "<oci://registry-1.docker.io/>" is not a valid chart repository or cannot be reached: object required; check the chart name and repository configuration.
This is the code
_, err = helm.NewRelease(ctx, "prereqs", &helm.ReleaseArgs{
Chart: pulumi.String("corda/corda-dev-prereqs"),
Name: pulumi.String("prereqs"),
RepositoryOpts: &helm.RepositoryOptsArgs{
Repo: pulumi.String("<oci://registry-1.docker.io/>"),
},
Namespace: pulumi.String("corda"),
CreateNamespace: pulumi.Bool(true),
SkipAwait: pulumi.Bool(true),
Timeout: <http://pulumi.Int|pulumi.Int>(600),
}, pulumi.Provider(k8sProvider))
if err != nil {
return err
}
bumpy-bear-61087
02/21/2024, 9:26 AMpulumi up
but just go run
. Is this not supported?
<http://logger.Info|logger.Info>("running pulumi")
pulumi.Run(func(ctx *pulumi.Context) error {
if err := <http://ctx.Log.Info|ctx.Log.Info>("Pulumi run", nil); err != nil {
logger.Error(err)
}
logger.Debug("initializing gcp")
infra, err := gcp.New(ctx, conf.GCP)
if err != nil {
logger.WithError(err).Fatal("failed to initialize GCP")
}
logger.Debug("creating infra")
if err = infra.Create(ctx); err != nil {
logger.WithError(err).Fatal("failed to create GCP infra")
}
return nil
})
}
bumpy-bear-61087
02/21/2024, 9:26 AMPULUMI_LOG_LEVEL=trace
, no dicebumpy-bear-61087
02/21/2024, 9:28 AMenough-caravan-98871
02/21/2024, 8:33 PMenough-caravan-98871
02/23/2024, 3:53 AMScalingPlan, err := desktopvirtualization.NewScalingPlan(ctx, "scaling-plan", &desktopvirtualization.ScalingPlanArgs{
HostPoolReferences: []desktopvirtualization.ScalingHostPoolReferenceArgs{
{
HostPoolArmPath: HostPool.ID(),
ScalingPlanEnabled: pulumi.Bool(true),
},
},
ResourceGroupName: ResourceGroup.Name,
TimeZone: pulumi.String("Eastern Standard Time"),
},
pulumi.DependsOn([]pulumi.Resource{HostPool, ResourceGroup}),
pulumi.Parent(HostPool),
)
if err != nil {
return err
}
refined-pilot-45584
02/26/2024, 10:06 AMVolumes: &cloudrunv2.ServiceTemplateVolumeArray{
&cloudrunv2.ServiceTemplateVolumeArgs{
Name: pulumi.String("bucket"),
// Define the GCS bucket characteristics here.
Gcs: &cloudrunv2.ServiceTemplateVolumeGcsArgs{ // LINE 424 - From STDERR
Bucket: gcsBucket.Name,
ReadOnly: pulumi.Bool(false),
},
},
},
When attempting to execute though I am getting the following two errors:
./main.go:424:10: unknown field Gcs in struct literal of type cloudrunv2.ServiceTemplateVolumeArgs
./main.go:424:27: undefined: cloudrunv2.ServiceTemplateVolumeGcsArgs
I marked the lines in the code above with a comment for clarity.
This is puzzling to me. The PKG says that field βGcsβ does exist in that struct definition. Additionally in the docs the ServiceTemplateVolumeGcsArgs type does exist. So I am a little baffled at what I might be missing here.
Would appreciate any input and thoughts; I will also crosspost in Google-Cloud Channelbumpy-bear-61087
02/29/2024, 9:33 PMrouter, err := compute.NewRouter(ctx,
fmt.Sprintf("gke-%s-network-router", clusterName),
&compute.RouterArgs{
Project: pulumi.String(projId),
Description: pulumi.String("Router for the GKE network subnet"),
Name: pulumi.String(fmt.Sprintf("gke-%s-network-router", clusterName)),
Network: network.ID(),
Region: pulumi.String(region),
},
)
if err != nil {
return err
}
And the error log:
<p>The requested URL <code>/compute/beta/projects/xxx-pulumi-test/regions/region/routers/projects/xxx-pulumi-test/regions/europe-west1/routers/gke-dev-cluster-network-router?alt=json</code> was not found on this server. <ins>That's all we know.</ins>
clean-art-60451
03/03/2024, 12:20 AMbumpy-bear-61087
03/03/2024, 12:32 PM<http://serviceusage.googleapis.com|serviceusage.googleapis.com>
is constantly being disabled again after manually enabling it?
Error when reading or editing Project Service test/serviceusage.googleapis.com: Error disabling service "serviceusage.googleapis.com" for project "test":
bumpy-bear-61087
03/03/2024, 12:33 PMif _, err := projects.NewService(ctx, "enable-service-serviceusage", &projects.ServiceArgs{
DisableDependentServices: pulumi.Bool(false),
DisableOnDestroy: pulumi.Bool(false), // gives issues else
Project: pulumi.String(cfg.ProjectID),
Service: pulumi.String("serviceusage" + ".googleapis.com"),
}); err != nil {
return err
}
bumpy-bear-61087
03/03/2024, 12:37 PMService Usage API has not been used in project
, while I did enable it..gray-application-13726
03/05/2024, 9:49 PMpulumi.Run(func(ctx *pulumi.Context) error {}))
without pulumi up
command and by some go sdk.
I prefer the second solution, but I won't do templating. I don't know if it is possible to do so.
Does anyone have an idea on it?
Thanks!late-chef-72896
03/07/2024, 8:22 AMpulumi preview
few-dress-15522
03/07/2024, 9:45 PM// TODO: this isn't right
// s.SetConfig(ctx, "pulumi:disable-default-providers[0]", auto.ConfigValue{Value: "aws"})
victorious-dream-50144
03/09/2024, 12:21 PMexecutionRoleArn := executionRole.Arn.ApplyT(func(arn string) string {
return arn
})
// Container Definition
containerDefinitionJSON, err := json.Marshal([]interface{}{
map[string]interface{}{
"name": "workerr",
"image": "<http://1234567890.dkr.ecr.us-east-2.amazonaws.com/worker:latest|1234567890.dkr.ecr.us-east-2.amazonaws.com/worker:latest>",
"cpu": 250,
"essential": true,
"memory": 256,
"executionRoleArn": executionRoleArn,
I've not been able to get past the following error
error: an unhandled error occurred: program failed:
1 error occurred:
* json: error calling MarshalJSON for type pulumi.StringOutput: Outputs can not be marshaled to JSON
late-chef-72896
03/15/2024, 10:13 AMconfigmap
using automation-api? I now have configuration defined in Pkl
(pkl-lang.org) and can read this but afaics I need to create separate config values the way I want them.many-stone-40872
03/15/2024, 3:47 PMgo get <http://github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/operators|github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/operators>
it is showing me below error
go: module <http://github.com/pulumi/pulumi-kubernetes/sdk/v4@upgrade|github.com/pulumi/pulumi-kubernetes/sdk/v4@upgrade> found (v4.9.1), but does not contain package <http://github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/operators|github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/operators>
Any ideas on this error please?clean-art-60451
03/17/2024, 10:54 PM