Below is a contrived policy in the same lines I have a production one. I am trying to create a couple of hosts and add them to a layer then allow that layer ownership on the policy for the safe namespace.
# Policy namespace for safe SERV_ABC
- !policy
id: SERV_ABC
body:
- !layer
id: testlayer
- &hosts2
- !host
id: SERV_ABC_HOST
- !host
id: 855555555501/AccountUser
- !grant
role: !layer
member: *hosts2
owner: !layer testlayer
Here is the error that I get when I load this policy
('handle_policy_load_result.py - processing file: ', 'http_result')
{"error":{"code":"not_found","message":"Layer 'testlayer' not found in account 'prod'","target":"layer","details":{"code":"not_found","target":"id","message":"prod:layer:testlayer"}}}404
('http result: ', '404')
('body_json: ', '{"error":{"code":"not_found","message":"Layer \'testlayer\' not found in account \'prod\'","target":"layer","details":{"code":"not_found","target":"id","message":"prod:layer:testlayer"}}}')
handle_policy_load_result.py - output file: http_result_code
handle_policy_load_result.py - output file: body_json
[load_conjur_policy] $ /bin/sh -xe /tmp/jenkins2270246464716431139.sh
+ + cut -c1
cat http_result_code
+ '[' 4 '!=' 2 ]
+ cat http_result
+ echo 'Error [HTTP status: {"error":{"code":"not_found","message":"Layer '"'"'testlayer'"'"' not found in account '"'"'prod'"'"'","target":"layer","details":{"code":"not_found","target":"id","message":"prod:layer:testlayer"}}}404]'
Error [HTTP status: {"error":{"code":"not_found","message":"Layer 'testlayer' not found in account 'prod'","target":"layer","details":{"code":"not_found","target":"id","message":"prod:layer:testlayer"}}}404]