GoogleCloudPlatform / GoogleCloudPlatform/deploymentmanager-samples

How to create project using Jinja & Yaml file

Open
#529 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jinja
Stars
951
Forks
700
PR merge metrics
No merged PRs in 30d

Description

Hi,

As per below document, i have created Jinja and Yaml file. And my account has added the role role: roles/resourcemanager.folderCreator. And i also i have create SA and i did iam binding to add this role to my SA,.
When i tired to execute the below template in deployment manager it getting failed due to below error:

Reference URL for Jinja and Yaml file:

https://github.com/GoogleCloudPlatform/deploymentmanager-samples/blob/e22fd9592e5c3db15918e4ca0d10baa820851d5b/google/resource-snippets/cloudresourcemanager-v1/project.yaml

My code:

Folder.jinja
resources:
- name: folders/{{ properties['folderid'] }}
type: gcp-types/cloudresourcemanager-v2:folders
properties:
parent: organizations/{{ properties['orgrid'] }}
displayName: {{ properties['displayName'] }}

Error:

message: '{"ResourceType":"gcp-types/cloudresourcemanager-v2:folders","ResourceErrorCode":"403","ResourceErrorMessage":{"code":403,"message":"The
caller does not have permission","status":"PERMISSION_DENIED","statusMessage":"Forbidden","requestPath":"https://cloudresourcemanager.googleapis.com/v2/folders","httpMethod":"POST"}}'

Note: However the same SA account is working in terraform code to create a project/folder. It is not working when in deployment manager.

Kindly advise me how to use the project creation Jinja/yaml file in GCP deployment manager.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.