CloudCredential
Provides a Rancher v2 Cloud Credential resource. This can be used to create Cloud Credential for Rancher v2.2.x and retrieve their information.
amazonec2, azure, digitalocean, linode, openstack and vsphere credentials config are supported for Cloud Credential.
Example Usage
using Pulumi;
using Rancher2 = Pulumi.Rancher2;
class MyStack : Stack
{
public MyStack()
{
// Create a new rancher2 Cloud Credential
var foo = new Rancher2.CloudCredential("foo", new Rancher2.CloudCredentialArgs
{
Amazonec2CredentialConfig = new Rancher2.Inputs.CloudCredentialAmazonec2CredentialConfigArgs
{
AccessKey = "<AWS_ACCESS_KEY>",
SecretKey = "<AWS_SECRET_KEY>",
},
Description = "foo test",
});
}
}
package main
import (
"github.com/pulumi/pulumi-rancher2/sdk/v2/go/rancher2"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := rancher2.NewCloudCredential(ctx, "foo", &rancher2.CloudCredentialArgs{
Amazonec2CredentialConfig: &rancher2.CloudCredentialAmazonec2CredentialConfigArgs{
AccessKey: pulumi.String("<AWS_ACCESS_KEY>"),
SecretKey: pulumi.String("<AWS_SECRET_KEY>"),
},
Description: pulumi.String("foo test"),
})
if err != nil {
return err
}
return nil
})
}
import pulumi
import pulumi_rancher2 as rancher2
# Create a new rancher2 Cloud Credential
foo = rancher2.CloudCredential("foo",
amazonec2_credential_config=rancher2.CloudCredentialAmazonec2CredentialConfigArgs(
access_key="<AWS_ACCESS_KEY>",
secret_key="<AWS_SECRET_KEY>",
),
description="foo test")
import * as pulumi from "@pulumi/pulumi";
import * as rancher2 from "@pulumi/rancher2";
// Create a new rancher2 Cloud Credential
const foo = new rancher2.CloudCredential("foo", {
amazonec2CredentialConfig: {
accessKey: "<AWS_ACCESS_KEY>",
secretKey: "<AWS_SECRET_KEY>",
},
description: "foo test",
});
Create a CloudCredential Resource
new CloudCredential(name: string, args?: CloudCredentialArgs, opts?: CustomResourceOptions);
def CloudCredential(resource_name: str, opts: Optional[ResourceOptions] = None, amazonec2_credential_config: Optional[CloudCredentialAmazonec2CredentialConfigArgs] = None, annotations: Optional[Mapping[str, Any]] = None, azure_credential_config: Optional[CloudCredentialAzureCredentialConfigArgs] = None, description: Optional[str] = None, digitalocean_credential_config: Optional[CloudCredentialDigitaloceanCredentialConfigArgs] = None, labels: Optional[Mapping[str, Any]] = None, linode_credential_config: Optional[CloudCredentialLinodeCredentialConfigArgs] = None, name: Optional[str] = None, openstack_credential_config: Optional[CloudCredentialOpenstackCredentialConfigArgs] = None, vsphere_credential_config: Optional[CloudCredentialVsphereCredentialConfigArgs] = None)
func NewCloudCredential(ctx *Context, name string, args *CloudCredentialArgs, opts ...ResourceOption) (*CloudCredential, error)
public CloudCredential(string name, CloudCredentialArgs? args = null, CustomResourceOptions? opts = null)
- name string
- The unique name of the resource.
- args CloudCredentialArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CloudCredentialArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CloudCredentialArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
CloudCredential Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The CloudCredential resource accepts the following input properties:
- Amazonec2Credential
Config CloudCredential Amazonec2Credential Config Args AWS config for the Cloud Credential (list maxitems:1)
- Annotations Dictionary<string, object>
Annotations for Cloud Credential object (map)
- Azure
Credential CloudConfig Credential Azure Credential Config Args Azure config for the Cloud Credential (list maxitems:1)
- Description string
Description for the Cloud Credential (string)
- Digitalocean
Credential CloudConfig Credential Digitalocean Credential Config Args DigitalOcean config for the Cloud Credential (list maxitems:1)
- Labels Dictionary<string, object>
Labels for Cloud Credential object (map)
- Linode
Credential CloudConfig Credential Linode Credential Config Args Linode config for the Cloud Credential (list maxitems:1)
- Name string
The name of the Cloud Credential (string)
- Openstack
Credential CloudConfig Credential Openstack Credential Config Args OpenStack config for the Cloud Credential (list maxitems:1)
- Vsphere
Credential CloudConfig Credential Vsphere Credential Config Args vSphere config for the Cloud Credential (list maxitems:1)
- Amazonec2Credential
Config CloudCredential Amazonec2Credential Config AWS config for the Cloud Credential (list maxitems:1)
- Annotations map[string]interface{}
Annotations for Cloud Credential object (map)
- Azure
Credential CloudConfig Credential Azure Credential Config Azure config for the Cloud Credential (list maxitems:1)
- Description string
Description for the Cloud Credential (string)
- Digitalocean
Credential CloudConfig Credential Digitalocean Credential Config DigitalOcean config for the Cloud Credential (list maxitems:1)
- Labels map[string]interface{}
Labels for Cloud Credential object (map)
- Linode
Credential CloudConfig Credential Linode Credential Config Linode config for the Cloud Credential (list maxitems:1)
- Name string
The name of the Cloud Credential (string)
- Openstack
Credential CloudConfig Credential Openstack Credential Config OpenStack config for the Cloud Credential (list maxitems:1)
- Vsphere
Credential CloudConfig Credential Vsphere Credential Config vSphere config for the Cloud Credential (list maxitems:1)
- amazonec2Credential
Config CloudCredential Amazonec2Credential Config AWS config for the Cloud Credential (list maxitems:1)
- annotations {[key: string]: any}
Annotations for Cloud Credential object (map)
- azure
Credential CloudConfig Credential Azure Credential Config Azure config for the Cloud Credential (list maxitems:1)
- description string
Description for the Cloud Credential (string)
- digitalocean
Credential CloudConfig Credential Digitalocean Credential Config DigitalOcean config for the Cloud Credential (list maxitems:1)
- labels {[key: string]: any}
Labels for Cloud Credential object (map)
- linode
Credential CloudConfig Credential Linode Credential Config Linode config for the Cloud Credential (list maxitems:1)
- name string
The name of the Cloud Credential (string)
- openstack
Credential CloudConfig Credential Openstack Credential Config OpenStack config for the Cloud Credential (list maxitems:1)
- vsphere
Credential CloudConfig Credential Vsphere Credential Config vSphere config for the Cloud Credential (list maxitems:1)
- amazonec2_
credential_ Cloudconfig Credential Amazonec2Credential Config Args AWS config for the Cloud Credential (list maxitems:1)
- annotations Mapping[str, Any]
Annotations for Cloud Credential object (map)
- azure_
credential_ Cloudconfig Credential Azure Credential Config Args Azure config for the Cloud Credential (list maxitems:1)
- description str
Description for the Cloud Credential (string)
- digitalocean_
credential_ Cloudconfig Credential Digitalocean Credential Config Args DigitalOcean config for the Cloud Credential (list maxitems:1)
- labels Mapping[str, Any]
Labels for Cloud Credential object (map)
- linode_
credential_ Cloudconfig Credential Linode Credential Config Args Linode config for the Cloud Credential (list maxitems:1)
- name str
The name of the Cloud Credential (string)
- openstack_
credential_ Cloudconfig Credential Openstack Credential Config Args OpenStack config for the Cloud Credential (list maxitems:1)
- vsphere_
credential_ Cloudconfig Credential Vsphere Credential Config Args vSphere config for the Cloud Credential (list maxitems:1)
Outputs
All input properties are implicitly available as output properties. Additionally, the CloudCredential resource produces the following output properties:
Look up an Existing CloudCredential Resource
Get an existing CloudCredential 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?: CloudCredentialState, opts?: CustomResourceOptions): CloudCredential
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, amazonec2_credential_config: Optional[CloudCredentialAmazonec2CredentialConfigArgs] = None, annotations: Optional[Mapping[str, Any]] = None, azure_credential_config: Optional[CloudCredentialAzureCredentialConfigArgs] = None, description: Optional[str] = None, digitalocean_credential_config: Optional[CloudCredentialDigitaloceanCredentialConfigArgs] = None, driver: Optional[str] = None, labels: Optional[Mapping[str, Any]] = None, linode_credential_config: Optional[CloudCredentialLinodeCredentialConfigArgs] = None, name: Optional[str] = None, openstack_credential_config: Optional[CloudCredentialOpenstackCredentialConfigArgs] = None, vsphere_credential_config: Optional[CloudCredentialVsphereCredentialConfigArgs] = None) -> CloudCredential
func GetCloudCredential(ctx *Context, name string, id IDInput, state *CloudCredentialState, opts ...ResourceOption) (*CloudCredential, error)
public static CloudCredential Get(string name, Input<string> id, CloudCredentialState? state, CustomResourceOptions? opts = null)
- 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.
The following state arguments are supported:
- Amazonec2Credential
Config CloudCredential Amazonec2Credential Config Args AWS config for the Cloud Credential (list maxitems:1)
- Annotations Dictionary<string, object>
Annotations for Cloud Credential object (map)
- Azure
Credential CloudConfig Credential Azure Credential Config Args Azure config for the Cloud Credential (list maxitems:1)
- Description string
Description for the Cloud Credential (string)
- Digitalocean
Credential CloudConfig Credential Digitalocean Credential Config Args DigitalOcean config for the Cloud Credential (list maxitems:1)
- Driver string
(Computed) The driver of the Cloud Credential (string)
- Labels Dictionary<string, object>
Labels for Cloud Credential object (map)
- Linode
Credential CloudConfig Credential Linode Credential Config Args Linode config for the Cloud Credential (list maxitems:1)
- Name string
The name of the Cloud Credential (string)
- Openstack
Credential CloudConfig Credential Openstack Credential Config Args OpenStack config for the Cloud Credential (list maxitems:1)
- Vsphere
Credential CloudConfig Credential Vsphere Credential Config Args vSphere config for the Cloud Credential (list maxitems:1)
- Amazonec2Credential
Config CloudCredential Amazonec2Credential Config AWS config for the Cloud Credential (list maxitems:1)
- Annotations map[string]interface{}
Annotations for Cloud Credential object (map)
- Azure
Credential CloudConfig Credential Azure Credential Config Azure config for the Cloud Credential (list maxitems:1)
- Description string
Description for the Cloud Credential (string)
- Digitalocean
Credential CloudConfig Credential Digitalocean Credential Config DigitalOcean config for the Cloud Credential (list maxitems:1)
- Driver string
(Computed) The driver of the Cloud Credential (string)
- Labels map[string]interface{}
Labels for Cloud Credential object (map)
- Linode
Credential CloudConfig Credential Linode Credential Config Linode config for the Cloud Credential (list maxitems:1)
- Name string
The name of the Cloud Credential (string)
- Openstack
Credential CloudConfig Credential Openstack Credential Config OpenStack config for the Cloud Credential (list maxitems:1)
- Vsphere
Credential CloudConfig Credential Vsphere Credential Config vSphere config for the Cloud Credential (list maxitems:1)
- amazonec2Credential
Config CloudCredential Amazonec2Credential Config AWS config for the Cloud Credential (list maxitems:1)
- annotations {[key: string]: any}
Annotations for Cloud Credential object (map)
- azure
Credential CloudConfig Credential Azure Credential Config Azure config for the Cloud Credential (list maxitems:1)
- description string
Description for the Cloud Credential (string)
- digitalocean
Credential CloudConfig Credential Digitalocean Credential Config DigitalOcean config for the Cloud Credential (list maxitems:1)
- driver string
(Computed) The driver of the Cloud Credential (string)
- labels {[key: string]: any}
Labels for Cloud Credential object (map)
- linode
Credential CloudConfig Credential Linode Credential Config Linode config for the Cloud Credential (list maxitems:1)
- name string
The name of the Cloud Credential (string)
- openstack
Credential CloudConfig Credential Openstack Credential Config OpenStack config for the Cloud Credential (list maxitems:1)
- vsphere
Credential CloudConfig Credential Vsphere Credential Config vSphere config for the Cloud Credential (list maxitems:1)
- amazonec2_
credential_ Cloudconfig Credential Amazonec2Credential Config Args AWS config for the Cloud Credential (list maxitems:1)
- annotations Mapping[str, Any]
Annotations for Cloud Credential object (map)
- azure_
credential_ Cloudconfig Credential Azure Credential Config Args Azure config for the Cloud Credential (list maxitems:1)
- description str
Description for the Cloud Credential (string)
- digitalocean_
credential_ Cloudconfig Credential Digitalocean Credential Config Args DigitalOcean config for the Cloud Credential (list maxitems:1)
- driver str
(Computed) The driver of the Cloud Credential (string)
- labels Mapping[str, Any]
Labels for Cloud Credential object (map)
- linode_
credential_ Cloudconfig Credential Linode Credential Config Args Linode config for the Cloud Credential (list maxitems:1)
- name str
The name of the Cloud Credential (string)
- openstack_
credential_ Cloudconfig Credential Openstack Credential Config Args OpenStack config for the Cloud Credential (list maxitems:1)
- vsphere_
credential_ Cloudconfig Credential Vsphere Credential Config Args vSphere config for the Cloud Credential (list maxitems:1)
Supporting Types
CloudCredentialAmazonec2CredentialConfig
- access_
key str AWS access key (string)
- secret_
key str AWS secret key (string)
CloudCredentialAzureCredentialConfig
- Client
Id string Azure Service Principal Account ID (string)
- Client
Secret string Azure Service Principal Account password (string)
- Subscription
Id string Azure Subscription ID (string)
- Client
Id string Azure Service Principal Account ID (string)
- Client
Secret string Azure Service Principal Account password (string)
- Subscription
Id string Azure Subscription ID (string)
- client
Id string Azure Service Principal Account ID (string)
- client
Secret string Azure Service Principal Account password (string)
- subscription
Id string Azure Subscription ID (string)
- client_
id str Azure Service Principal Account ID (string)
- client_
secret str Azure Service Principal Account password (string)
- subscription_
id str Azure Subscription ID (string)
CloudCredentialDigitaloceanCredentialConfig
- Access
Token string DigitalOcean access token (string)
- Access
Token string DigitalOcean access token (string)
- access
Token string DigitalOcean access token (string)
- access_
token str DigitalOcean access token (string)
CloudCredentialLinodeCredentialConfig
- Token string
Linode API token (string)
- Token string
Linode API token (string)
- token string
Linode API token (string)
- token str
Linode API token (string)
CloudCredentialOpenstackCredentialConfig
- Password string
vSphere password (string)
- Password string
vSphere password (string)
- password string
vSphere password (string)
- password str
vSphere password (string)
CloudCredentialVsphereCredentialConfig
- Password string
vSphere password (string)
- Username string
vSphere username (string)
- Vcenter string
vSphere IP/hostname for vCenter (string)
- Vcenter
Port string vSphere Port for vCenter. Default
443
(string)
- Password string
vSphere password (string)
- Username string
vSphere username (string)
- Vcenter string
vSphere IP/hostname for vCenter (string)
- Vcenter
Port string vSphere Port for vCenter. Default
443
(string)
- password string
vSphere password (string)
- username string
vSphere username (string)
- vcenter string
vSphere IP/hostname for vCenter (string)
- vcenter
Port string vSphere Port for vCenter. Default
443
(string)
- password str
vSphere password (string)
- username str
vSphere username (string)
- vcenter str
vSphere IP/hostname for vCenter (string)
- vcenter_
port str vSphere Port for vCenter. Default
443
(string)
Package Details
- Repository
- https://github.com/pulumi/pulumi-rancher2
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
rancher2
Terraform Provider.