i’m trying to create a cloud build trigger but i’m...
# google-cloud
c
i’m trying to create a cloud build trigger but i’m getting 400 invalid argument. Code in thread
Copy code
const github_connection = gcp.cloudbuildv2.Connection.get(
  "github-connection",
  pulumi.interpolate`projects/${gcp.config.project}/locations/${location}/connections/GitHub`
);

const repository = new gcp.cloudbuildv2.Repository("repository", {
  location,
  parentConnection: github_connection.name,
  remoteUri: "<https://github.com/ride-app/api-gateway.git>",
  name: serviceName,
});

const buildTrigger = new gcp.cloudbuild.Trigger("build-trigger", {
  name: serviceName,
  location,
  triggerTemplate: {
    repoName: repository.name,
    branchName: "^main$",
  },
  filename: "cloudbuild.yaml",
  substitutions: {
    SERVICE_SUFFIX: new pulumi.Config().require("serviceSuffix"),
  },
});

export const buildTriggerName = buildTrigger.name;
@many-telephone-49025 any help? this is critical rn
@many-telephone-49025 any help please?
m
Hey @colossal-quill-8119, let me have a look into this after my workshop.
c
alright
Fixed it. Substitutions have to start with _