terraform-aws-modules / .github

Meta-GitHub repository for all terraform-aws-modules repositories 🇺🇦
22 stars 30 forks source link

When using hosted configuration, the configuration will never be deployed. #31

Open amitla opened 11 months ago

amitla commented 11 months ago

Description

consider this snippet:

module "appconfig" {
  source  = "terraform-aws-modules/appconfig/aws"
  version = "~> 1.0"

  name                                = "some-name"
  description                       = "AppConfig hosted configuration for some-name"
  config_profile_name               = title(var.environment)
  create_deployment_strategy        = false
  deployment_strategy_id            = "AppConfig.AllAtOnce"

  environments = {
    "${var.environment}" = {
      name        = "${title(var.environment)}"
      description = "${title(var.environment)} environment"
    }
  }

  use_hosted_configuration           = true
  hosted_config_version_content_type = "application/json"
  hosted_config_version_content      = file("${path.module}/configs/${var.environment}/config.json")

  tags = var.tags
}

Versions

Steps to reproduce the behavior: run init and plan, examine the output

Expected behavior

Expecting the deployment step to take place.

Actual behavior

Deployment is not in the plan

Terminal Output Screenshot(s)

Additional context

This issue was introduced in the 1.1.4 version via this PR: https://github.com/terraform-aws-modules/terraform-aws-appconfig/pull/7 The fix should take into account the use_hosted_configuration flag and allow the code in the aws_appconfig_deployment resource to run even if deployment_configuration_version is not set.