1. Packages
  2. OpenStack
  3. API Docs
  4. identity
  5. Ec2CredentialV3
OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi

openstack.identity.Ec2CredentialV3

Explore with Pulumi AI

openstack logo
OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi

    Manages a V3 EC2 Credential resource within OpenStack Keystone. EC2 credentials in OpenStack are used to access S3 compatible Swift/RadosGW endpoints or to authenticate against Keystone.

    Note: All arguments including the EC2 credential access key and secret will be stored in the raw state as plain-text. Read more about sensitive data in state.

    Example Usage

    EC2 credential in current project scope

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const ec2Key1 = new openstack.identity.Ec2CredentialV3("ec2_key1", {});
    
    import pulumi
    import pulumi_openstack as openstack
    
    ec2_key1 = openstack.identity.Ec2CredentialV3("ec2_key1")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/identity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := identity.NewEc2CredentialV3(ctx, "ec2_key1", nil)
    		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 ec2Key1 = new OpenStack.Identity.Ec2CredentialV3("ec2_key1");
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.identity.Ec2CredentialV3;
    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 ec2Key1 = new Ec2CredentialV3("ec2Key1");
    
        }
    }
    
    resources:
      ec2Key1:
        type: openstack:identity:Ec2CredentialV3
        name: ec2_key1
    

    EC2 credential in pre-defined project scope

    This allows administrative users to create EC2 credentials for a scope different from the current auth scope.

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const ec2Key1 = new openstack.identity.Ec2CredentialV3("ec2_key1", {projectId: "f7ac731cc11f40efbc03a9f9e1d1d21f"});
    
    import pulumi
    import pulumi_openstack as openstack
    
    ec2_key1 = openstack.identity.Ec2CredentialV3("ec2_key1", project_id="f7ac731cc11f40efbc03a9f9e1d1d21f")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/identity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := identity.NewEc2CredentialV3(ctx, "ec2_key1", &identity.Ec2CredentialV3Args{
    			ProjectId: pulumi.String("f7ac731cc11f40efbc03a9f9e1d1d21f"),
    		})
    		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 ec2Key1 = new OpenStack.Identity.Ec2CredentialV3("ec2_key1", new()
        {
            ProjectId = "f7ac731cc11f40efbc03a9f9e1d1d21f",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.identity.Ec2CredentialV3;
    import com.pulumi.openstack.identity.Ec2CredentialV3Args;
    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 ec2Key1 = new Ec2CredentialV3("ec2Key1", Ec2CredentialV3Args.builder()        
                .projectId("f7ac731cc11f40efbc03a9f9e1d1d21f")
                .build());
    
        }
    }
    
    resources:
      ec2Key1:
        type: openstack:identity:Ec2CredentialV3
        name: ec2_key1
        properties:
          projectId: f7ac731cc11f40efbc03a9f9e1d1d21f
    

    Create Ec2CredentialV3 Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Ec2CredentialV3(name: string, args?: Ec2CredentialV3Args, opts?: CustomResourceOptions);
    @overload
    def Ec2CredentialV3(resource_name: str,
                        args: Optional[Ec2CredentialV3Args] = None,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def Ec2CredentialV3(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        project_id: Optional[str] = None,
                        region: Optional[str] = None,
                        user_id: Optional[str] = None)
    func NewEc2CredentialV3(ctx *Context, name string, args *Ec2CredentialV3Args, opts ...ResourceOption) (*Ec2CredentialV3, error)
    public Ec2CredentialV3(string name, Ec2CredentialV3Args? args = null, CustomResourceOptions? opts = null)
    public Ec2CredentialV3(String name, Ec2CredentialV3Args args)
    public Ec2CredentialV3(String name, Ec2CredentialV3Args args, CustomResourceOptions options)
    
    type: openstack:identity:Ec2CredentialV3
    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 Ec2CredentialV3Args
    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 Ec2CredentialV3Args
    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 Ec2CredentialV3Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args Ec2CredentialV3Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args Ec2CredentialV3Args
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var ec2CredentialV3Resource = new OpenStack.Identity.Ec2CredentialV3("ec2CredentialV3Resource", new()
    {
        ProjectId = "string",
        Region = "string",
        UserId = "string",
    });
    
    example, err := identity.NewEc2CredentialV3(ctx, "ec2CredentialV3Resource", &identity.Ec2CredentialV3Args{
    	ProjectId: pulumi.String("string"),
    	Region:    pulumi.String("string"),
    	UserId:    pulumi.String("string"),
    })
    
    var ec2CredentialV3Resource = new Ec2CredentialV3("ec2CredentialV3Resource", Ec2CredentialV3Args.builder()
        .projectId("string")
        .region("string")
        .userId("string")
        .build());
    
    ec2_credential_v3_resource = openstack.identity.Ec2CredentialV3("ec2CredentialV3Resource",
        project_id="string",
        region="string",
        user_id="string")
    
    const ec2CredentialV3Resource = new openstack.identity.Ec2CredentialV3("ec2CredentialV3Resource", {
        projectId: "string",
        region: "string",
        userId: "string",
    });
    
    type: openstack:identity:Ec2CredentialV3
    properties:
        projectId: string
        region: string
        userId: string
    

    Ec2CredentialV3 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 Ec2CredentialV3 resource accepts the following input properties:

    ProjectId string
    The ID of the project the EC2 credential is created for and that authentication requests using this EC2 credential will be scoped to. Only administrative users can specify a project ID different from the current auth scope.
    Region string
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new EC2 credential.
    UserId string
    The ID of the user the EC2 credential is created for. Only administrative users can specify a user ID different from the current auth scope.
    ProjectId string
    The ID of the project the EC2 credential is created for and that authentication requests using this EC2 credential will be scoped to. Only administrative users can specify a project ID different from the current auth scope.
    Region string
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new EC2 credential.
    UserId string
    The ID of the user the EC2 credential is created for. Only administrative users can specify a user ID different from the current auth scope.
    projectId String
    The ID of the project the EC2 credential is created for and that authentication requests using this EC2 credential will be scoped to. Only administrative users can specify a project ID different from the current auth scope.
    region String
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new EC2 credential.
    userId String
    The ID of the user the EC2 credential is created for. Only administrative users can specify a user ID different from the current auth scope.
    projectId string
    The ID of the project the EC2 credential is created for and that authentication requests using this EC2 credential will be scoped to. Only administrative users can specify a project ID different from the current auth scope.
    region string
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new EC2 credential.
    userId string
    The ID of the user the EC2 credential is created for. Only administrative users can specify a user ID different from the current auth scope.
    project_id str
    The ID of the project the EC2 credential is created for and that authentication requests using this EC2 credential will be scoped to. Only administrative users can specify a project ID different from the current auth scope.
    region str
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new EC2 credential.
    user_id str
    The ID of the user the EC2 credential is created for. Only administrative users can specify a user ID different from the current auth scope.
    projectId String
    The ID of the project the EC2 credential is created for and that authentication requests using this EC2 credential will be scoped to. Only administrative users can specify a project ID different from the current auth scope.
    region String
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new EC2 credential.
    userId String
    The ID of the user the EC2 credential is created for. Only administrative users can specify a user ID different from the current auth scope.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Ec2CredentialV3 resource produces the following output properties:

    Access string
    contains an EC2 credential access UUID
    Id string
    The provider-assigned unique ID for this managed resource.
    Secret string
    contains an EC2 credential secret UUID
    TrustId string
    contains an EC2 credential trust ID scope
    Access string
    contains an EC2 credential access UUID
    Id string
    The provider-assigned unique ID for this managed resource.
    Secret string
    contains an EC2 credential secret UUID
    TrustId string
    contains an EC2 credential trust ID scope
    access String
    contains an EC2 credential access UUID
    id String
    The provider-assigned unique ID for this managed resource.
    secret String
    contains an EC2 credential secret UUID
    trustId String
    contains an EC2 credential trust ID scope
    access string
    contains an EC2 credential access UUID
    id string
    The provider-assigned unique ID for this managed resource.
    secret string
    contains an EC2 credential secret UUID
    trustId string
    contains an EC2 credential trust ID scope
    access str
    contains an EC2 credential access UUID
    id str
    The provider-assigned unique ID for this managed resource.
    secret str
    contains an EC2 credential secret UUID
    trust_id str
    contains an EC2 credential trust ID scope
    access String
    contains an EC2 credential access UUID
    id String
    The provider-assigned unique ID for this managed resource.
    secret String
    contains an EC2 credential secret UUID
    trustId String
    contains an EC2 credential trust ID scope

    Look up Existing Ec2CredentialV3 Resource

    Get an existing Ec2CredentialV3 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?: Ec2CredentialV3State, opts?: CustomResourceOptions): Ec2CredentialV3
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access: Optional[str] = None,
            project_id: Optional[str] = None,
            region: Optional[str] = None,
            secret: Optional[str] = None,
            trust_id: Optional[str] = None,
            user_id: Optional[str] = None) -> Ec2CredentialV3
    func GetEc2CredentialV3(ctx *Context, name string, id IDInput, state *Ec2CredentialV3State, opts ...ResourceOption) (*Ec2CredentialV3, error)
    public static Ec2CredentialV3 Get(string name, Input<string> id, Ec2CredentialV3State? state, CustomResourceOptions? opts = null)
    public static Ec2CredentialV3 get(String name, Output<String> id, Ec2CredentialV3State 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.
    The following state arguments are supported:
    Access string
    contains an EC2 credential access UUID
    ProjectId string
    The ID of the project the EC2 credential is created for and that authentication requests using this EC2 credential will be scoped to. Only administrative users can specify a project ID different from the current auth scope.
    Region string
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new EC2 credential.
    Secret string
    contains an EC2 credential secret UUID
    TrustId string
    contains an EC2 credential trust ID scope
    UserId string
    The ID of the user the EC2 credential is created for. Only administrative users can specify a user ID different from the current auth scope.
    Access string
    contains an EC2 credential access UUID
    ProjectId string
    The ID of the project the EC2 credential is created for and that authentication requests using this EC2 credential will be scoped to. Only administrative users can specify a project ID different from the current auth scope.
    Region string
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new EC2 credential.
    Secret string
    contains an EC2 credential secret UUID
    TrustId string
    contains an EC2 credential trust ID scope
    UserId string
    The ID of the user the EC2 credential is created for. Only administrative users can specify a user ID different from the current auth scope.
    access String
    contains an EC2 credential access UUID
    projectId String
    The ID of the project the EC2 credential is created for and that authentication requests using this EC2 credential will be scoped to. Only administrative users can specify a project ID different from the current auth scope.
    region String
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new EC2 credential.
    secret String
    contains an EC2 credential secret UUID
    trustId String
    contains an EC2 credential trust ID scope
    userId String
    The ID of the user the EC2 credential is created for. Only administrative users can specify a user ID different from the current auth scope.
    access string
    contains an EC2 credential access UUID
    projectId string
    The ID of the project the EC2 credential is created for and that authentication requests using this EC2 credential will be scoped to. Only administrative users can specify a project ID different from the current auth scope.
    region string
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new EC2 credential.
    secret string
    contains an EC2 credential secret UUID
    trustId string
    contains an EC2 credential trust ID scope
    userId string
    The ID of the user the EC2 credential is created for. Only administrative users can specify a user ID different from the current auth scope.
    access str
    contains an EC2 credential access UUID
    project_id str
    The ID of the project the EC2 credential is created for and that authentication requests using this EC2 credential will be scoped to. Only administrative users can specify a project ID different from the current auth scope.
    region str
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new EC2 credential.
    secret str
    contains an EC2 credential secret UUID
    trust_id str
    contains an EC2 credential trust ID scope
    user_id str
    The ID of the user the EC2 credential is created for. Only administrative users can specify a user ID different from the current auth scope.
    access String
    contains an EC2 credential access UUID
    projectId String
    The ID of the project the EC2 credential is created for and that authentication requests using this EC2 credential will be scoped to. Only administrative users can specify a project ID different from the current auth scope.
    region String
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new EC2 credential.
    secret String
    contains an EC2 credential secret UUID
    trustId String
    contains an EC2 credential trust ID scope
    userId String
    The ID of the user the EC2 credential is created for. Only administrative users can specify a user ID different from the current auth scope.

    Import

    EC2 Credentials can be imported using the access, e.g.

    $ pulumi import openstack:identity/ec2CredentialV3:Ec2CredentialV3 ec2_cred_1 2d0ac4a2f81b4b0f9513ee49e780647d
    

    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.
    openstack logo
    OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi