openstack_objectstorage_object_v1

Manages a V1 container object resource within OpenStack.

Example Usage

Example with simple content

resource "openstack_objectstorage_container_v1" "container_1" {
  region = "RegionOne"
  name   = "tf-test-container-1"

  metadata {
    test = "true"
  }

  content_type = "application/json"
}

resource "openstack_objectstorage_object_v1" "doc_1" {
  region         = "RegionOne"
  container_name = openstack_objectstorage_container_v1.container_1.name
  name           = "test/default.json"
  metadata {
    test = "true"
  }

  content_type = "application/json"
  content      = <<JSON
               {
                 "foo" : "bar"
               }
JSON

}

Example with content from file

resource "openstack_objectstorage_container_v1" "container_1" {
  region = "RegionOne"
  name   = "tf-test-container-1"

  metadata {
    test = "true"
  }

  content_type = "application/json"
}

resource "openstack_objectstorage_object_v1" "doc_1" {
  region         = "RegionOne"
  container_name = openstack_objectstorage_container_v1.container_1.name
  name           = "test/default.json"
  metadata {
    test = "true"
  }

  content_type = "application/json"
  source       = "./default.json"
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported: