openstack_objectstorage_tempurl_v1
This instruction is a copy of the official documentation for the OpenStack Terraform provider at Terraform Registry.
Use this resource to generate an OpenStack Object Storage temporary URL.
The temporary URL will be valid for as long as TTL is set to (in seconds). Once the URL has expired, it will no longer be valid, but the resource will remain in place. If you wish to automatically regenerate a URL, set the regenerate argument to true. This will create a new resource with a new ID and URL.
Example Usage
resource "openstack_objectstorage_container_v1" "container_1" {
name = "test"
metadata = {
Temp-URL-Key = "testkey"
}
}
resource "openstack_objectstorage_object_v1" "object_1" {
container_name = openstack_objectstorage_container_v1.container_1.name
name = "test"
content = "Hello, world!"
}
resource "openstack_objectstorage_tempurl_v1" "obj_tempurl" {
container = openstack_objectstorage_container_v1.container_1.name
object = openstack_objectstorage_object_v1.object_1.name
method = "post"
ttl = 20
}
Argument Reference
The following arguments are supported:
-
region- (Optional) The region where the tempurl is located. -
container- (Required) The name of the container the object belongs to. -
object- (Required) The name of the object for which the tempurl is generated. -
ttl- (Required) The TTL, in seconds, for the URL. For how long it should be valid. -
method- (Optional) The method allowed when accessing this URL. Valid values areGETandPOST. The default isGET. -
regenerate- (Optional) Whether to automatically regenerate the URL when it has expired. If set to true, this will create a new resource with a new ID and new URL. Defaults to false.
Attributes Reference
id- Computed md5 hash based on the generated URL.container- See Argument Reference above.object- See Argument Reference above.ttl- See Argument Reference above.method- See Argument Reference above.url- The URL.region- The region where the endpoint is located.