Giter VIP home page Giter VIP logo

terraform-aws-appconfig's Introduction

AWS AppConfig Terraform module

Terraform module which creates AWS AppConfig resources.

Usage

See examples directory for working examples to reference:

module "appconfig" {
  source  = "terraform-aws-modules/appconfig/aws"

  name        = "example"
  description = "AppConfig hosted configuration"

  # environments
  environments = {
    nonprod = {
      name        = "nonprod"
      description = "Non-production environment"
    },
    prod = {
      name        = "prod"
      description = "Production environment"
    }
  }

  # hosted config version
  use_hosted_configuration           = true
  hosted_config_version_content_type = "application/json"
  hosted_config_version_content = jsonencode({
    isEnabled     = false,
    messageOption = "ItWorks!"
  })

  # configuration profile
  config_profile_validator = [{
    type = "JSON_SCHEMA"
    content = jsonencode({
      "$schema" = "http://json-schema.org/draft-04/schema#",
      type      = "object",
      properties = {
        isEnabled = {
          type = "boolean"
        },
        messageOption = {
          type    = "string",
          minimum = 0
        }
      },
      additionalProperties = false,
      required             = ["isEnabled", "messageOption"]
    }) }, {
    type    = "LAMBDA"
    content = "arn:aws:lambda:us-east-1:123456789101:function:example-appconfig-hosted"
  }]

  tags = {
    Terraform   = "true"
    Environment = "dev"
  }
}

Examples

Examples codified under the examples are intended give users references for how to use the module(s) as well as testing/validating changes to the source code of the module(s). If contributing to the project, please be sure to make any appropriate updates to the relevant examples to allow maintainers to test your changes and to keep the examples up to date for users. Thank you!

Requirements

Name Version
terraform >= 1.0
aws >= 5.0

Providers

Name Version
aws >= 5.0

Modules

No modules.

Resources

Name Type
aws_appconfig_application.this resource
aws_appconfig_configuration_profile.this resource
aws_appconfig_deployment.this resource
aws_appconfig_deployment_strategy.this resource
aws_appconfig_environment.this resource
aws_appconfig_hosted_configuration_version.this resource
aws_iam_policy.retrieval resource
aws_iam_role.retrieval resource
aws_iam_role_policy_attachment.retrieval resource
aws_iam_policy_document.retreival data source
aws_iam_policy_document.retrieval_s3 data source
aws_iam_policy_document.retrieval_ssm_document data source
aws_iam_policy_document.retrieval_ssm_parameter data source

Inputs

Name Description Type Default Required
config_profile_description The description of the configuration profile. Can be at most 1024 characters string null no
config_profile_location_uri A URI to locate the configuration. You can specify the AWS AppConfig hosted configuration store, Systems Manager (SSM) document, an SSM Parameter Store parameter, or an Amazon S3 object string "hosted" no
config_profile_name The name for the configuration profile. Must be between 1 and 64 characters in length string null no
config_profile_retrieval_role_arn The ARN of an IAM role with permission to access the configuration at the specified location_uri. A retrieval role ARN is not required for configurations stored in the AWS AppConfig hosted configuration store. It is required for all other sources that store your configuration string null no
config_profile_tags A map of additional tags to apply to the configuration profile map(string) {} no
config_profile_type Type of configurations contained in the profile. Valid values: AWS.AppConfig.FeatureFlags and AWS.Freeform string null no
config_profile_validator A set of methods for validating the configuration. Maximum of 2 list(map(any)) [] no
create Determines whether resources are created bool true no
create_deployment_strategy Determines whether a deployment strategy is created bool true no
create_retrieval_role Determines whether configuration retrieval IAM role is created bool true no
deployment_configuration_version The configuration version to deploy. Can be at most 1024 characters string null no
deployment_description A description of the deployment. Can be at most 1024 characters string null no
deployment_strategy_deployment_duration_in_minutes Total amount of time for a deployment to last. Minimum value of 0, maximum value of 1440 number 0 no
deployment_strategy_description A description of the deployment strategy. Can be at most 1024 characters string null no
deployment_strategy_final_bake_time_in_minutes Total amount of time for a deployment to last. Minimum value of 0, maximum value of 1440 number 0 no
deployment_strategy_growth_factor The percentage of targets to receive a deployed configuration during each interval. Minimum value of 1, maximum value of 100 number 100 no
deployment_strategy_growth_type The algorithm used to define how percentage grows over time. Valid value: LINEAR and EXPONENTIAL. Defaults to LINEAR string null no
deployment_strategy_id An existing AppConfig deployment strategy ID string null no
deployment_strategy_name A name for the deployment strategy. Must be between 1 and 64 characters in length string null no
deployment_strategy_replicate_to Where to save the deployment strategy. Valid values: NONE and SSM_DOCUMENT string "NONE" no
deployment_strategy_tags A map of additional tags to apply to the deployment strategy map(string) {} no
deployment_tags A map of additional tags to apply to the deployment map(string) {} no
description The description of the application. Can be at most 1024 characters string null no
environments Map of attributes for AppConfig environment resource(s) map(any) {} no
hosted_config_version_content The content of the configuration or the configuration data string null no
hosted_config_version_content_type A standard MIME type describing the format of the configuration content. For more information, see Content-Type string null no
hosted_config_version_description A description of the configuration string null no
name The name for the application. Must be between 1 and 64 characters in length string "" no
retrieval_role_description Description of the configuration retrieval role string null no
retrieval_role_name The name for the configuration retrieval role string "" no
retrieval_role_path Path to the configuration retrieval role string null no
retrieval_role_permissions_boundary ARN of the policy that is used to set the permissions boundary for the configuration retrieval role string null no
retrieval_role_tags A map of additional tags to apply to the configuration retrieval role map(string) {} no
retrieval_role_use_name_prefix Determines whether to a name or name-prefix strategy is used on the role bool true no
s3_configuration_bucket_arn The ARN of the configuration S3 bucket string null no
s3_configuration_object_key Name of the configuration object/file stored in the S3 bucket string "*" no
ssm_document_configuration_arn ARN of the configuration SSM document string null no
ssm_parameter_configuration_arn ARN of the configuration SSM parameter string null no
tags A list of tag blocks. Each element should have keys named key, value, and propagate_at_launch map(string) {} no
use_hosted_configuration Determines whether a hosted configuration is used bool false no
use_s3_configuration Determines whether an S3 configuration is used bool false no
use_ssm_document_configuration Determines whether an SSM document configuration is used bool false no
use_ssm_parameter_configuration Determines whether an SSM parameter configuration is used bool false no

