https://pulumi.com logo
#google-cloud
Title
# google-cloud
c

colossal-quill-8119

08/01/2023, 12:21 PM
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

many-telephone-49025

08/02/2023, 1:52 PM
Hey @colossal-quill-8119, let me have a look into this after my workshop.
c

colossal-quill-8119

08/02/2023, 1:52 PM
alright
Fixed it. Substitutions have to start with _