ionoscloud.compute.Share
Explore with Pulumi AI
Manages Shares and list shares permissions granted to the group members for each shared resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
const example = new ionoscloud.compute.Datacenter("example", {
name: "Datacenter Example",
location: "us/las",
description: "Datacenter Description",
secAuthProtection: false,
});
const exampleGroup = new ionoscloud.compute.Group("example", {
name: "Group Example",
createDatacenter: true,
createSnapshot: true,
reserveIp: true,
accessActivityLog: true,
createPcc: true,
s3Privilege: true,
createBackupUnit: true,
createInternetAccess: true,
createK8sCluster: true,
});
const exampleShare = new ionoscloud.compute.Share("example", {
groupId: exampleGroup.id,
resourceId: example.id,
editPrivilege: true,
sharePrivilege: false,
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.compute.Datacenter("example",
name="Datacenter Example",
location="us/las",
description="Datacenter Description",
sec_auth_protection=False)
example_group = ionoscloud.compute.Group("example",
name="Group Example",
create_datacenter=True,
create_snapshot=True,
reserve_ip=True,
access_activity_log=True,
create_pcc=True,
s3_privilege=True,
create_backup_unit=True,
create_internet_access=True,
create_k8s_cluster=True)
example_share = ionoscloud.compute.Share("example",
group_id=example_group.id,
resource_id=example.id,
edit_privilege=True,
share_privilege=False)
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := compute.NewDatacenter(ctx, "example", &compute.DatacenterArgs{
Name: pulumi.String("Datacenter Example"),
Location: pulumi.String("us/las"),
Description: pulumi.String("Datacenter Description"),
SecAuthProtection: pulumi.Bool(false),
})
if err != nil {
return err
}
exampleGroup, err := compute.NewGroup(ctx, "example", &compute.GroupArgs{
Name: pulumi.String("Group Example"),
CreateDatacenter: pulumi.Bool(true),
CreateSnapshot: pulumi.Bool(true),
ReserveIp: pulumi.Bool(true),
AccessActivityLog: pulumi.Bool(true),
CreatePcc: pulumi.Bool(true),
S3Privilege: pulumi.Bool(true),
CreateBackupUnit: pulumi.Bool(true),
CreateInternetAccess: pulumi.Bool(true),
CreateK8sCluster: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = compute.NewShare(ctx, "example", &compute.ShareArgs{
GroupId: exampleGroup.ID(),
ResourceId: example.ID(),
EditPrivilege: pulumi.Bool(true),
SharePrivilege: pulumi.Bool(false),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = new Ionoscloud.Compute.Datacenter("example", new()
{
Name = "Datacenter Example",
Location = "us/las",
Description = "Datacenter Description",
SecAuthProtection = false,
});
var exampleGroup = new Ionoscloud.Compute.Group("example", new()
{
Name = "Group Example",
CreateDatacenter = true,
CreateSnapshot = true,
ReserveIp = true,
AccessActivityLog = true,
CreatePcc = true,
S3Privilege = true,
CreateBackupUnit = true,
CreateInternetAccess = true,
CreateK8sCluster = true,
});
var exampleShare = new Ionoscloud.Compute.Share("example", new()
{
GroupId = exampleGroup.Id,
ResourceId = example.Id,
EditPrivilege = true,
SharePrivilege = false,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.compute.Datacenter;
import com.pulumi.ionoscloud.compute.DatacenterArgs;
import com.pulumi.ionoscloud.compute.Group;
import com.pulumi.ionoscloud.compute.GroupArgs;
import com.pulumi.ionoscloud.compute.Share;
import com.pulumi.ionoscloud.compute.ShareArgs;
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 example = new Datacenter("example", DatacenterArgs.builder()
.name("Datacenter Example")
.location("us/las")
.description("Datacenter Description")
.secAuthProtection(false)
.build());
var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
.name("Group Example")
.createDatacenter(true)
.createSnapshot(true)
.reserveIp(true)
.accessActivityLog(true)
.createPcc(true)
.s3Privilege(true)
.createBackupUnit(true)
.createInternetAccess(true)
.createK8sCluster(true)
.build());
var exampleShare = new Share("exampleShare", ShareArgs.builder()
.groupId(exampleGroup.id())
.resourceId(example.id())
.editPrivilege(true)
.sharePrivilege(false)
.build());
}
}
resources:
example:
type: ionoscloud:compute:Datacenter
properties:
name: Datacenter Example
location: us/las
description: Datacenter Description
secAuthProtection: false
exampleGroup:
type: ionoscloud:compute:Group
name: example
properties:
name: Group Example
createDatacenter: true
createSnapshot: true
reserveIp: true
accessActivityLog: true
createPcc: true
s3Privilege: true
createBackupUnit: true
createInternetAccess: true
createK8sCluster: true
exampleShare:
type: ionoscloud:compute:Share
name: example
properties:
groupId: ${exampleGroup.id}
resourceId: ${example.id}
editPrivilege: true
sharePrivilege: false
Create Share Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Share(name: string, args: ShareArgs, opts?: CustomResourceOptions);
@overload
def Share(resource_name: str,
args: ShareArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Share(resource_name: str,
opts: Optional[ResourceOptions] = None,
group_id: Optional[str] = None,
resource_id: Optional[str] = None,
edit_privilege: Optional[bool] = None,
share_privilege: Optional[bool] = None)
func NewShare(ctx *Context, name string, args ShareArgs, opts ...ResourceOption) (*Share, error)
public Share(string name, ShareArgs args, CustomResourceOptions? opts = null)
type: ionoscloud:compute:Share
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 ShareArgs
- 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 ShareArgs
- 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 ShareArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ShareArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ShareArgs
- 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 shareResource = new Ionoscloud.Compute.Share("shareResource", new()
{
GroupId = "string",
ResourceId = "string",
EditPrivilege = false,
SharePrivilege = false,
});
example, err := compute.NewShare(ctx, "shareResource", &compute.ShareArgs{
GroupId: pulumi.String("string"),
ResourceId: pulumi.String("string"),
EditPrivilege: pulumi.Bool(false),
SharePrivilege: pulumi.Bool(false),
})
var shareResource = new com.ionoscloud.pulumi.ionoscloud.compute.Share("shareResource", com.ionoscloud.pulumi.ionoscloud.compute.ShareArgs.builder()
.groupId("string")
.resourceId("string")
.editPrivilege(false)
.sharePrivilege(false)
.build());
share_resource = ionoscloud.compute.Share("shareResource",
group_id="string",
resource_id="string",
edit_privilege=False,
share_privilege=False)
const shareResource = new ionoscloud.compute.Share("shareResource", {
groupId: "string",
resourceId: "string",
editPrivilege: false,
sharePrivilege: false,
});
type: ionoscloud:compute:Share
properties:
editPrivilege: false
groupId: string
resourceId: string
sharePrivilege: false
Share 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 Share resource accepts the following input properties:
- Group
Id string - [string] The ID of the specific group containing the resource to update.
- Resource
Id string - [string] The ID of the specific resource to update.
- Edit
Privilege bool - [Boolean] The group has permission to edit privileges on this resource.
- bool
[Boolean] The group has permission to share this resource.
⚠️ Note: There is a limitation due to which the creation of several shares at the same time leads to an error. To avoid this,
parallelism=1
can be used when runningpulumi up
command in order to create the resources in a sequential manner. Another solution involves the usage ofdepends_on
attributes inside theionoscloud.compute.Share
resource to enforce the sequential creation of the shares.
- Group
Id string - [string] The ID of the specific group containing the resource to update.
- Resource
Id string - [string] The ID of the specific resource to update.
- Edit
Privilege bool - [Boolean] The group has permission to edit privileges on this resource.
- bool
[Boolean] The group has permission to share this resource.
⚠️ Note: There is a limitation due to which the creation of several shares at the same time leads to an error. To avoid this,
parallelism=1
can be used when runningpulumi up
command in order to create the resources in a sequential manner. Another solution involves the usage ofdepends_on
attributes inside theionoscloud.compute.Share
resource to enforce the sequential creation of the shares.
- group
Id String - [string] The ID of the specific group containing the resource to update.
- resource
Id String - [string] The ID of the specific resource to update.
- edit
Privilege Boolean - [Boolean] The group has permission to edit privileges on this resource.
- Boolean
[Boolean] The group has permission to share this resource.
⚠️ Note: There is a limitation due to which the creation of several shares at the same time leads to an error. To avoid this,
parallelism=1
can be used when runningpulumi up
command in order to create the resources in a sequential manner. Another solution involves the usage ofdepends_on
attributes inside theionoscloud.compute.Share
resource to enforce the sequential creation of the shares.
- group
Id string - [string] The ID of the specific group containing the resource to update.
- resource
Id string - [string] The ID of the specific resource to update.
- edit
Privilege boolean - [Boolean] The group has permission to edit privileges on this resource.
- boolean
[Boolean] The group has permission to share this resource.
⚠️ Note: There is a limitation due to which the creation of several shares at the same time leads to an error. To avoid this,
parallelism=1
can be used when runningpulumi up
command in order to create the resources in a sequential manner. Another solution involves the usage ofdepends_on
attributes inside theionoscloud.compute.Share
resource to enforce the sequential creation of the shares.
- group_
id str - [string] The ID of the specific group containing the resource to update.
- resource_
id str - [string] The ID of the specific resource to update.
- edit_
privilege bool - [Boolean] The group has permission to edit privileges on this resource.
- bool
[Boolean] The group has permission to share this resource.
⚠️ Note: There is a limitation due to which the creation of several shares at the same time leads to an error. To avoid this,
parallelism=1
can be used when runningpulumi up
command in order to create the resources in a sequential manner. Another solution involves the usage ofdepends_on
attributes inside theionoscloud.compute.Share
resource to enforce the sequential creation of the shares.
- group
Id String - [string] The ID of the specific group containing the resource to update.
- resource
Id String - [string] The ID of the specific resource to update.
- edit
Privilege Boolean - [Boolean] The group has permission to edit privileges on this resource.
- Boolean
[Boolean] The group has permission to share this resource.
⚠️ Note: There is a limitation due to which the creation of several shares at the same time leads to an error. To avoid this,
parallelism=1
can be used when runningpulumi up
command in order to create the resources in a sequential manner. Another solution involves the usage ofdepends_on
attributes inside theionoscloud.compute.Share
resource to enforce the sequential creation of the shares.
Outputs
All input properties are implicitly available as output properties. Additionally, the Share resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Share Resource
Get an existing Share 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?: ShareState, opts?: CustomResourceOptions): Share
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
edit_privilege: Optional[bool] = None,
group_id: Optional[str] = None,
resource_id: Optional[str] = None,
share_privilege: Optional[bool] = None) -> Share
func GetShare(ctx *Context, name string, id IDInput, state *ShareState, opts ...ResourceOption) (*Share, error)
public static Share Get(string name, Input<string> id, ShareState? state, CustomResourceOptions? opts = null)
public static Share get(String name, Output<String> id, ShareState state, CustomResourceOptions options)
resources: _: type: ionoscloud:compute:Share get: id: ${id}
- 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.
- Edit
Privilege bool - [Boolean] The group has permission to edit privileges on this resource.
- Group
Id string - [string] The ID of the specific group containing the resource to update.
- Resource
Id string - [string] The ID of the specific resource to update.
- bool
[Boolean] The group has permission to share this resource.
⚠️ Note: There is a limitation due to which the creation of several shares at the same time leads to an error. To avoid this,
parallelism=1
can be used when runningpulumi up
command in order to create the resources in a sequential manner. Another solution involves the usage ofdepends_on
attributes inside theionoscloud.compute.Share
resource to enforce the sequential creation of the shares.
- Edit
Privilege bool - [Boolean] The group has permission to edit privileges on this resource.
- Group
Id string - [string] The ID of the specific group containing the resource to update.
- Resource
Id string - [string] The ID of the specific resource to update.
- bool
[Boolean] The group has permission to share this resource.
⚠️ Note: There is a limitation due to which the creation of several shares at the same time leads to an error. To avoid this,
parallelism=1
can be used when runningpulumi up
command in order to create the resources in a sequential manner. Another solution involves the usage ofdepends_on
attributes inside theionoscloud.compute.Share
resource to enforce the sequential creation of the shares.
- edit
Privilege Boolean - [Boolean] The group has permission to edit privileges on this resource.
- group
Id String - [string] The ID of the specific group containing the resource to update.
- resource
Id String - [string] The ID of the specific resource to update.
- Boolean
[Boolean] The group has permission to share this resource.
⚠️ Note: There is a limitation due to which the creation of several shares at the same time leads to an error. To avoid this,
parallelism=1
can be used when runningpulumi up
command in order to create the resources in a sequential manner. Another solution involves the usage ofdepends_on
attributes inside theionoscloud.compute.Share
resource to enforce the sequential creation of the shares.
- edit
Privilege boolean - [Boolean] The group has permission to edit privileges on this resource.
- group
Id string - [string] The ID of the specific group containing the resource to update.
- resource
Id string - [string] The ID of the specific resource to update.
- boolean
[Boolean] The group has permission to share this resource.
⚠️ Note: There is a limitation due to which the creation of several shares at the same time leads to an error. To avoid this,
parallelism=1
can be used when runningpulumi up
command in order to create the resources in a sequential manner. Another solution involves the usage ofdepends_on
attributes inside theionoscloud.compute.Share
resource to enforce the sequential creation of the shares.
- edit_
privilege bool - [Boolean] The group has permission to edit privileges on this resource.
- group_
id str - [string] The ID of the specific group containing the resource to update.
- resource_
id str - [string] The ID of the specific resource to update.
- bool
[Boolean] The group has permission to share this resource.
⚠️ Note: There is a limitation due to which the creation of several shares at the same time leads to an error. To avoid this,
parallelism=1
can be used when runningpulumi up
command in order to create the resources in a sequential manner. Another solution involves the usage ofdepends_on
attributes inside theionoscloud.compute.Share
resource to enforce the sequential creation of the shares.
- edit
Privilege Boolean - [Boolean] The group has permission to edit privileges on this resource.
- group
Id String - [string] The ID of the specific group containing the resource to update.
- resource
Id String - [string] The ID of the specific resource to update.
- Boolean
[Boolean] The group has permission to share this resource.
⚠️ Note: There is a limitation due to which the creation of several shares at the same time leads to an error. To avoid this,
parallelism=1
can be used when runningpulumi up
command in order to create the resources in a sequential manner. Another solution involves the usage ofdepends_on
attributes inside theionoscloud.compute.Share
resource to enforce the sequential creation of the shares.
Import
Resource Share can be imported using the resource id
, e.g.
$ pulumi import ionoscloud:compute/share:Share myshare group uuid/resource uuid
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ionoscloud ionos-cloud/pulumi-ionoscloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.