Closed doom160 closed 5 days ago
@biscout42 do you have a chance to take a look at this?
Let me have a look. Indeed, space_id
is a namespace, or space in kibana terminology, but there might be additional restriction by kibana between policy and location (one example - private location has same id as policy).
@doom160 , does it work for you if you set space_id = each.value
for private location?
I have done a test to verify, if I can create private location in other space, than policy and it doesn't work.
Let me get in touch with synthetics folks about the details. We might have restrictions to use only policy namespace.
yes it would have work if i set space_id = each.value
i thought the namespace on agent policy refers to the default namespace for index to this convention <type>-<dataset>-<namespace>
?
https://www.elastic.co/guide/en/fleet/current/data-streams.html#data-streams-naming-scheme
and space_id im thinking is it the elastic space? i.e. https://www.elastic.co/guide/en/kibana/current/xpack-spaces.html
Hi @doom160 , thanks for prompt reply. I could see confusion between space_id
, space
and namespace
. I'm sorry, I can't explain all historical reason why it is so. For private locations I used space_id
, because it is the way its documented in API, but in fact it is "space" in terms of elastic stack / kibana.
Indeed, in fleet API it is named namespace
: https://www.elastic.co/guide/en/fleet/current/fleet-api-docs.html#create-agent-policy-api . That could refer to data stream terminology.
Updated.
Now interesting part about agent policy and private locations. I have got feedback, that private location is bind to the namespace
of the agent policy, which refers to data stream namespace. So correct way to configure it for your example would be:
space_id = elasticstack_fleet_agent_policy.main[each.value].namespace
@tobio , lets sync shortly, might be we could improve documentation or even drop space_id
parameter for private location to reduce confusion.
Describe the bug I was testing out the new resource
elasticstack_kibana_synthetics_private_location
Seems like theelasticstack_fleet_agent_policy.namespace
has to matchelasticstack_kibana_synthetics_private_location.space_id
if not you will get an error like this
Trying to understand these 2 values should be matching, it throws the same error if you set unset space_id as null because agent_policy namespace would have been "default"
To Reproduce Steps to reproduce the behavior:
Creating a sample code
Expected behavior My understanding is space_id is a different thing as namespace, so i dont think it should be matching
Versions (please complete the following information):
Additional context Add any other context about the problem here.