openstack.images.ImageAccess
Explore with Pulumi AI
Manages members for the shared OpenStack Glance V2 Image within the source project, which owns the Image.
Example Usage
Unprivileged user
Create a shared image and propose a membership to the
bed6b6cbb86a4e2d8dc2735c2f1000e4
project ID.
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const rancheros = new openstack.images.Image("rancheros", {
name: "RancherOS",
imageSourceUrl: "https://releases.rancher.com/os/latest/rancheros-openstack.img",
containerFormat: "bare",
diskFormat: "qcow2",
visibility: "shared",
properties: {
key: "value",
},
});
const rancherosMember = new openstack.images.ImageAccess("rancheros_member", {
imageId: rancheros.id,
memberId: "bed6b6cbb86a4e2d8dc2735c2f1000e4",
});
import pulumi
import pulumi_openstack as openstack
rancheros = openstack.images.Image("rancheros",
name="RancherOS",
image_source_url="https://releases.rancher.com/os/latest/rancheros-openstack.img",
container_format="bare",
disk_format="qcow2",
visibility="shared",
properties={
"key": "value",
})
rancheros_member = openstack.images.ImageAccess("rancheros_member",
image_id=rancheros.id,
member_id="bed6b6cbb86a4e2d8dc2735c2f1000e4")
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/images"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
rancheros, err := images.NewImage(ctx, "rancheros", &images.ImageArgs{
Name: pulumi.String("RancherOS"),
ImageSourceUrl: pulumi.String("https://releases.rancher.com/os/latest/rancheros-openstack.img"),
ContainerFormat: pulumi.String("bare"),
DiskFormat: pulumi.String("qcow2"),
Visibility: pulumi.String("shared"),
Properties: pulumi.StringMap{
"key": pulumi.String("value"),
},
})
if err != nil {
return err
}
_, err = images.NewImageAccess(ctx, "rancheros_member", &images.ImageAccessArgs{
ImageId: rancheros.ID(),
MemberId: pulumi.String("bed6b6cbb86a4e2d8dc2735c2f1000e4"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var rancheros = new OpenStack.Images.Image("rancheros", new()
{
Name = "RancherOS",
ImageSourceUrl = "https://releases.rancher.com/os/latest/rancheros-openstack.img",
ContainerFormat = "bare",
DiskFormat = "qcow2",
Visibility = "shared",
Properties =
{
{ "key", "value" },
},
});
var rancherosMember = new OpenStack.Images.ImageAccess("rancheros_member", new()
{
ImageId = rancheros.Id,
MemberId = "bed6b6cbb86a4e2d8dc2735c2f1000e4",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.images.Image;
import com.pulumi.openstack.images.ImageArgs;
import com.pulumi.openstack.images.ImageAccess;
import com.pulumi.openstack.images.ImageAccessArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var rancheros = new Image("rancheros", ImageArgs.builder()
.name("RancherOS")
.imageSourceUrl("https://releases.rancher.com/os/latest/rancheros-openstack.img")
.containerFormat("bare")
.diskFormat("qcow2")
.visibility("shared")
.properties(Map.of("key", "value"))
.build());
var rancherosMember = new ImageAccess("rancherosMember", ImageAccessArgs.builder()
.imageId(rancheros.id())
.memberId("bed6b6cbb86a4e2d8dc2735c2f1000e4")
.build());
}
}
resources:
rancheros:
type: openstack:images:Image
properties:
name: RancherOS
imageSourceUrl: https://releases.rancher.com/os/latest/rancheros-openstack.img
containerFormat: bare
diskFormat: qcow2
visibility: shared
properties:
key: value
rancherosMember:
type: openstack:images:ImageAccess
name: rancheros_member
properties:
imageId: ${rancheros.id}
memberId: bed6b6cbb86a4e2d8dc2735c2f1000e4
Privileged user
Create a shared image and set a membership to the
bed6b6cbb86a4e2d8dc2735c2f1000e4
project ID.
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const rancheros = new openstack.images.Image("rancheros", {
name: "RancherOS",
imageSourceUrl: "https://releases.rancher.com/os/latest/rancheros-openstack.img",
containerFormat: "bare",
diskFormat: "qcow2",
visibility: "shared",
properties: {
key: "value",
},
});
const rancherosMember = new openstack.images.ImageAccess("rancheros_member", {
imageId: rancheros.id,
memberId: "bed6b6cbb86a4e2d8dc2735c2f1000e4",
status: "accepted",
});
import pulumi
import pulumi_openstack as openstack
rancheros = openstack.images.Image("rancheros",
name="RancherOS",
image_source_url="https://releases.rancher.com/os/latest/rancheros-openstack.img",
container_format="bare",
disk_format="qcow2",
visibility="shared",
properties={
"key": "value",
})
rancheros_member = openstack.images.ImageAccess("rancheros_member",
image_id=rancheros.id,
member_id="bed6b6cbb86a4e2d8dc2735c2f1000e4",
status="accepted")
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/images"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
rancheros, err := images.NewImage(ctx, "rancheros", &images.ImageArgs{
Name: pulumi.String("RancherOS"),
ImageSourceUrl: pulumi.String("https://releases.rancher.com/os/latest/rancheros-openstack.img"),
ContainerFormat: pulumi.String("bare"),
DiskFormat: pulumi.String("qcow2"),
Visibility: pulumi.String("shared"),
Properties: pulumi.StringMap{
"key": pulumi.String("value"),
},
})
if err != nil {
return err
}
_, err = images.NewImageAccess(ctx, "rancheros_member", &images.ImageAccessArgs{
ImageId: rancheros.ID(),
MemberId: pulumi.String("bed6b6cbb86a4e2d8dc2735c2f1000e4"),
Status: pulumi.String("accepted"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var rancheros = new OpenStack.Images.Image("rancheros", new()
{
Name = "RancherOS",
ImageSourceUrl = "https://releases.rancher.com/os/latest/rancheros-openstack.img",
ContainerFormat = "bare",
DiskFormat = "qcow2",
Visibility = "shared",
Properties =
{
{ "key", "value" },
},
});
var rancherosMember = new OpenStack.Images.ImageAccess("rancheros_member", new()
{
ImageId = rancheros.Id,
MemberId = "bed6b6cbb86a4e2d8dc2735c2f1000e4",
Status = "accepted",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.images.Image;
import com.pulumi.openstack.images.ImageArgs;
import com.pulumi.openstack.images.ImageAccess;
import com.pulumi.openstack.images.ImageAccessArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var rancheros = new Image("rancheros", ImageArgs.builder()
.name("RancherOS")
.imageSourceUrl("https://releases.rancher.com/os/latest/rancheros-openstack.img")
.containerFormat("bare")
.diskFormat("qcow2")
.visibility("shared")
.properties(Map.of("key", "value"))
.build());
var rancherosMember = new ImageAccess("rancherosMember", ImageAccessArgs.builder()
.imageId(rancheros.id())
.memberId("bed6b6cbb86a4e2d8dc2735c2f1000e4")
.status("accepted")
.build());
}
}
resources:
rancheros:
type: openstack:images:Image
properties:
name: RancherOS
imageSourceUrl: https://releases.rancher.com/os/latest/rancheros-openstack.img
containerFormat: bare
diskFormat: qcow2
visibility: shared
properties:
key: value
rancherosMember:
type: openstack:images:ImageAccess
name: rancheros_member
properties:
imageId: ${rancheros.id}
memberId: bed6b6cbb86a4e2d8dc2735c2f1000e4
status: accepted
Create ImageAccess Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ImageAccess(name: string, args: ImageAccessArgs, opts?: CustomResourceOptions);
@overload
def ImageAccess(resource_name: str,
args: ImageAccessArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ImageAccess(resource_name: str,
opts: Optional[ResourceOptions] = None,
image_id: Optional[str] = None,
member_id: Optional[str] = None,
region: Optional[str] = None,
status: Optional[str] = None)
func NewImageAccess(ctx *Context, name string, args ImageAccessArgs, opts ...ResourceOption) (*ImageAccess, error)
public ImageAccess(string name, ImageAccessArgs args, CustomResourceOptions? opts = null)
public ImageAccess(String name, ImageAccessArgs args)
public ImageAccess(String name, ImageAccessArgs args, CustomResourceOptions options)
type: openstack:images:ImageAccess
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ImageAccessArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ImageAccessArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ImageAccessArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ImageAccessArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ImageAccessArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var imageAccessResource = new OpenStack.Images.ImageAccess("imageAccessResource", new()
{
ImageId = "string",
MemberId = "string",
Region = "string",
Status = "string",
});
example, err := images.NewImageAccess(ctx, "imageAccessResource", &images.ImageAccessArgs{
ImageId: pulumi.String("string"),
MemberId: pulumi.String("string"),
Region: pulumi.String("string"),
Status: pulumi.String("string"),
})
var imageAccessResource = new ImageAccess("imageAccessResource", ImageAccessArgs.builder()
.imageId("string")
.memberId("string")
.region("string")
.status("string")
.build());
image_access_resource = openstack.images.ImageAccess("imageAccessResource",
image_id="string",
member_id="string",
region="string",
status="string")
const imageAccessResource = new openstack.images.ImageAccess("imageAccessResource", {
imageId: "string",
memberId: "string",
region: "string",
status: "string",
});
type: openstack:images:ImageAccess
properties:
imageId: string
memberId: string
region: string
status: string
ImageAccess Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ImageAccess resource accepts the following input properties:
- Image
Id string - The image ID.
- Member
Id string - The member ID, e.g. the target project ID.
- Region string
- The region in which to obtain the V2 Glance client.
A Glance client is needed to manage Image members. If omitted, the
region
argument of the provider is used. Changing this creates a new resource. - Status string
- The member proposal status. Optional if admin wants to
force the member proposal acceptance. Can either be
accepted
,rejected
orpending
. Defaults topending
. Foridden for non-admin users.
- Image
Id string - The image ID.
- Member
Id string - The member ID, e.g. the target project ID.
- Region string
- The region in which to obtain the V2 Glance client.
A Glance client is needed to manage Image members. If omitted, the
region
argument of the provider is used. Changing this creates a new resource. - Status string
- The member proposal status. Optional if admin wants to
force the member proposal acceptance. Can either be
accepted
,rejected
orpending
. Defaults topending
. Foridden for non-admin users.
- image
Id String - The image ID.
- member
Id String - The member ID, e.g. the target project ID.
- region String
- The region in which to obtain the V2 Glance client.
A Glance client is needed to manage Image members. If omitted, the
region
argument of the provider is used. Changing this creates a new resource. - status String
- The member proposal status. Optional if admin wants to
force the member proposal acceptance. Can either be
accepted
,rejected
orpending
. Defaults topending
. Foridden for non-admin users.
- image
Id string - The image ID.
- member
Id string - The member ID, e.g. the target project ID.
- region string
- The region in which to obtain the V2 Glance client.
A Glance client is needed to manage Image members. If omitted, the
region
argument of the provider is used. Changing this creates a new resource. - status string
- The member proposal status. Optional if admin wants to
force the member proposal acceptance. Can either be
accepted
,rejected
orpending
. Defaults topending
. Foridden for non-admin users.
- image_
id str - The image ID.
- member_
id str - The member ID, e.g. the target project ID.
- region str
- The region in which to obtain the V2 Glance client.
A Glance client is needed to manage Image members. If omitted, the
region
argument of the provider is used. Changing this creates a new resource. - status str
- The member proposal status. Optional if admin wants to
force the member proposal acceptance. Can either be
accepted
,rejected
orpending
. Defaults topending
. Foridden for non-admin users.
- image
Id String - The image ID.
- member
Id String - The member ID, e.g. the target project ID.
- region String
- The region in which to obtain the V2 Glance client.
A Glance client is needed to manage Image members. If omitted, the
region
argument of the provider is used. Changing this creates a new resource. - status String
- The member proposal status. Optional if admin wants to
force the member proposal acceptance. Can either be
accepted
,rejected
orpending
. Defaults topending
. Foridden for non-admin users.
Outputs
All input properties are implicitly available as output properties. Additionally, the ImageAccess resource produces the following output properties:
- created_
at str - The date the image access was created.
- id str
- The provider-assigned unique ID for this managed resource.
- schema str
- The member schema.
- updated_
at str - The date the image access was last updated.
Look up Existing ImageAccess Resource
Get an existing ImageAccess resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ImageAccessState, opts?: CustomResourceOptions): ImageAccess
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
image_id: Optional[str] = None,
member_id: Optional[str] = None,
region: Optional[str] = None,
schema: Optional[str] = None,
status: Optional[str] = None,
updated_at: Optional[str] = None) -> ImageAccess
func GetImageAccess(ctx *Context, name string, id IDInput, state *ImageAccessState, opts ...ResourceOption) (*ImageAccess, error)
public static ImageAccess Get(string name, Input<string> id, ImageAccessState? state, CustomResourceOptions? opts = null)
public static ImageAccess get(String name, Output<String> id, ImageAccessState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Created
At string - The date the image access was created.
- Image
Id string - The image ID.
- Member
Id string - The member ID, e.g. the target project ID.
- Region string
- The region in which to obtain the V2 Glance client.
A Glance client is needed to manage Image members. If omitted, the
region
argument of the provider is used. Changing this creates a new resource. - Schema string
- The member schema.
- Status string
- The member proposal status. Optional if admin wants to
force the member proposal acceptance. Can either be
accepted
,rejected
orpending
. Defaults topending
. Foridden for non-admin users. - Updated
At string - The date the image access was last updated.
- Created
At string - The date the image access was created.
- Image
Id string - The image ID.
- Member
Id string - The member ID, e.g. the target project ID.
- Region string
- The region in which to obtain the V2 Glance client.
A Glance client is needed to manage Image members. If omitted, the
region
argument of the provider is used. Changing this creates a new resource. - Schema string
- The member schema.
- Status string
- The member proposal status. Optional if admin wants to
force the member proposal acceptance. Can either be
accepted
,rejected
orpending
. Defaults topending
. Foridden for non-admin users. - Updated
At string - The date the image access was last updated.
- created
At String - The date the image access was created.
- image
Id String - The image ID.
- member
Id String - The member ID, e.g. the target project ID.
- region String
- The region in which to obtain the V2 Glance client.
A Glance client is needed to manage Image members. If omitted, the
region
argument of the provider is used. Changing this creates a new resource. - schema String
- The member schema.
- status String
- The member proposal status. Optional if admin wants to
force the member proposal acceptance. Can either be
accepted
,rejected
orpending
. Defaults topending
. Foridden for non-admin users. - updated
At String - The date the image access was last updated.
- created
At string - The date the image access was created.
- image
Id string - The image ID.
- member
Id string - The member ID, e.g. the target project ID.
- region string
- The region in which to obtain the V2 Glance client.
A Glance client is needed to manage Image members. If omitted, the
region
argument of the provider is used. Changing this creates a new resource. - schema string
- The member schema.
- status string
- The member proposal status. Optional if admin wants to
force the member proposal acceptance. Can either be
accepted
,rejected
orpending
. Defaults topending
. Foridden for non-admin users. - updated
At string - The date the image access was last updated.
- created_
at str - The date the image access was created.
- image_
id str - The image ID.
- member_
id str - The member ID, e.g. the target project ID.
- region str
- The region in which to obtain the V2 Glance client.
A Glance client is needed to manage Image members. If omitted, the
region
argument of the provider is used. Changing this creates a new resource. - schema str
- The member schema.
- status str
- The member proposal status. Optional if admin wants to
force the member proposal acceptance. Can either be
accepted
,rejected
orpending
. Defaults topending
. Foridden for non-admin users. - updated_
at str - The date the image access was last updated.
- created
At String - The date the image access was created.
- image
Id String - The image ID.
- member
Id String - The member ID, e.g. the target project ID.
- region String
- The region in which to obtain the V2 Glance client.
A Glance client is needed to manage Image members. If omitted, the
region
argument of the provider is used. Changing this creates a new resource. - schema String
- The member schema.
- status String
- The member proposal status. Optional if admin wants to
force the member proposal acceptance. Can either be
accepted
,rejected
orpending
. Defaults topending
. Foridden for non-admin users. - updated
At String - The date the image access was last updated.
Import
Image access can be imported using the image_id
and the member_id
,
separated by a slash, e.g.
$ pulumi import openstack:images/imageAccess:ImageAccess openstack_images_image_access_v2 89c60255-9bd6-460c-822a-e2b959ede9d2/bed6b6cbb86a4e2d8dc2735c2f1000e4
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- OpenStack pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstack
Terraform Provider.