Reputation: 49
We are getting the following error for a number of resources when trying to deploy GCP resources using Terraform.
It reads:
404. That’s an error.
The requested URL
/v2/organizations/organizations/XXXXXXXXXXX/policies?>alt=json
was not found on this server. That’s all we know.
Example resources are :
And more...
I would like to note that its not a permission issue since creating the resources above manually works flawlessly.
Me and my Team have experience with AWS on TF, but its our first time trying to build a large scale GCP project and we are very frustrated.
Any help would be very appreciated.
It happens on various provider versions , we started using latest, but we also tried older versions in jumps of 10 (we started on x.40, we tried x.30 , x.20 and x.10)
we are currently back on latest
│ <a href=//www.google.com/><span id=logo aria-label=Google></span></a>
│ <p><b>404.</b> <ins>That’s an error.</ins>
│ <p>The requested URL <code>/v2/organizations/organizations/XXXXXXXXXXX/policies?alt=json</code> was not found on this server. <ins>That’s all we know.</ins>
│
│
│ with google_org_policy_policy.primary,
│ on main.tf line 5, in resource "google_org_policy_policy" "primary":
│ 5: resource "google_org_policy_policy" "primary" {
Upvotes: 0
Views: 1952
Reputation: 49
Update: Read on git that someone had this issue when not specifying a project_id on the provider, We Do have a project_id mentioned in the provider, but also this is an organization wide resource.
The issue has resolved for the resource google_org_policy_policy by changing the parent parameter:
parent = "organizations/${data.google_organization.default.id}"
# To
parent = "${data.google_organization.default.id}"\
Upvotes: 2