aws.appconfig.ExtensionAssociation
Explore with Pulumi AI
Associates an AppConfig Extension with a 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: [{
actions: ["sts:AssumeRole"],
principals: [{
type: "Service",
identifiers: ["appconfig.amazonaws.com"],
}],
}],
});
const testRole = new aws.iam.Role("test", {
name: "test",
assumeRolePolicy: test.then(test => test.json),
});
const testExtension = new aws.appconfig.Extension("test", {
name: "test",
description: "test description",
actionPoints: [{
point: "ON_DEPLOYMENT_COMPLETE",
actions: [{
name: "test",
roleArn: testRole.arn,
uri: testTopic.arn,
}],
}],
tags: {
Type: "AppConfig Extension",
},
});
const testApplication = new aws.appconfig.Application("test", {name: "test"});
const testExtensionAssociation = new aws.appconfig.ExtensionAssociation("test", {
extensionArn: testExtension.arn,
resourceArn: testApplication.arn,
});
import pulumi
import pulumi_aws as aws
test_topic = aws.sns.Topic("test", name="test")
test = aws.iam.get_policy_document(statements=[{
"actions": ["sts:AssumeRole"],
"principals": [{
"type": "Service",
"identifiers": ["appconfig.amazonaws.com"],
}],
}])
test_role = aws.iam.Role("test",
name="test",
assume_role_policy=test.json)
test_extension = aws.appconfig.Extension("test",
name="test",
description="test description",
action_points=[{
"point": "ON_DEPLOYMENT_COMPLETE",
"actions": [{
"name": "test",
"role_arn": test_role.arn,
"uri": test_topic.arn,
}],
}],
tags={
"Type": "AppConfig Extension",
})
test_application = aws.appconfig.Application("test", name="test")
test_extension_association = aws.appconfig.ExtensionAssociation("test",
extension_arn=test_extension.arn,
resource_arn=test_application.arn)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appconfig"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
"github.com/pulumi/pulumi-aws/sdk/v6/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{
{
Actions: []string{
"sts:AssumeRole",
},
Principals: []iam.GetPolicyDocumentStatementPrincipal{
{
Type: "Service",
Identifiers: []string{
"appconfig.amazonaws.com",
},
},
},
},
},
}, 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
}
testExtension, err := appconfig.NewExtension(ctx, "test", &appconfig.ExtensionArgs{
Name: pulumi.String("test"),
Description: pulumi.String("test description"),
ActionPoints: appconfig.ExtensionActionPointArray{
&appconfig.ExtensionActionPointArgs{
Point: pulumi.String("ON_DEPLOYMENT_COMPLETE"),
Actions: appconfig.ExtensionActionPointActionArray{
&appconfig.ExtensionActionPointActionArgs{
Name: pulumi.String("test"),
RoleArn: testRole.Arn,
Uri: testTopic.Arn,
},
},
},
},
Tags: pulumi.StringMap{
"Type": pulumi.String("AppConfig Extension"),
},
})
if err != nil {
return err
}
testApplication, err := appconfig.NewApplication(ctx, "test", &appconfig.ApplicationArgs{
Name: pulumi.String("test"),
})
if err != nil {
return err
}
_, err = appconfig.NewExtensionAssociation(ctx, "test", &appconfig.ExtensionAssociationArgs{
ExtensionArn: testExtension.Arn,
ResourceArn: testApplication.Arn,
})
if err != nil {
return err
}
return nil
})
}
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
{
Actions = new[]
{
"sts:AssumeRole",
},
Principals = new[]
{
new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
{
Type = "Service",
Identifiers = new[]
{
"appconfig.amazonaws.com",
},
},
},
},
},
});
var testRole = new Aws.Iam.Role("test", new()
{
Name = "test",
AssumeRolePolicy = test.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
});
var testExtension = new Aws.AppConfig.Extension("test", new()
{
Name = "test",
Description = "test description",
ActionPoints = new[]
{
new Aws.AppConfig.Inputs.ExtensionActionPointArgs
{
Point = "ON_DEPLOYMENT_COMPLETE",
Actions = new[]
{
new Aws.AppConfig.Inputs.ExtensionActionPointActionArgs
{
Name = "test",
RoleArn = testRole.Arn,
Uri = testTopic.Arn,
},
},
},
},
Tags =
{
{ "Type", "AppConfig Extension" },
},
});
var testApplication = new Aws.AppConfig.Application("test", new()
{
Name = "test",
});
var testExtensionAssociation = new Aws.AppConfig.ExtensionAssociation("test", new()
{
ExtensionArn = testExtension.Arn,
ResourceArn = testApplication.Arn,
});
});
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.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.Application;
import com.pulumi.aws.appconfig.ApplicationArgs;
import com.pulumi.aws.appconfig.ExtensionAssociation;
import com.pulumi.aws.appconfig.ExtensionAssociationArgs;
import java.util.List;
import java.util.ArrayList;
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()
.actions("sts:AssumeRole")
.principals(GetPolicyDocumentStatementPrincipalArgs.builder()
.type("Service")
.identifiers("appconfig.amazonaws.com")
.build())
.build())
.build());
var testRole = new Role("testRole", RoleArgs.builder()
.name("test")
.assumeRolePolicy(test.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
.build());
var testExtension = new Extension("testExtension", ExtensionArgs.builder()
.name("test")
.description("test description")
.actionPoints(ExtensionActionPointArgs.builder()
.point("ON_DEPLOYMENT_COMPLETE")
.actions(ExtensionActionPointActionArgs.builder()
.name("test")
.roleArn(testRole.arn())
.uri(testTopic.arn())
.build())
.build())
.tags(Map.of("Type", "AppConfig Extension"))
.build());
var testApplication = new Application("testApplication", ApplicationArgs.builder()
.name("test")
.build());
var testExtensionAssociation = new ExtensionAssociation("testExtensionAssociation", ExtensionAssociationArgs.builder()
.extensionArn(testExtension.arn())
.resourceArn(testApplication.arn())
.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:
name: test
description: test description
actionPoints:
- point: ON_DEPLOYMENT_COMPLETE
actions:
- name: test
roleArn: ${testRole.arn}
uri: ${testTopic.arn}
tags:
Type: AppConfig Extension
testApplication:
type: aws:appconfig:Application
name: test
properties:
name: test
testExtensionAssociation:
type: aws:appconfig:ExtensionAssociation
name: test
properties:
extensionArn: ${testExtension.arn}
resourceArn: ${testApplication.arn}
variables:
test:
fn::invoke:
Function: aws:iam:getPolicyDocument
Arguments:
statements:
- actions:
- sts:AssumeRole
principals:
- type: Service
identifiers:
- appconfig.amazonaws.com
Create ExtensionAssociation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ExtensionAssociation(name: string, args: ExtensionAssociationArgs, opts?: CustomResourceOptions);
@overload
def ExtensionAssociation(resource_name: str,
args: ExtensionAssociationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ExtensionAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
extension_arn: Optional[str] = None,
resource_arn: Optional[str] = None,
parameters: Optional[Mapping[str, str]] = None)
func NewExtensionAssociation(ctx *Context, name string, args ExtensionAssociationArgs, opts ...ResourceOption) (*ExtensionAssociation, error)
public ExtensionAssociation(string name, ExtensionAssociationArgs args, CustomResourceOptions? opts = null)
public ExtensionAssociation(String name, ExtensionAssociationArgs args)
public ExtensionAssociation(String name, ExtensionAssociationArgs args, CustomResourceOptions options)
type: aws:appconfig:ExtensionAssociation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ExtensionAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ExtensionAssociationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ExtensionAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ExtensionAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ExtensionAssociationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var extensionAssociationResource = new Aws.AppConfig.ExtensionAssociation("extensionAssociationResource", new()
{
ExtensionArn = "string",
ResourceArn = "string",
Parameters =
{
{ "string", "string" },
},
});
example, err := appconfig.NewExtensionAssociation(ctx, "extensionAssociationResource", &appconfig.ExtensionAssociationArgs{
ExtensionArn: pulumi.String("string"),
ResourceArn: pulumi.String("string"),
Parameters: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var extensionAssociationResource = new ExtensionAssociation("extensionAssociationResource", ExtensionAssociationArgs.builder()
.extensionArn("string")
.resourceArn("string")
.parameters(Map.of("string", "string"))
.build());
extension_association_resource = aws.appconfig.ExtensionAssociation("extensionAssociationResource",
extension_arn="string",
resource_arn="string",
parameters={
"string": "string",
})
const extensionAssociationResource = new aws.appconfig.ExtensionAssociation("extensionAssociationResource", {
extensionArn: "string",
resourceArn: "string",
parameters: {
string: "string",
},
});
type: aws:appconfig:ExtensionAssociation
properties:
extensionArn: string
parameters:
string: string
resourceArn: string
ExtensionAssociation Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ExtensionAssociation resource accepts the following input properties:
- Extension
Arn string - The ARN of the extension defined in the association.
- Resource
Arn string - The ARN of the application, configuration profile, or environment to associate with the extension.
- Parameters Dictionary<string, string>
- The parameter names and values defined for the association.
- Extension
Arn string - The ARN of the extension defined in the association.
- Resource
Arn string - The ARN of the application, configuration profile, or environment to associate with the extension.
- Parameters map[string]string
- The parameter names and values defined for the association.
- extension
Arn String - The ARN of the extension defined in the association.
- resource
Arn String - The ARN of the application, configuration profile, or environment to associate with the extension.
- parameters Map<String,String>
- The parameter names and values defined for the association.
- extension
Arn string - The ARN of the extension defined in the association.
- resource
Arn string - The ARN of the application, configuration profile, or environment to associate with the extension.
- parameters {[key: string]: string}
- The parameter names and values defined for the association.
- extension_
arn str - The ARN of the extension defined in the association.
- resource_
arn str - The ARN of the application, configuration profile, or environment to associate with the extension.
- parameters Mapping[str, str]
- The parameter names and values defined for the association.
- extension
Arn String - The ARN of the extension defined in the association.
- resource
Arn String - The ARN of the application, configuration profile, or environment to associate with the extension.
- parameters Map<String>
- The parameter names and values defined for the association.
Outputs
All input properties are implicitly available as output properties. Additionally, the ExtensionAssociation resource produces the following output properties:
- Arn string
- ARN of the AppConfig Extension Association.
- Extension
Version int - The version number for the extension defined in the association.
- Id string
- The provider-assigned unique ID for this managed resource.
- Arn string
- ARN of the AppConfig Extension Association.
- Extension
Version int - The version number for the extension defined in the association.
- Id string
- The provider-assigned unique ID for this managed resource.
- arn String
- ARN of the AppConfig Extension Association.
- extension
Version Integer - The version number for the extension defined in the association.
- id String
- The provider-assigned unique ID for this managed resource.
- arn string
- ARN of the AppConfig Extension Association.
- extension
Version number - The version number for the extension defined in the association.
- id string
- The provider-assigned unique ID for this managed resource.
- arn str
- ARN of the AppConfig Extension Association.
- extension_
version int - The version number for the extension defined in the association.
- id str
- The provider-assigned unique ID for this managed resource.
- arn String
- ARN of the AppConfig Extension Association.
- extension
Version Number - The version number for the extension defined in the association.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ExtensionAssociation Resource
Get an existing ExtensionAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ExtensionAssociationState, opts?: CustomResourceOptions): ExtensionAssociation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
extension_arn: Optional[str] = None,
extension_version: Optional[int] = None,
parameters: Optional[Mapping[str, str]] = None,
resource_arn: Optional[str] = None) -> ExtensionAssociation
func GetExtensionAssociation(ctx *Context, name string, id IDInput, state *ExtensionAssociationState, opts ...ResourceOption) (*ExtensionAssociation, error)
public static ExtensionAssociation Get(string name, Input<string> id, ExtensionAssociationState? state, CustomResourceOptions? opts = null)
public static ExtensionAssociation get(String name, Output<String> id, ExtensionAssociationState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Arn string
- ARN of the AppConfig Extension Association.
- Extension
Arn string - The ARN of the extension defined in the association.
- Extension
Version int - The version number for the extension defined in the association.
- Parameters Dictionary<string, string>
- The parameter names and values defined for the association.
- Resource
Arn string - The ARN of the application, configuration profile, or environment to associate with the extension.
- Arn string
- ARN of the AppConfig Extension Association.
- Extension
Arn string - The ARN of the extension defined in the association.
- Extension
Version int - The version number for the extension defined in the association.
- Parameters map[string]string
- The parameter names and values defined for the association.
- Resource
Arn string - The ARN of the application, configuration profile, or environment to associate with the extension.
- arn String
- ARN of the AppConfig Extension Association.
- extension
Arn String - The ARN of the extension defined in the association.
- extension
Version Integer - The version number for the extension defined in the association.
- parameters Map<String,String>
- The parameter names and values defined for the association.
- resource
Arn String - The ARN of the application, configuration profile, or environment to associate with the extension.
- arn string
- ARN of the AppConfig Extension Association.
- extension
Arn string - The ARN of the extension defined in the association.
- extension
Version number - The version number for the extension defined in the association.
- parameters {[key: string]: string}
- The parameter names and values defined for the association.
- resource
Arn string - The ARN of the application, configuration profile, or environment to associate with the extension.
- arn str
- ARN of the AppConfig Extension Association.
- extension_
arn str - The ARN of the extension defined in the association.
- extension_
version int - The version number for the extension defined in the association.
- parameters Mapping[str, str]
- The parameter names and values defined for the association.
- resource_
arn str - The ARN of the application, configuration profile, or environment to associate with the extension.
- arn String
- ARN of the AppConfig Extension Association.
- extension
Arn String - The ARN of the extension defined in the association.
- extension
Version Number - The version number for the extension defined in the association.
- parameters Map<String>
- The parameter names and values defined for the association.
- resource
Arn String - The ARN of the application, configuration profile, or environment to associate with the extension.
Import
Using pulumi import
, import AppConfig Extension Associations using their extension association ID. For example:
$ pulumi import aws:appconfig/extensionAssociation:ExtensionAssociation example 71rxuzt
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.