-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Incorrect documentation - monitoring_monitored_project [BETA] #10691
Comments
Hi @drandell ! Sorry you're experiencing this issue. I'm curious if you tried this:
it seemed to work for me? |
Hi @megan07 , created with tf using just the project ids, i've deleted that resource "google_monitoring_monitored_project" "monitored-project" {
- create_time = "2021-12-06T09:29:35.899276544Z" -> null
- id = "locations/global/metricsScopes/ops_project_id/projects/proc_project_id" -> null
- metrics_scope = "ops_project_id" -> null
- name = "proc_project_id" -> null
} Recreating now with your snippet, the plan shows: + resource "google_monitoring_monitored_project" "monitored-project" {
+ create_time = (known after apply)
+ id = (known after apply)
+ metrics_scope = "[OPS DISPLAY NAME]"
+ name = "[PROC DISPLAY NAME]"
} I get:
Our project display names do contain hyphens. resource "google_monitoring_monitored_project" "monitored-project" {
+ create_time = (known after apply)
+ id = (known after apply)
+ metrics_scope = "projects/ops_project_id"
+ name = "projects/proc_project_id"
} And that also fails but with that consumer_invalid error. |
@drandell the project names containing hyphens shouldn't matter, that should be fine. The invalid argument error is from the google side, are you able to provide debug logs? |
[removed debug log files] Attached are the plan and apply debug logs :) @megan07 |
Got it! Thank you for that! So I would guess it's the spaces in the name that aren't working for you, and that makes sense. Looking into this more, the To clarify, even if you use
If these also fail, could you please send me the debug logs for these as well? (Sorry about that!) |
No, I think you are probably right on that, I was using Edit: Edit again: |
Hello @megan07 ,
this is my code here
|
Hello, I was facing same issue due to the documentation error on : https://registry.terraform.io/providers/hashicorp/google-beta/latest/docs/resources/monitoring_monitored_project Under Argument Reference you can still see the reference to project name and no to project ID
|
Note: https://registry.terraform.io/providers/hashicorp/google-beta/latest/docs/resources/monitoring_monitored_project is misconfigured and works because the project's
|
@rileykarson thanks for the suggestion, had weird permission issues that shouldn't exist - your suggestion fixed the issue... Documentation should be updated. |
It looks like the example was updated correctly, but the |
…oogle_container_cluster resource (hashicorp#10691) [upstream:432c55f6cacb487e8bf9a17a9460f6a1bc17af48] Signed-off-by: Modular Magician <[email protected]>
…oogle_container_cluster resource (#10691) (#18166) [upstream:432c55f6cacb487e8bf9a17a9460f6a1bc17af48] Signed-off-by: Modular Magician <[email protected]>
Community Note
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 tohashibot
, a community member has claimed the issue already.Terraform Version
Terraform 1.0.10
Google Beta Provider - 4.2.1
Affected Resource(s)
Terraform Configuration Files
Not sure if the correct place to put, but the documentation for the monitoring_monitored project example says to use the
name
of the project rather than the id/number.However, even if i use the project_id or number it fails with the below error.
From the data object we get
projects/[PROJECT_ID]
, my guess would be that the initial projects/ is not being handled correctly.Using just two variables to pass in project_ids works (in the above example).
Debug Output
Expected Behavior
It should add the metrics scope to my monitoring project.
Actual Behavior
It fails to create to add the metric scope.
b/312911546
The text was updated successfully, but these errors were encountered: