Resource: aws_appconfig_extension_association

Associates an AppConfig Extension with a Resource.

Example Usage

resource "aws_sns_topic" "test" {
  name = "test"
}

data "aws_iam_policy_document" "test" {
  statement {
    actions = ["sts:AssumeRole"]

    principals {
      type        = "Service"
      identifiers = ["appconfig.amazonaws.com"]
    }
  }
}

resource "aws_iam_role" "test" {
  name               = "test"
  assume_role_policy = data.aws_iam_policy_document.test.json
}

resource "aws_appconfig_extension" "test" {
  name        = "test"
  description = "test description"
  action_point {
    point = "ON_DEPLOYMENT_COMPLETE"
    action {
      name     = "test"
      role_arn = aws_iam_role.test.arn
      uri      = aws_sns_topic.test.arn
    }
  }
  tags = {
    Type = "AppConfig Extension"
  }
}

resource "aws_appconfig_application" "test" {
  name = "test"
}

resource "aws_appconfig_extension_association" "test" {
  extension_arn = aws_appconfig_extension.test.arn
  resource_arn  = aws_appconfig_application.test.arn
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import AppConfig Extension Associations using their extension association ID. For example:

import {
  to = aws_appconfig_extension_association.example
  id = "71rxuzt"
}

Using terraform import, import AppConfig Extension Associations using their extension association ID. For example:

% terraform import aws_appconfig_extension_association.example 71rxuzt