### Terraform Configuration and Provider Setup Source: https://github.com/issyl0/terraform-provider-improvmx/blob/main/docs/index.md This snippet demonstrates the basic Terraform configuration, including specifying the ImprovMX provider source and setting the API token. The token can be provided directly or via an environment variable. ```hcl terraform { required_providers { improvmx = { source = "issyl0/improvmx" } } } provider "improvmx" { token = "YOUR API TOKEN HERE" } ``` -------------------------------- ### ImprovMX SMTP Credential Resource Example Source: https://github.com/issyl0/terraform-provider-improvmx/blob/main/docs/resources/improvmx_smtp_credential.md Example usage of the `improvmx_smtp_credential` resource in Terraform HCL, demonstrating how to define a new SMTP credential for a domain. ```hcl resource "improvmx_smtp_credential" "example" { domain = "example.com" username = "example" password = var.password } ``` -------------------------------- ### Example Usage of improvmx_domain_check Source: https://github.com/issyl0/terraform-provider-improvmx/blob/main/docs/data-sources/improvmx_domain_check.md Demonstrates how to use the `improvmx_domain_check` data source to fetch domain check status for a specified domain. ```hcl data "improvmx_domain_check" "example_com" { domain = "example.com" } ``` -------------------------------- ### Create ImprovMX Domain Source: https://github.com/issyl0/terraform-provider-improvmx/blob/main/docs/resources/improvmx_domain.md Example of how to define and create an ImprovMX domain resource using Terraform HCL. This resource manages domain configurations within ImprovMX, including optional notification emails and whitelabel settings. ```hcl resource "improvmx_domain" "example" { domain = "example.com" } ``` -------------------------------- ### Build Development Binary Source: https://github.com/issyl0/terraform-provider-improvmx/blob/main/CONTRIBUTING.md These Go commands are used to build a local development binary for the terraform-provider-improvmx. 'go mod download' fetches dependencies, and 'go build .' compiles the provider. ```bash go mod download go build . ``` -------------------------------- ### ImprovMX Domain Resource Arguments Source: https://github.com/issyl0/terraform-provider-improvmx/blob/main/docs/resources/improvmx_domain.md Reference for the arguments accepted by the `improvmx_domain` Terraform resource. This includes required and optional parameters for configuring a domain. ```APIDOC improvmx_domain: domain: (Required) Name of the domain. notification_email: (Optional) Email to send notifications to. whitelabel: (Optional) Parent domain that will be displayed for the DNS settings. Only available on the Enterprise plan. ``` -------------------------------- ### ImprovMX Provider Argument Reference Source: https://github.com/issyl0/terraform-provider-improvmx/blob/main/docs/index.md Details the arguments accepted by the ImprovMX Terraform provider. The primary argument is the API token, which is essential for authentication. ```APIDOC provider "improvmx" token: string - ImprovMX API token. Alternatively, set the IMPROVMX_API_TOKEN environment variable. ``` -------------------------------- ### Import ImprovMX Domain Source: https://github.com/issyl0/terraform-provider-improvmx/blob/main/docs/resources/improvmx_domain.md Demonstrates how to import an existing ImprovMX domain into Terraform state management. This is useful for taking over management of pre-existing domains. ```shell terraform import improvmx_domain.example example.com ``` -------------------------------- ### ImprovMX Email Forward Resource - Argument Reference Source: https://github.com/issyl0/terraform-provider-improvmx/blob/main/docs/resources/improvmx_email_forward.md Details the required arguments for the `improvmx_email_forward` Terraform resource. ```APIDOC improvmx_email_forward: domain: Type: TypeString Description: Name of the domain. Required: "true" alias_name: Type: TypeString Description: Alias to be used in front of your domain, like "contact", "info", etc. Required: "true" destination_email: Type: TypeString Description: Email address to forward to. Required: "true" ``` -------------------------------- ### Configure Local Terraform for Development Source: https://github.com/issyl0/terraform-provider-improvmx/blob/main/CONTRIBUTING.md This HCL snippet configures Terraform to use a local development version of the 'issyl0/improvmx' provider. It specifies a path to the compiled binary, allowing developers to test changes without publishing them. ```hcl provider_installation { dev_overrides { "issyl0/improvmx" = "/full/path/to/terraform-provider-improvmx/directory" } direct {} } ``` -------------------------------- ### Terraform Configuration for ImprovMX Provider Source: https://github.com/issyl0/terraform-provider-improvmx/blob/main/README.md This snippet demonstrates how to configure the ImprovMX Terraform provider in your Terraform project. It specifies the provider source and how to set authentication credentials, typically via an environment variable. ```hcl terraform { required_providers { improvmx = { source = "issyl0/improvmx" } } } provider "improvmx" { // Set the `IMPROVMX_API_TOKEN` environment variable. } ``` -------------------------------- ### Creating an ImprovMX Domain Resource Source: https://github.com/issyl0/terraform-provider-improvmx/blob/main/README.md This Terraform resource block defines and creates a new domain within ImprovMX. It requires the domain name as a parameter. ```hcl resource "improvmx_domain" "example" { domain = "example.com" } ``` -------------------------------- ### Importing ImprovMX Email Forward Resource Source: https://github.com/issyl0/terraform-provider-improvmx/blob/main/docs/resources/improvmx_email_forward.md Demonstrates how to import an existing ImprovMX email forward into Terraform state using its name. ```shell terraform import improvmx_email_forward.example example.com_hello ``` -------------------------------- ### Creating an ImprovMX Email Forward Source: https://github.com/issyl0/terraform-provider-improvmx/blob/main/README.md This Terraform resource block creates an email forward for a specified domain. It includes the alias name and the destination email address. It also shows a dependency on the domain resource. ```hcl resource "improvmx_email_forward" "hello" { domain = "example.com" alias_name = "hello" destination_email = "me@realdomain.com" depends_on = [improvmx_domain.example] } ``` -------------------------------- ### improvmx_domain_check Data Source API Reference Source: https://github.com/issyl0/terraform-provider-improvmx/blob/main/docs/data-sources/improvmx_domain_check.md Provides detailed information about the arguments and attributes of the `improvmx_domain_check` data source. ```APIDOC improvmx_domain_check: description: A data source to read domain check status. arguments: domain: type: Required description: Name of the domain. data_type: string attributes: id: type: Computed description: Unique ID. data_type: int domain: type: Computed description: Name of the domain. data_type: string records_are_valid: type: Computed description: Whether all records are valid or not. data_type: bool record_mx_is_valid: type: Computed description: Whether mx record is valid or not. data_type: bool record_mx_expected_values: type: Computed description: Expected mx records. data_type: list record_mx_actual_values: type: Computed description: Actual mx records. data_type: list record_spf_is_valid: type: Computed description: Whether spf record is valid or not. data_type: bool record_spf_expected_value: type: Computed description: Expected spf record. data_type: list record_spf_actual_value: type: Computed description: Actual spf record. data_type: list ``` -------------------------------- ### ImprovMX SMTP Credential Resource Arguments Source: https://github.com/issyl0/terraform-provider-improvmx/blob/main/docs/resources/improvmx_smtp_credential.md Reference for the arguments accepted by the `improvmx_smtp_credential` Terraform resource. ```APIDOC improvmx_smtp_credential: domain: Type: TypeString Description: Name of the domain. Required: "true" username: Type: TypeString Description: Username of the SMTP sender. Required: "true" password: Type: TypeString Description: Password for the SMTP sending account. (Will always be hidden in `plan`.) Required: "true" ``` -------------------------------- ### Creating a Wildcard ImprovMX Email Forward Source: https://github.com/issyl0/terraform-provider-improvmx/blob/main/README.md This Terraform resource block creates a wildcard email forward for a domain, directing all emails not matching specific aliases to a designated destination. It requires the domain, a wildcard alias name, and the destination email. ```hcl resource "improvmx_email_forward" "wildcard" { domain = "example.com" alias_name = "*" destination_email = "joe@realdomain.com" depends_on = [improvmx_domain.example] } ``` -------------------------------- ### ImprovMX Email Forward Resource Configuration Source: https://github.com/issyl0/terraform-provider-improvmx/blob/main/docs/resources/improvmx_email_forward.md Defines the `improvmx_email_forward` resource in Terraform HCL, specifying the domain, alias name, and destination email for forwarding. ```hcl resource "improvmx_email_forward" "example" { domain = "example.com" alias_name = "reception" destination_email = "joe@realdomain.com" } resource "improvmx_email_forward" "sales" { domain = "example.com" alias_name = "sales" destination_email = "alice@realdomain.com,bob@realdomain.com" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.