ovh.Iam.ResourceGroup
Explore with Pulumi AI
Provides an OVHcloud IAM resource group.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const myResourceGroup = new ovh.iam.ResourceGroup("myResourceGroup", {resources: [
"urn:v1:eu:resource:service1:service1-id",
"urn:v1:eu:resource:service2:service2-id",
]});
import pulumi
import pulumi_ovh as ovh
my_resource_group = ovh.iam.ResourceGroup("myResourceGroup", resources=[
"urn:v1:eu:resource:service1:service1-id",
"urn:v1:eu:resource:service2:service2-id",
])
package main
import (
"github.com/ovh/pulumi-ovh/sdk/go/ovh/Iam"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Iam.NewResourceGroup(ctx, "myResourceGroup", &Iam.ResourceGroupArgs{
Resources: pulumi.StringArray{
pulumi.String("urn:v1:eu:resource:service1:service1-id"),
pulumi.String("urn:v1:eu:resource:service2:service2-id"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() =>
{
var myResourceGroup = new Ovh.Iam.ResourceGroup("myResourceGroup", new()
{
Resources = new[]
{
"urn:v1:eu:resource:service1:service1-id",
"urn:v1:eu:resource:service2:service2-id",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.Iam.ResourceGroup;
import com.pulumi.ovh.Iam.ResourceGroupArgs;
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 myResourceGroup = new ResourceGroup("myResourceGroup", ResourceGroupArgs.builder()
.resources(
"urn:v1:eu:resource:service1:service1-id",
"urn:v1:eu:resource:service2:service2-id")
.build());
}
}
resources:
myResourceGroup:
type: ovh:Iam:ResourceGroup
properties:
resources:
- urn:v1:eu:resource:service1:service1-id
- urn:v1:eu:resource:service2:service2-id
Create ResourceGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ResourceGroup(name: string, args?: ResourceGroupArgs, opts?: CustomResourceOptions);
@overload
def ResourceGroup(resource_name: str,
args: Optional[ResourceGroupArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def ResourceGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
resources: Optional[Sequence[str]] = None)
func NewResourceGroup(ctx *Context, name string, args *ResourceGroupArgs, opts ...ResourceOption) (*ResourceGroup, error)
public ResourceGroup(string name, ResourceGroupArgs? args = null, CustomResourceOptions? opts = null)
public ResourceGroup(String name, ResourceGroupArgs args)
public ResourceGroup(String name, ResourceGroupArgs args, CustomResourceOptions options)
type: ovh:Iam:ResourceGroup
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 ResourceGroupArgs
- 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 ResourceGroupArgs
- 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 ResourceGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ResourceGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ResourceGroupArgs
- 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 resourceGroupResource = new Ovh.Iam.ResourceGroup("resourceGroupResource", new()
{
Name = "string",
Resources = new[]
{
"string",
},
});
example, err := Iam.NewResourceGroup(ctx, "resourceGroupResource", &Iam.ResourceGroupArgs{
Name: pulumi.String("string"),
Resources: pulumi.StringArray{
pulumi.String("string"),
},
})
var resourceGroupResource = new ResourceGroup("resourceGroupResource", ResourceGroupArgs.builder()
.name("string")
.resources("string")
.build());
resource_group_resource = ovh.iam.ResourceGroup("resourceGroupResource",
name="string",
resources=["string"])
const resourceGroupResource = new ovh.iam.ResourceGroup("resourceGroupResource", {
name: "string",
resources: ["string"],
});
type: ovh:Iam:ResourceGroup
properties:
name: string
resources:
- string
ResourceGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ResourceGroup resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the ResourceGroup resource produces the following output properties:
- Created
At string - Date of the creation of the resource group
- Group
URN string - URN of the resource group, used when writing policies
- Id string
- The provider-assigned unique ID for this managed resource.
- Owner string
- Name of the account owning the resource group
- Read
Only bool - Marks that the resource group is not editable. Usually means that this is a default resource group created by OVHcloud
- Updated
At string - Date of the last modification of the resource group
- Created
At string - Date of the creation of the resource group
- Group
URN string - URN of the resource group, used when writing policies
- Id string
- The provider-assigned unique ID for this managed resource.
- Owner string
- Name of the account owning the resource group
- Read
Only bool - Marks that the resource group is not editable. Usually means that this is a default resource group created by OVHcloud
- Updated
At string - Date of the last modification of the resource group
- Group
URN String - URN of the resource group, used when writing policies
- created
At String - Date of the creation of the resource group
- id String
- The provider-assigned unique ID for this managed resource.
- owner String
- Name of the account owning the resource group
- read
Only Boolean - Marks that the resource group is not editable. Usually means that this is a default resource group created by OVHcloud
- updated
At String - Date of the last modification of the resource group
- Group
URN string - URN of the resource group, used when writing policies
- created
At string - Date of the creation of the resource group
- id string
- The provider-assigned unique ID for this managed resource.
- owner string
- Name of the account owning the resource group
- read
Only boolean - Marks that the resource group is not editable. Usually means that this is a default resource group created by OVHcloud
- updated
At string - Date of the last modification of the resource group
- created_
at str - Date of the creation of the resource group
- group_
urn str - URN of the resource group, used when writing policies
- id str
- The provider-assigned unique ID for this managed resource.
- owner str
- Name of the account owning the resource group
- read_
only bool - Marks that the resource group is not editable. Usually means that this is a default resource group created by OVHcloud
- updated_
at str - Date of the last modification of the resource group
- Group
URN String - URN of the resource group, used when writing policies
- created
At String - Date of the creation of the resource group
- id String
- The provider-assigned unique ID for this managed resource.
- owner String
- Name of the account owning the resource group
- read
Only Boolean - Marks that the resource group is not editable. Usually means that this is a default resource group created by OVHcloud
- updated
At String - Date of the last modification of the resource group
Look up Existing ResourceGroup Resource
Get an existing ResourceGroup 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?: ResourceGroupState, opts?: CustomResourceOptions): ResourceGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
group_urn: Optional[str] = None,
created_at: Optional[str] = None,
name: Optional[str] = None,
owner: Optional[str] = None,
read_only: Optional[bool] = None,
resources: Optional[Sequence[str]] = None,
updated_at: Optional[str] = None) -> ResourceGroup
func GetResourceGroup(ctx *Context, name string, id IDInput, state *ResourceGroupState, opts ...ResourceOption) (*ResourceGroup, error)
public static ResourceGroup Get(string name, Input<string> id, ResourceGroupState? state, CustomResourceOptions? opts = null)
public static ResourceGroup get(String name, Output<String> id, ResourceGroupState 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 - Date of the creation of the resource group
- Group
URN string - URN of the resource group, used when writing policies
- Name string
- Name of the resource group
- Owner string
- Name of the account owning the resource group
- Read
Only bool - Marks that the resource group is not editable. Usually means that this is a default resource group created by OVHcloud
- Resources List<string>
- Set of the URNs of the resources contained in the resource group. All urns must be ones of valid resources
- Updated
At string - Date of the last modification of the resource group
- Created
At string - Date of the creation of the resource group
- Group
URN string - URN of the resource group, used when writing policies
- Name string
- Name of the resource group
- Owner string
- Name of the account owning the resource group
- Read
Only bool - Marks that the resource group is not editable. Usually means that this is a default resource group created by OVHcloud
- Resources []string
- Set of the URNs of the resources contained in the resource group. All urns must be ones of valid resources
- Updated
At string - Date of the last modification of the resource group
- Group
URN String - URN of the resource group, used when writing policies
- created
At String - Date of the creation of the resource group
- name String
- Name of the resource group
- owner String
- Name of the account owning the resource group
- read
Only Boolean - Marks that the resource group is not editable. Usually means that this is a default resource group created by OVHcloud
- resources List<String>
- Set of the URNs of the resources contained in the resource group. All urns must be ones of valid resources
- updated
At String - Date of the last modification of the resource group
- Group
URN string - URN of the resource group, used when writing policies
- created
At string - Date of the creation of the resource group
- name string
- Name of the resource group
- owner string
- Name of the account owning the resource group
- read
Only boolean - Marks that the resource group is not editable. Usually means that this is a default resource group created by OVHcloud
- resources string[]
- Set of the URNs of the resources contained in the resource group. All urns must be ones of valid resources
- updated
At string - Date of the last modification of the resource group
- created_
at str - Date of the creation of the resource group
- group_
urn str - URN of the resource group, used when writing policies
- name str
- Name of the resource group
- owner str
- Name of the account owning the resource group
- read_
only bool - Marks that the resource group is not editable. Usually means that this is a default resource group created by OVHcloud
- resources Sequence[str]
- Set of the URNs of the resources contained in the resource group. All urns must be ones of valid resources
- updated_
at str - Date of the last modification of the resource group
- Group
URN String - URN of the resource group, used when writing policies
- created
At String - Date of the creation of the resource group
- name String
- Name of the resource group
- owner String
- Name of the account owning the resource group
- read
Only Boolean - Marks that the resource group is not editable. Usually means that this is a default resource group created by OVHcloud
- resources List<String>
- Set of the URNs of the resources contained in the resource group. All urns must be ones of valid resources
- updated
At String - Date of the last modification of the resource group
Import
Resource groups can be imported by using their id.
$ terraform import ovh_iam_resource_group.my_resource_group resource_group_id
Read only resource groups cannot be imported
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovh
Terraform Provider.