// Module included in the following assemblies:
//
// assembly-configure-address-spaces-addresses-cli-kube.adoc
// assembly-configure-address-spaces-addresses-cli-oc.adoc

[id='create-address-space-cli-{context}']
= Creating address spaces using the command line

.Procedure

ifeval::["{cmdcli}" == "oc"]
. Log in as a messaging tenant:
+
[subs="attributes",options="nowrap"]
----
{cmdcli} login -u developer
----

. Create the project for the messaging application:
+
[subs="attributes",options="nowrap"]
----
{cmdcli} new-project myapp
----
endif::[]

. Create an address space definition:
+
[source,yaml,options="nowrap"]
.link:resources/standard-address-space.yaml[standard-address-space.yaml]
----
include::../common/standard-address-space.yaml[]
----

. Create the address space:
+
[options="nowrap",subs="attributes"]
----
{cmdcli} create -f standard-address-space.yaml
----

. Check the status of the address space:
+
[options="nowrap",subs="attributes"]
----
{cmdcli} get addressspace myspace -o jsonpath={.status.isReady}
----
+
The address space is ready for use when the above command outputs `true`.
