mailgun.DomainCredential

Explore with Pulumi AI

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!

package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mailgun.DomainCredential;
import com.pulumi.mailgun.DomainCredentialArgs;
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 foobar = new DomainCredential("foobar", DomainCredentialArgs.builder()        
            .domain("toto.com")
            .lifecycle(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
            .login("test")
            .password("supersecretpassword1234")
            .region("us")
            .build());

    }
}

Coming soon!

Coming soon!

resources:
  # Create a new Mailgun credential
  foobar:
    type: mailgun:DomainCredential
    properties:
      domain: toto.com
      lifecycle:
        ignoreChanges:
          - password
      login: test
      password: supersecretpassword1234
      region: us

Create 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)
public DomainCredential(String name, DomainCredentialArgs args)
public DomainCredential(String name, DomainCredentialArgs args, CustomResourceOptions options)
type: mailgun:DomainCredential
properties: # The arguments to resource properties.
options: # 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.
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.
name String
The unique name of the resource.
args DomainCredentialArgs
The arguments to resource properties.
options 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 Architecture and Concepts docs.

Inputs

The DomainCredential resource accepts the following input properties:

Domain string

The domain to add credential of Mailgun.

Login string

The local-part of the email address to create.

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

The local-part of the email address to create.

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

The local-part of the email address to create.

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

The local-part of the email address to create.

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

The local-part of the email address to create.

password str

Password for user authentication.

region str

The region where domain will be created. Default value is us.

domain String

The domain to add credential of Mailgun.

login String

The local-part of the email address to create.

password String

Password for user authentication.

region String

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 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 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)
public static DomainCredential get(String name, Output<String> id, DomainCredentialState 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:
Domain string

The domain to add credential of Mailgun.

Login string

The local-part of the email address to create.

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

The local-part of the email address to create.

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

The local-part of the email address to create.

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

The local-part of the email address to create.

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

The local-part of the email address to create.

password str

Password for user authentication.

region str

The region where domain will be created. Default value is us.

domain String

The domain to add credential of Mailgun.

login String

The local-part of the email address to create.

password String

Password for user authentication.

region String

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
Mailgun pulumi/pulumi-mailgun
License
Apache-2.0
Notes

This Pulumi package is based on the mailgun Terraform Provider.