gcore.RegistryCredential
Explore with Pulumi AI
Represent inference registry credential
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcore from "@pulumi/gcore";
const project = gcore.getProject({
name: "Default",
});
const creds = new gcore.RegistryCredential("creds", {
password: "passwd",
registryUrl: "docker.io",
username: "username",
});
import pulumi
import pulumi_gcore as gcore
project = gcore.get_project(name="Default")
creds = gcore.RegistryCredential("creds",
password="passwd",
registry_url="docker.io",
username="username")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gcore.GetProject(ctx, &gcore.GetProjectArgs{
Name: "Default",
}, nil)
if err != nil {
return err
}
_, err = gcore.NewRegistryCredential(ctx, "creds", &gcore.RegistryCredentialArgs{
Password: pulumi.String("passwd"),
RegistryUrl: pulumi.String("docker.io"),
Username: pulumi.String("username"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcore = Pulumi.Gcore;
return await Deployment.RunAsync(() =>
{
var project = Gcore.GetProject.Invoke(new()
{
Name = "Default",
});
var creds = new Gcore.RegistryCredential("creds", new()
{
Password = "passwd",
RegistryUrl = "docker.io",
Username = "username",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.GcoreFunctions;
import com.pulumi.gcore.inputs.GetProjectArgs;
import com.pulumi.gcore.RegistryCredential;
import com.pulumi.gcore.RegistryCredentialArgs;
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) {
final var project = GcoreFunctions.getProject(GetProjectArgs.builder()
.name("Default")
.build());
var creds = new RegistryCredential("creds", RegistryCredentialArgs.builder()
.password("passwd")
.registryUrl("docker.io")
.username("username")
.build());
}
}
resources:
creds:
type: gcore:RegistryCredential
properties:
password: passwd
registryUrl: docker.io
username: username
variables:
project:
fn::invoke:
function: gcore:getProject
arguments:
name: Default
Create RegistryCredential Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RegistryCredential(name: string, args: RegistryCredentialArgs, opts?: CustomResourceOptions);
@overload
def RegistryCredential(resource_name: str,
args: RegistryCredentialArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RegistryCredential(resource_name: str,
opts: Optional[ResourceOptions] = None,
password: Optional[str] = None,
registry_url: Optional[str] = None,
username: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[float] = None,
project_name: Optional[str] = None,
registry_credential_id: Optional[str] = None)
func NewRegistryCredential(ctx *Context, name string, args RegistryCredentialArgs, opts ...ResourceOption) (*RegistryCredential, error)
public RegistryCredential(string name, RegistryCredentialArgs args, CustomResourceOptions? opts = null)
public RegistryCredential(String name, RegistryCredentialArgs args)
public RegistryCredential(String name, RegistryCredentialArgs args, CustomResourceOptions options)
type: gcore:RegistryCredential
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 RegistryCredentialArgs
- 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 RegistryCredentialArgs
- 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 RegistryCredentialArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RegistryCredentialArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RegistryCredentialArgs
- 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 registryCredentialResource = new Gcore.RegistryCredential("registryCredentialResource", new()
{
Password = "string",
RegistryUrl = "string",
Username = "string",
Name = "string",
ProjectId = 0,
ProjectName = "string",
RegistryCredentialId = "string",
});
example, err := gcore.NewRegistryCredential(ctx, "registryCredentialResource", &gcore.RegistryCredentialArgs{
Password: pulumi.String("string"),
RegistryUrl: pulumi.String("string"),
Username: pulumi.String("string"),
Name: pulumi.String("string"),
ProjectId: pulumi.Float64(0),
ProjectName: pulumi.String("string"),
RegistryCredentialId: pulumi.String("string"),
})
var registryCredentialResource = new RegistryCredential("registryCredentialResource", RegistryCredentialArgs.builder()
.password("string")
.registryUrl("string")
.username("string")
.name("string")
.projectId(0)
.projectName("string")
.registryCredentialId("string")
.build());
registry_credential_resource = gcore.RegistryCredential("registryCredentialResource",
password="string",
registry_url="string",
username="string",
name="string",
project_id=0,
project_name="string",
registry_credential_id="string")
const registryCredentialResource = new gcore.RegistryCredential("registryCredentialResource", {
password: "string",
registryUrl: "string",
username: "string",
name: "string",
projectId: 0,
projectName: "string",
registryCredentialId: "string",
});
type: gcore:RegistryCredential
properties:
name: string
password: string
projectId: 0
projectName: string
registryCredentialId: string
registryUrl: string
username: string
RegistryCredential 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 RegistryCredential resource accepts the following input properties:
- Password string
- Registry
Url string - Username string
- Name string
- Project
Id double - Project
Name string - Registry
Credential stringId - The ID of this resource.
- Password string
- Registry
Url string - Username string
- Name string
- Project
Id float64 - Project
Name string - Registry
Credential stringId - The ID of this resource.
- password String
- registry
Url String - username String
- name String
- project
Id Double - project
Name String - registry
Credential StringId - The ID of this resource.
- password string
- registry
Url string - username string
- name string
- project
Id number - project
Name string - registry
Credential stringId - The ID of this resource.
- password str
- registry_
url str - username str
- name str
- project_
id float - project_
name str - registry_
credential_ strid - The ID of this resource.
- password String
- registry
Url String - username String
- name String
- project
Id Number - project
Name String - registry
Credential StringId - The ID of this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the RegistryCredential 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 RegistryCredential Resource
Get an existing RegistryCredential 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?: RegistryCredentialState, opts?: CustomResourceOptions): RegistryCredential
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
password: Optional[str] = None,
project_id: Optional[float] = None,
project_name: Optional[str] = None,
registry_credential_id: Optional[str] = None,
registry_url: Optional[str] = None,
username: Optional[str] = None) -> RegistryCredential
func GetRegistryCredential(ctx *Context, name string, id IDInput, state *RegistryCredentialState, opts ...ResourceOption) (*RegistryCredential, error)
public static RegistryCredential Get(string name, Input<string> id, RegistryCredentialState? state, CustomResourceOptions? opts = null)
public static RegistryCredential get(String name, Output<String> id, RegistryCredentialState state, CustomResourceOptions options)
resources: _: type: gcore:RegistryCredential 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.
- Name string
- Password string
- Project
Id double - Project
Name string - Registry
Credential stringId - The ID of this resource.
- Registry
Url string - Username string
- Name string
- Password string
- Project
Id float64 - Project
Name string - Registry
Credential stringId - The ID of this resource.
- Registry
Url string - Username string
- name String
- password String
- project
Id Double - project
Name String - registry
Credential StringId - The ID of this resource.
- registry
Url String - username String
- name string
- password string
- project
Id number - project
Name string - registry
Credential stringId - The ID of this resource.
- registry
Url string - username string
- name str
- password str
- project_
id float - project_
name str - registry_
credential_ strid - The ID of this resource.
- registry_
url str - username str
- name String
- password String
- project
Id Number - project
Name String - registry
Credential StringId - The ID of this resource.
- registry
Url String - username String
Import
import using <project_id>:<credentials_name> format
$ pulumi import gcore:index/registryCredential:RegistryCredential dockerio 1:docekrio
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- gcore g-core/terraform-provider-gcore
- License
- Notes
- This Pulumi package is based on the
gcore
Terraform Provider.