Skip to content
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

Cloud Scheduler Name Error #3086

Closed
kardiff18 opened this issue Feb 20, 2019 · 7 comments
Closed

Cloud Scheduler Name Error #3086

kardiff18 opened this issue Feb 20, 2019 · 7 comments
Assignees

Comments

@kardiff18
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
  • If an issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to "hashibot", a community member has claimed the issue already.

Affected Resource(s)

  • google_cloud_scheduler_job

Terraform Configuration Files

resource "google_cloud_scheduler_job" "schedule_job" {
provider = "google-beta"
name = "foo"
schedule = "0 */12 * * *"
pubsub_target {
   topic_name = "cron-topic"
}

Debug Output

  • google_cloud_scheduler_job.schedule_job: 1 error(s) occurred:

  • google_cloud_scheduler_job.schedule_job: Error creating Job: googleapi: Error 400: Resource name should start with "/projects/<PROJECT_ID>/"

Expected Behavior

Create a scheduler job

Actual Behavior

Steps to Reproduce

  1. terraform apply
@ghost ghost added the bug label Feb 20, 2019
@paddycarver
Copy link
Contributor

It looks like, as a workaround, you can specify the name as "/projects/$PROJECT_ID/$NAME where $PROJECT_ID and $NAME are replaced with the appropriate values. But we should probably make this default to the project configured on the resource unless the user has a / in the name.

@kardiff18
Copy link
Author

kardiff18 commented Feb 20, 2019 via email

@paddycarver
Copy link
Contributor

Unfortunately, I can't see the image :(

@kardiff18
Copy link
Author

kardiff18 commented Feb 20, 2019 via email

@watchinharrison
Copy link

watchinharrison commented Mar 4, 2019

This issue here is the topic_name, it needs to be the full topic name projects/$PROJECT_ID/topics/cron-topic, the error message back is misleading.

https://www.terraform.io/docs/providers/google/r/cloud_scheduler_job.html#topic_name

@rileykarson rileykarson self-assigned this Mar 4, 2019
@rileykarson
Copy link
Collaborator

https://github.com/GoogleCloudPlatform/magic-modules/pull/1450/files#diff-698fbd497afa0f10e3c05a34bf2e3389 should help clarify how to use this; regardless, the disctinction is already documented and I'm hesitant to add a regex-based validation here.

@ghost
Copy link

ghost commented Apr 4, 2019

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.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@hashicorp hashicorp locked and limited conversation to collaborators Apr 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants