scalr_module_test_provider_configuration

Resource: scalr_module_test_provider_configuration

Attaches a provider configuration (credentials) to a module test configuration, so it can be used while running the module's tests.

-> Note The provider configuration must have is_allowed_in_module_test = true (see scalr_provider_configuration). Only one provider configuration per provider type can be linked to a given test configuration.

Example Usage

resource "scalr_provider_configuration" "aws_module_test" {
  name                      = "aws-module-test"
  is_allowed_in_module_test = true

  aws {
    account_type     = "regular"
    credentials_type = "access_keys"
    access_key       = "AKIAXXXXXXXXXXXXXXXX"
    secret_key       = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  }
}

resource "scalr_module_test_configuration" "example" {
  module_id = scalr_module.example.id
  enabled   = true
}

resource "scalr_module_test_provider_configuration" "example" {
  test_configuration_id     = scalr_module_test_configuration.example.id
  provider_configuration_id = scalr_provider_configuration.aws_module_test.id
}

Schema

Required

  • provider_configuration_id (String) ID of the provider configuration to use as credentials for the module tests, in the format pcfg-<RANDOM STRING>.
  • test_configuration_id (String) ID of the module test configuration, in the format tc-<RANDOM STRING>.

Read-Only

  • id (String) The ID of this resource.

Import

Import is supported using the following syntax:

terraform import scalr_module_test_provider_configuration.example tpcfgl-xxxxxxxxxx

Did this page help you?