DomainCredential

Provides a Mailgun domain credential resource. This can be used to create and manage credential in domain of Mailgun.

Note: Please note that starting of v0.6.1 due to using new Mailgun Client API (v4), there is no possibility to retrieve previously created secrets via API. In order get it worked, it’s recommended to mark password as ignored under lifecycle block. See below.

Example Usage

Coming soon!

Coming soon!

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as mailgun from "@pulumi/mailgun";

// Create a new Mailgun credential
const foobar = new mailgun.DomainCredential("foobar", {
    domain: "toto.com",
    email: "test@toto.com",
    password: "supersecretpassword1234",
    region: "us",
}, { ignoreChanges: ["password"] });

Create a DomainCredential Resource

new DomainCredential(name: string, args: DomainCredentialArgs, opts?: CustomResourceOptions);
@overload
def DomainCredential(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     domain: Optional[str] = None,
                     login: Optional[str] = None,
                     password: Optional[str] = None,
                     region: Optional[str] = None)
@overload
def DomainCredential(resource_name: str,
                     args: DomainCredentialArgs,
                     opts: Optional[ResourceOptions] = None)
func NewDomainCredential(ctx *Context, name string, args DomainCredentialArgs, opts ...ResourceOption) (*DomainCredential, error)
public DomainCredential(string name, DomainCredentialArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args DomainCredentialArgs
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 DomainCredentialArgs
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 DomainCredentialArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DomainCredentialArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

DomainCredential Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The DomainCredential resource accepts the following input properties:

Domain string
The domain to add credential of Mailgun.
Login string
Password string
Password for user authentication.
Region string
The region where domain will be created. Default value is us.
Domain string
The domain to add credential of Mailgun.
Login string
Password string
Password for user authentication.
Region string
The region where domain will be created. Default value is us.
domain string
The domain to add credential of Mailgun.
login string
password string
Password for user authentication.
region string
The region where domain will be created. Default value is us.
domain str
The domain to add credential of Mailgun.
login str
password str
Password for user authentication.
region str
The region where domain will be created. Default value is us.

Outputs

All input properties are implicitly available as output properties. Additionally, the DomainCredential 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing DomainCredential Resource

Get an existing DomainCredential 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?: DomainCredentialState, opts?: CustomResourceOptions): DomainCredential
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        domain: Optional[str] = None,
        login: Optional[str] = None,
        password: Optional[str] = None,
        region: Optional[str] = None) -> DomainCredential
func GetDomainCredential(ctx *Context, name string, id IDInput, state *DomainCredentialState, opts ...ResourceOption) (*DomainCredential, error)
public static DomainCredential Get(string name, Input<string> id, DomainCredentialState? 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:

Domain string
The domain to add credential of Mailgun.
Login string
Password string
Password for user authentication.
Region string
The region where domain will be created. Default value is us.
Domain string
The domain to add credential of Mailgun.
Login string
Password string
Password for user authentication.
Region string
The region where domain will be created. Default value is us.
domain string
The domain to add credential of Mailgun.
login string
password string
Password for user authentication.
region string
The region where domain will be created. Default value is us.
domain str
The domain to add credential of Mailgun.
login str
password str
Password for user authentication.
region str
The region where domain will be created. Default value is us.

Import

Domain credential can be imported using region:email via import command. Region has to be chosen from eu or us (when no selection us is applied).

Password is always exported to null. hcl

 $ pulumi import mailgun:index/domainCredential:DomainCredential test us:test@domain.com

Package Details

Repository
https://github.com/pulumi/pulumi-mailgun
License
Apache-2.0
Notes
This Pulumi package is based on the mailgun Terraform Provider.