New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create google_cloudbuild resource #6604
Comments
i've gotten a very basic sample working here after adding in a new "resource" type to the existing resource "google_cloudbuild_builds" "builder" {
provider = google-beta-local
project = var.project_id
location = "global"
steps {
name = "gcr.io/cloud-builders/curl"
id = "fetch"
args = ["-v", "-H", "Metadata-Flavor: Google", "https://httpbin.org/get"]
}
steps {
name = "gcr.io/cloud-builders/docker"
id = "buildstep"
args = ["build", "-t", "gcr.io/$PROJECT_ID/testimage", "."]
wait_for = ["fetch"]
}
images = ["gcr.io/$PROJECT_ID/testimage"]
source {
storage_source {
bucket = google_storage_bucket.build-bucket.name
object = google_storage_bucket_object.archive.name
}
}
} however, the usecase i had is really very unique: i just wanted to create an automated tutorial which creates actual resources (project,vm, etc) and then build some code vial cloud builder andthen deploy it to a VM. At the moment, i used local_exec to submit gcloud commands. in the end, though i submitted this FR, its for this usecase only and i can't think of really any other use for making terraform manage cloud builds (its not a 'resource' terraform should manage). If you do have other usecases for this, pls add it to this FR since i'm unsure if this should be kept open after all. |
* Support ability to create "non-custom" services Allow users to create various Service Monitoring services: App Engine, Cloud Run, etc. hashicorp#11935 * Specify BasicService is immutable * Responding to review comments. * Add test; make service_id required * labels still need input: true; remove encoder * Correct typo * Ignore service fields in SLO import test * Correct test * Make id_format and import_format the same * Remove custom code * Correct test typo * service is actually input-only * Add resource test Signed-off-by: Modular Magician <magic-modules@google.com>
* Support ability to create "non-custom" services Allow users to create various Service Monitoring services: App Engine, Cloud Run, etc. #11935 * Specify BasicService is immutable * Responding to review comments. * Add test; make service_id required * labels still need input: true; remove encoder * Correct typo * Ignore service fields in SLO import test * Correct test * Make id_format and import_format the same * Remove custom code * Correct test typo * service is actually input-only * Add resource test Signed-off-by: Modular Magician <magic-modules@google.com> Signed-off-by: Modular Magician <magic-modules@google.com>
Closing this, as it seems to be a job resource. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Description
Create a new CloudBuild resource that allows users to define submit an actual cloud build job.
The existing
google_cloudbuild_trigger
allows a user to create a trigger but theres no way to define a build step and submit the job.eg, in gcloud cli, you can define and submit a job
New or Affected Resource(s)
Potential Terraform Configuration
References
Note, the existing
google_cloudbuild_trigger
includes parsing logic for theBuild
structure in resource_cloud_build_triggerwhich is the
build
structure used while defining and submitting a jobThe text was updated successfully, but these errors were encountered: