import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Grants [roles and permissions](https://aiven.io/docs/platform/concepts/permissions) to a principal for a resource. Permissions can be granted at the organization, organizational unit, and project level. Unit-level permissions aren't shown in the Aiven Console. * * To assign permissions to multiple users and groups on the same combination of organization ID, resource ID and resource type, don't use multiple `aiven.OrganizationPermission` resources. Instead, use multiple permission blocks as in the example usage. * * **Do not use the `aiven.ProjectUser` or `aiven.OrganizationGroupProject` resources with this resource**. * * By default, Aiven Terraform Provider validates whether the resource already exists in the Aiven API. This validation prevents you from managing permissions for a specific resource using multiple `aiven.OrganizationGroupProject` resources, which leads to overwrites and conflicts. In case of a conflict, you can import the resource using the `pulumi import` command to continue managing it. Alternatively, you can disable this validation by setting the `AIVEN_ORGANIZATION_PERMISSION_VALIDATE_CONFLICT` environment variable to `false`, which will cause Terraform to override the remote state. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aiven from "@pulumi/aiven"; * * const example = new aiven.OrganizationPermission("example", { * permissions: [{ * principalId: "u12345", * permissions: ["read_only"], * principalType: "user", * }], * organizationId: "org1a23f456789", * resourceType: "organization", * resourceId: "foo", * }); * ``` * * ## Import * * ```sh * $ pulumi import aiven:index/organizationPermission:OrganizationPermission example ORGANIZATION_ID/RESOURCE_TYPE/RESOURCE_ID * ``` */ export declare class OrganizationPermission extends pulumi.CustomResource { /** * Get an existing OrganizationPermission resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: OrganizationPermissionState, opts?: pulumi.CustomResourceOptions): OrganizationPermission; /** * Returns true if the given object is an instance of OrganizationPermission. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is OrganizationPermission; /** * ID of an organization. Changing this property forces recreation of the resource. */ readonly organizationId: pulumi.Output; /** * List of roles to set. */ readonly permissions: pulumi.Output; /** * The ID of the organization, unit, or project to grant permissions for. The project ID is the name of the project. Changing this property forces recreation of the resource. */ readonly resourceId: pulumi.Output; /** * Resource type. The possible values are `organization`, `organizationUnit` and `project`. Changing this property forces recreation of the resource. */ readonly resourceType: pulumi.Output; readonly timeouts: pulumi.Output; /** * Create a OrganizationPermission resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: OrganizationPermissionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering OrganizationPermission resources. */ export interface OrganizationPermissionState { /** * ID of an organization. Changing this property forces recreation of the resource. */ organizationId?: pulumi.Input; /** * List of roles to set. */ permissions?: pulumi.Input[] | undefined>; /** * The ID of the organization, unit, or project to grant permissions for. The project ID is the name of the project. Changing this property forces recreation of the resource. */ resourceId?: pulumi.Input; /** * Resource type. The possible values are `organization`, `organizationUnit` and `project`. Changing this property forces recreation of the resource. */ resourceType?: pulumi.Input; timeouts?: pulumi.Input; } /** * The set of arguments for constructing a OrganizationPermission resource. */ export interface OrganizationPermissionArgs { /** * ID of an organization. Changing this property forces recreation of the resource. */ organizationId: pulumi.Input; /** * List of roles to set. */ permissions: pulumi.Input[]>; /** * The ID of the organization, unit, or project to grant permissions for. The project ID is the name of the project. Changing this property forces recreation of the resource. */ resourceId: pulumi.Input; /** * Resource type. The possible values are `organization`, `organizationUnit` and `project`. Changing this property forces recreation of the resource. */ resourceType: pulumi.Input; timeouts?: pulumi.Input; } //# sourceMappingURL=organizationPermission.d.ts.map