Extension class

Provides an AppConfig Extension resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const testTopic = new aws.sns.Topic("test", {name: "test"});
const test = aws.iam.getPolicyDocument({
    statements: [{
        principals: [{
            type: "Service",
            identifiers: ["appconfig.amazonaws.com"],
        }],
        actions: ["sts:AssumeRole"],
    }],
});
const testRole = new aws.iam.Role("test", {
    name: "test",
    assumeRolePolicy: test.then(test => test.json),
});
const testExtension = new aws.appconfig.Extension("test", {
    actionPoints: [{
        actions: [{
            name: "test",
            roleArn: testRole.arn,
            uri: testTopic.arn,
        }],
        point: "ON_DEPLOYMENT_COMPLETE",
    }],
    name: "test",
    description: "test description",
    tags: {
        Type: "AppConfig Extension",
    },
});
import pulumi
import pulumi_aws as aws

test_topic = aws.sns.Topic("test", name="test")
test = aws.iam.get_policy_document(statements=[{
    "principals": [{
        "type": "Service",
        "identifiers": ["appconfig.amazonaws.com"],
    }],
    "actions": ["sts:AssumeRole"],
}])
test_role = aws.iam.Role("test",
    name="test",
    assume_role_policy=test.json)
test_extension = aws.appconfig.Extension("test",
    action_points=[{
        "actions": [{
            "name": "test",
            "role_arn": test_role.arn,
            "uri": test_topic.arn,
        }],
        "point": "ON_DEPLOYMENT_COMPLETE",
    }],
    name="test",
    description="test description",
    tags={
        "Type": "AppConfig Extension",
    })
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var testTopic = new Aws.Sns.Topic("test", new()
    {
        Name = "test",
    });

    var test = Aws.Iam.GetPolicyDocument.Invoke(new()
    {
        Statements = new[]
        {
            new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
            {
                Principals = new[]
                {
                    new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
                    {
                        Type = "Service",
                        Identifiers = new[]
                        {
                            "appconfig.amazonaws.com",
                        },
                    },
                },
                Actions = new[]
                {
                    "sts:AssumeRole",
                },
            },
        },
    });

    var testRole = new Aws.Iam.Role("test", new()
    {
        Name = "test",
        AssumeRolePolicy = test.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
    });

    var testExtension = new Aws.AppConfig.Extension("test", new()
    {
        ActionPoints = new[]
        {
            new Aws.AppConfig.Inputs.ExtensionActionPointArgs
            {
                Actions = new[]
                {
                    new Aws.AppConfig.Inputs.ExtensionActionPointActionArgs
                    {
                        Name = "test",
                        RoleArn = testRole.Arn,
                        Uri = testTopic.Arn,
                    },
                },
                Point = "ON_DEPLOYMENT_COMPLETE",
            },
        },
        Name = "test",
        Description = "test description",
        Tags =
        {
            { "Type", "AppConfig Extension" },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/appconfig"
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam"
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/sns"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		testTopic, err := sns.NewTopic(ctx, "test", &sns.TopicArgs{
			Name: pulumi.String("test"),
		})
		if err != nil {
			return err
		}
		test, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
			Statements: []iam.GetPolicyDocumentStatement{
				{
					Principals: []iam.GetPolicyDocumentStatementPrincipal{
						{
							Type: "Service",
							Identifiers: []string{
								"appconfig.amazonaws.com",
							},
						},
					},
					Actions: []string{
						"sts:AssumeRole",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		testRole, err := iam.NewRole(ctx, "test", &iam.RoleArgs{
			Name:             pulumi.String("test"),
			AssumeRolePolicy: pulumi.String(test.Json),
		})
		if err != nil {
			return err
		}
		_, err = appconfig.NewExtension(ctx, "test", &appconfig.ExtensionArgs{
			ActionPoints: appconfig.ExtensionActionPointArray{
				&appconfig.ExtensionActionPointArgs{
					Actions: appconfig.ExtensionActionPointActionArray{
						&appconfig.ExtensionActionPointActionArgs{
							Name:    pulumi.String("test"),
							RoleArn: testRole.Arn,
							Uri:     testTopic.Arn,
						},
					},
					Point: pulumi.String("ON_DEPLOYMENT_COMPLETE"),
				},
			},
			Name:        pulumi.String("test"),
			Description: pulumi.String("test description"),
			Tags: pulumi.StringMap{
				"Type": pulumi.String("AppConfig Extension"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

data "aws_iam_getpolicydocument" "test" {
  statements {
    principals {
      type        = "Service"
      identifiers = ["appconfig.amazonaws.com"]
    }
    actions = ["sts:AssumeRole"]
  }
}

resource "aws_sns_topic" "test" {
  name = "test"
}
resource "aws_iam_role" "test" {
  name               = "test"
  assume_role_policy = data.aws_iam_getpolicydocument.test.json
}
resource "aws_appconfig_extension" "test" {
  action_points {
    actions {
      name     = "test"
      role_arn = aws_iam_role.test.arn
      uri      = aws_sns_topic.test.arn
    }
    point = "ON_DEPLOYMENT_COMPLETE"
  }
  name        = "test"
  description = "test description"
  tags = {
    "Type" = "AppConfig Extension"
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sns.Topic;
import com.pulumi.aws.sns.TopicArgs;
import com.pulumi.aws.iam.IamFunctions;
import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
import com.pulumi.aws.iam.inputs.GetPolicyDocumentStatementArgs;
import com.pulumi.aws.iam.inputs.GetPolicyDocumentStatementPrincipalArgs;
import com.pulumi.aws.iam.Role;
import com.pulumi.aws.iam.RoleArgs;
import com.pulumi.aws.appconfig.Extension;
import com.pulumi.aws.appconfig.ExtensionArgs;
import com.pulumi.aws.appconfig.inputs.ExtensionActionPointArgs;
import com.pulumi.aws.appconfig.inputs.ExtensionActionPointActionArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var testTopic = new Topic("testTopic", TopicArgs.builder()
            .name("test")
            .build());

        final var test = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
            .statements(GetPolicyDocumentStatementArgs.builder()
                .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
                    .type("Service")
                    .identifiers("appconfig.amazonaws.com")
                    .build())
                .actions("sts:AssumeRole")
                .build())
            .build());

        var testRole = new Role("testRole", RoleArgs.builder()
            .name("test")
            .assumeRolePolicy(test.json())
            .build());

        var testExtension = new Extension("testExtension", ExtensionArgs.builder()
            .actionPoints(ExtensionActionPointArgs.builder()
                .actions(ExtensionActionPointActionArgs.builder()
                    .name("test")
                    .roleArn(testRole.arn())
                    .uri(testTopic.arn())
                    .build())
                .point("ON_DEPLOYMENT_COMPLETE")
                .build())
            .name("test")
            .description("test description")
            .tags(Map.of("Type", "AppConfig Extension"))
            .build());

    }
}
resources:
  testTopic:
    type: aws:sns:Topic
    name: test
    properties:
      name: test
  testRole:
    type: aws:iam:Role
    name: test
    properties:
      name: test
      assumeRolePolicy: ${test.json}
  testExtension:
    type: aws:appconfig:Extension
    name: test
    properties:
      actionPoints:
        - actions:
            - name: test
              roleArn: ${testRole.arn}
              uri: ${testTopic.arn}
          point: ON_DEPLOYMENT_COMPLETE
      name: test
      description: test description
      tags:
        Type: AppConfig Extension
variables:
  test:
    fn::invoke:
      function: aws:iam:getPolicyDocument
      arguments:
        statements:
          - principals:
              - type: Service
                identifiers:
                  - appconfig.amazonaws.com
            actions:
              - sts:AssumeRole

Import

Using pulumi import, import AppConfig Extensions using their extension ID. For example:

$ pulumi import aws:appconfig/extension:Extension example 71rxuzt

Constructors

Extension(String name, {ExtensionArgs? args, CustomResourceOptions? options})
Creates a new Extension. name The Pulumi resource name. args Arguments used to configure this Extension. The set of arguments for Extension. options Resource options controlling this resource's behavior.
Extension.reference(String urn)
Creates a typed reference to an existing Extension resource.

Properties

actionPoints ↔ Output<List<ExtensionActionPoint>>
Action points defined in the extension. Detailed below.
latefinal
arn ↔ Output<String>
ARN of the AppConfig Extension.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
description ↔ Output<String>
Information about the extension.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
name ↔ Output<String>
Name for the extension. Each extension name in your account must be unique. Extension versions use the same name.
latefinal
parameters ↔ Output<List<ExtensionParameter>>
Parameters accepted by the extension. You specify parameter values when you associate the extension to an AppConfig resource by using the CreateExtensionAssociation API action. For Lambda extension actions, these parameters are included in the Lambda request object. Detailed below.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tags ↔ Output<Map<String, String>?>
Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited
version ↔ Output<int>
Version number for the extension.
latefinal

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {ExtensionState? state, CustomResourceOptions? options}) → Extension
Gets an existing Extension resource's state with the given name and id.