Outputs

Name Description
application_arn The Amazon Resource Name (ARN) of the AppConfig Application
application_id The AppConfig application ID
configuration_profile_arn The Amazon Resource Name (ARN) of the AppConfig Configuration Profile
configuration_profile_configuration_profile_id The configuration profile ID
configuration_profile_id The AppConfig configuration profile ID and application ID separated by a colon (:)
deployment_strategy_arn The Amazon Resource Name (ARN) of the AppConfig Deployment Strategy
deployment_strategy_id The AppConfig deployment strategy ID
deployments The AppConfig deployments
environments The AppConfig environments
hosted_configuration_version_arn The Amazon Resource Name (ARN) of the AppConfig hosted configuration version
hosted_configuration_version_id The AppConfig application ID, configuration profile ID, and version number separated by a slash (/)
hosted_configuration_version_version_number The version number of the hosted configuration
retrieval_role_arn Amazon Resource Name (ARN) specifying the retrieval role
retrieval_role_id Name of the retrieval role
retrieval_role_name Name of the retrieval role
retrieval_role_policy_arn The ARN assigned by AWS to the retrieval role policy
retrieval_role_policy_id The ARN assigned by AWS to the retrieval role policy
retrieval_role_policy_name The name of the policy
retrieval_role_policy_policy The retrieval role policy document
retrieval_role_policy_policy_id The retrieval role policy ID
retrieval_role_unique_id Stable and unique string identifying the retrieval role

License

Apache-2.0 Licensed. See LICENSE.

terraform-aws-appconfig's People

Contributors

bryantbiggs avatar dev-slatto avatar manabusakai avatar mlnrt avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

terraform-aws-appconfig's Issues

Creating Multiple Configuration Profiles for an Application

Hi,

The module currently supports creating a single AppConfig Configuration Profile.
In my use case, I need to create multiple Configuration Profiles under the same AppConfig Application.

Mind if I open a PR to add the functionality?

It would be nice if hosted_config_version_content could ignore changes

Is your request related to a new offering from AWS?

Is this functionality available in the AWS provider for Terraform? See CHANGELOG.md, too.

  • No πŸ›‘: please wait to file a request until the functionality is avaialble in the AWS provider
  • Yes βœ…: please list the AWS provider version which introduced this functionality

Is your request related to a problem? Please describe.

When creating the initial version of a freeform config, it helps to create it from a json template. But if this configuration undergoes many deployments outside of terraform, it would be nice to be able to ignore those "runtime" changes to the freeform config so we don't undo them with a terraform plan and apply.

Describe the solution you'd like.

A version that includes a variable indicating whether to add the lifecycle ignore_changes on hosted_config_version_content would be helpful.

Describe alternatives you've considered.

None! I can't think of any.

Additional context

We've using hosted_config_version_content to store a json configuration. This is updated in CI via AWS CLI.

When there is S3 file update it should trigger only deployment and rest all use the existing resource

Is your request related to a new offering from AWS?

Is this functionality available in the AWS provider for Terraform? See CHANGELOG.md, too.

  • No πŸ›‘: please wait to file a request until the functionality is available in the AWS provider
  • Yes βœ…: please list the AWS provider version which introduced this functionality

Is your request related to a problem? Please describe.

When there is S3 file update it should trigger only deployment and rest all use the existing resource. We use the app config profile , config env , & deployment Strategy as one time deployment and update the configurations multiple times. We need to trigger the deployment when ever an change in the S3 file.

Describe the solution you'd like.

We are doing it manually via aws cli by providing all the id ( app config,profile & env) and trigger the deployment

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.