Try AWS Native preview for resources not in the classic version.
aws.appconfig.Environment
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Provides an AppConfig Environment resource for an aws.appconfig.Application
resource. One or more environments can be defined for an application.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleApplication = new Aws.AppConfig.Application("exampleApplication", new()
{
Description = "Example AppConfig Application",
Tags =
{
{ "Type", "AppConfig Application" },
},
});
var exampleEnvironment = new Aws.AppConfig.Environment("exampleEnvironment", new()
{
Description = "Example AppConfig Environment",
ApplicationId = exampleApplication.Id,
Monitors = new[]
{
new Aws.AppConfig.Inputs.EnvironmentMonitorArgs
{
AlarmArn = aws_cloudwatch_metric_alarm.Example.Arn,
AlarmRoleArn = aws_iam_role.Example.Arn,
},
},
Tags =
{
{ "Type", "AppConfig Environment" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appconfig"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleApplication, err := appconfig.NewApplication(ctx, "exampleApplication", &appconfig.ApplicationArgs{
Description: pulumi.String("Example AppConfig Application"),
Tags: pulumi.StringMap{
"Type": pulumi.String("AppConfig Application"),
},
})
if err != nil {
return err
}
_, err = appconfig.NewEnvironment(ctx, "exampleEnvironment", &appconfig.EnvironmentArgs{
Description: pulumi.String("Example AppConfig Environment"),
ApplicationId: exampleApplication.ID(),
Monitors: appconfig.EnvironmentMonitorArray{
&appconfig.EnvironmentMonitorArgs{
AlarmArn: pulumi.Any(aws_cloudwatch_metric_alarm.Example.Arn),
AlarmRoleArn: pulumi.Any(aws_iam_role.Example.Arn),
},
},
Tags: pulumi.StringMap{
"Type": pulumi.String("AppConfig Environment"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.appconfig.Application;
import com.pulumi.aws.appconfig.ApplicationArgs;
import com.pulumi.aws.appconfig.Environment;
import com.pulumi.aws.appconfig.EnvironmentArgs;
import com.pulumi.aws.appconfig.inputs.EnvironmentMonitorArgs;
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 exampleApplication = new Application("exampleApplication", ApplicationArgs.builder()
.description("Example AppConfig Application")
.tags(Map.of("Type", "AppConfig Application"))
.build());
var exampleEnvironment = new Environment("exampleEnvironment", EnvironmentArgs.builder()
.description("Example AppConfig Environment")
.applicationId(exampleApplication.id())
.monitors(EnvironmentMonitorArgs.builder()
.alarmArn(aws_cloudwatch_metric_alarm.example().arn())
.alarmRoleArn(aws_iam_role.example().arn())
.build())
.tags(Map.of("Type", "AppConfig Environment"))
.build());
}
}
import pulumi
import pulumi_aws as aws
example_application = aws.appconfig.Application("exampleApplication",
description="Example AppConfig Application",
tags={
"Type": "AppConfig Application",
})
example_environment = aws.appconfig.Environment("exampleEnvironment",
description="Example AppConfig Environment",
application_id=example_application.id,
monitors=[aws.appconfig.EnvironmentMonitorArgs(
alarm_arn=aws_cloudwatch_metric_alarm["example"]["arn"],
alarm_role_arn=aws_iam_role["example"]["arn"],
)],
tags={
"Type": "AppConfig Environment",
})
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleApplication = new aws.appconfig.Application("exampleApplication", {
description: "Example AppConfig Application",
tags: {
Type: "AppConfig Application",
},
});
const exampleEnvironment = new aws.appconfig.Environment("exampleEnvironment", {
description: "Example AppConfig Environment",
applicationId: exampleApplication.id,
monitors: [{
alarmArn: aws_cloudwatch_metric_alarm.example.arn,
alarmRoleArn: aws_iam_role.example.arn,
}],
tags: {
Type: "AppConfig Environment",
},
});
resources:
exampleEnvironment:
type: aws:appconfig:Environment
properties:
description: Example AppConfig Environment
applicationId: ${exampleApplication.id}
monitors:
- alarmArn: ${aws_cloudwatch_metric_alarm.example.arn}
alarmRoleArn: ${aws_iam_role.example.arn}
tags:
Type: AppConfig Environment
exampleApplication:
type: aws:appconfig:Application
properties:
description: Example AppConfig Application
tags:
Type: AppConfig Application
Create Environment Resource
new Environment(name: string, args: EnvironmentArgs, opts?: CustomResourceOptions);
@overload
def Environment(resource_name: str,
opts: Optional[ResourceOptions] = None,
application_id: Optional[str] = None,
description: Optional[str] = None,
monitors: Optional[Sequence[EnvironmentMonitorArgs]] = None,
name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
@overload
def Environment(resource_name: str,
args: EnvironmentArgs,
opts: Optional[ResourceOptions] = None)
func NewEnvironment(ctx *Context, name string, args EnvironmentArgs, opts ...ResourceOption) (*Environment, error)
public Environment(string name, EnvironmentArgs args, CustomResourceOptions? opts = null)
public Environment(String name, EnvironmentArgs args)
public Environment(String name, EnvironmentArgs args, CustomResourceOptions options)
type: aws:appconfig:Environment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EnvironmentArgs
- 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 EnvironmentArgs
- 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 EnvironmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EnvironmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EnvironmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Environment Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Environment resource accepts the following input properties:
- Application
Id string AppConfig application ID. Must be between 4 and 7 characters in length.
- Description string
Description of the environment. Can be at most 1024 characters.
- Monitors
List<Environment
Monitor> Set of Amazon CloudWatch alarms to monitor during the deployment process. Maximum of 5. See Monitor below for more details.
- Name string
Name for the environment. Must be between 1 and 64 characters in length.
- Dictionary<string, string>
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- Application
Id string AppConfig application ID. Must be between 4 and 7 characters in length.
- Description string
Description of the environment. Can be at most 1024 characters.
- Monitors
[]Environment
Monitor Args Set of Amazon CloudWatch alarms to monitor during the deployment process. Maximum of 5. See Monitor below for more details.
- Name string
Name for the environment. Must be between 1 and 64 characters in length.
- map[string]string
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- application
Id String AppConfig application ID. Must be between 4 and 7 characters in length.
- description String
Description of the environment. Can be at most 1024 characters.
- monitors
List<Environment
Monitor> Set of Amazon CloudWatch alarms to monitor during the deployment process. Maximum of 5. See Monitor below for more details.
- name String
Name for the environment. Must be between 1 and 64 characters in length.
- Map<String,String>
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- application
Id string AppConfig application ID. Must be between 4 and 7 characters in length.
- description string
Description of the environment. Can be at most 1024 characters.
- monitors
Environment
Monitor[] Set of Amazon CloudWatch alarms to monitor during the deployment process. Maximum of 5. See Monitor below for more details.
- name string
Name for the environment. Must be between 1 and 64 characters in length.
- {[key: string]: string}
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- application_
id str AppConfig application ID. Must be between 4 and 7 characters in length.
- description str
Description of the environment. Can be at most 1024 characters.
- monitors
Sequence[Environment
Monitor Args] Set of Amazon CloudWatch alarms to monitor during the deployment process. Maximum of 5. See Monitor below for more details.
- name str
Name for the environment. Must be between 1 and 64 characters in length.
- Mapping[str, str]
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- application
Id String AppConfig application ID. Must be between 4 and 7 characters in length.
- description String
Description of the environment. Can be at most 1024 characters.
- monitors List<Property Map>
Set of Amazon CloudWatch alarms to monitor during the deployment process. Maximum of 5. See Monitor below for more details.
- name String
Name for the environment. Must be between 1 and 64 characters in length.
- Map<String>
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Outputs
All input properties are implicitly available as output properties. Additionally, the Environment resource produces the following output properties:
- Arn string
ARN of the AppConfig Environment.
- Environment
Id string AppConfig environment ID.
- Id string
The provider-assigned unique ID for this managed resource.
- State string
State of the environment. Possible values are
READY_FOR_DEPLOYMENT
,DEPLOYING
,ROLLING_BACK
orROLLED_BACK
.- Dictionary<string, string>
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- Arn string
ARN of the AppConfig Environment.
- Environment
Id string AppConfig environment ID.
- Id string
The provider-assigned unique ID for this managed resource.
- State string
State of the environment. Possible values are
READY_FOR_DEPLOYMENT
,DEPLOYING
,ROLLING_BACK
orROLLED_BACK
.- map[string]string
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- arn String
ARN of the AppConfig Environment.
- environment
Id String AppConfig environment ID.
- id String
The provider-assigned unique ID for this managed resource.
- state String
State of the environment. Possible values are
READY_FOR_DEPLOYMENT
,DEPLOYING
,ROLLING_BACK
orROLLED_BACK
.- Map<String,String>
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- arn string
ARN of the AppConfig Environment.
- environment
Id string AppConfig environment ID.
- id string
The provider-assigned unique ID for this managed resource.
- state string
State of the environment. Possible values are
READY_FOR_DEPLOYMENT
,DEPLOYING
,ROLLING_BACK
orROLLED_BACK
.- {[key: string]: string}
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- arn str
ARN of the AppConfig Environment.
- environment_
id str AppConfig environment ID.
- id str
The provider-assigned unique ID for this managed resource.
- state str
State of the environment. Possible values are
READY_FOR_DEPLOYMENT
,DEPLOYING
,ROLLING_BACK
orROLLED_BACK
.- Mapping[str, str]
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- arn String
ARN of the AppConfig Environment.
- environment
Id String AppConfig environment ID.
- id String
The provider-assigned unique ID for this managed resource.
- state String
State of the environment. Possible values are
READY_FOR_DEPLOYMENT
,DEPLOYING
,ROLLING_BACK
orROLLED_BACK
.- Map<String>
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
Look up Existing Environment Resource
Get an existing Environment 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?: EnvironmentState, opts?: CustomResourceOptions): Environment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
application_id: Optional[str] = None,
arn: Optional[str] = None,
description: Optional[str] = None,
environment_id: Optional[str] = None,
monitors: Optional[Sequence[EnvironmentMonitorArgs]] = None,
name: Optional[str] = None,
state: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None) -> Environment
func GetEnvironment(ctx *Context, name string, id IDInput, state *EnvironmentState, opts ...ResourceOption) (*Environment, error)
public static Environment Get(string name, Input<string> id, EnvironmentState? state, CustomResourceOptions? opts = null)
public static Environment get(String name, Output<String> id, EnvironmentState 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.
- Application
Id string AppConfig application ID. Must be between 4 and 7 characters in length.
- Arn string
ARN of the AppConfig Environment.
- Description string
Description of the environment. Can be at most 1024 characters.
- Environment
Id string AppConfig environment ID.
- Monitors
List<Environment
Monitor> Set of Amazon CloudWatch alarms to monitor during the deployment process. Maximum of 5. See Monitor below for more details.
- Name string
Name for the environment. Must be between 1 and 64 characters in length.
- State string
State of the environment. Possible values are
READY_FOR_DEPLOYMENT
,DEPLOYING
,ROLLING_BACK
orROLLED_BACK
.- Dictionary<string, string>
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- Dictionary<string, string>
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- Application
Id string AppConfig application ID. Must be between 4 and 7 characters in length.
- Arn string
ARN of the AppConfig Environment.
- Description string
Description of the environment. Can be at most 1024 characters.
- Environment
Id string AppConfig environment ID.
- Monitors
[]Environment
Monitor Args Set of Amazon CloudWatch alarms to monitor during the deployment process. Maximum of 5. See Monitor below for more details.
- Name string
Name for the environment. Must be between 1 and 64 characters in length.
- State string
State of the environment. Possible values are
READY_FOR_DEPLOYMENT
,DEPLOYING
,ROLLING_BACK
orROLLED_BACK
.- map[string]string
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- map[string]string
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- application
Id String AppConfig application ID. Must be between 4 and 7 characters in length.
- arn String
ARN of the AppConfig Environment.
- description String
Description of the environment. Can be at most 1024 characters.
- environment
Id String AppConfig environment ID.
- monitors
List<Environment
Monitor> Set of Amazon CloudWatch alarms to monitor during the deployment process. Maximum of 5. See Monitor below for more details.
- name String
Name for the environment. Must be between 1 and 64 characters in length.
- state String
State of the environment. Possible values are
READY_FOR_DEPLOYMENT
,DEPLOYING
,ROLLING_BACK
orROLLED_BACK
.- Map<String,String>
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- Map<String,String>
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- application
Id string AppConfig application ID. Must be between 4 and 7 characters in length.
- arn string
ARN of the AppConfig Environment.
- description string
Description of the environment. Can be at most 1024 characters.
- environment
Id string AppConfig environment ID.
- monitors
Environment
Monitor[] Set of Amazon CloudWatch alarms to monitor during the deployment process. Maximum of 5. See Monitor below for more details.
- name string
Name for the environment. Must be between 1 and 64 characters in length.
- state string
State of the environment. Possible values are
READY_FOR_DEPLOYMENT
,DEPLOYING
,ROLLING_BACK
orROLLED_BACK
.- {[key: string]: string}
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- {[key: string]: string}
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- application_
id str AppConfig application ID. Must be between 4 and 7 characters in length.
- arn str
ARN of the AppConfig Environment.
- description str
Description of the environment. Can be at most 1024 characters.
- environment_
id str AppConfig environment ID.
- monitors
Sequence[Environment
Monitor Args] Set of Amazon CloudWatch alarms to monitor during the deployment process. Maximum of 5. See Monitor below for more details.
- name str
Name for the environment. Must be between 1 and 64 characters in length.
- state str
State of the environment. Possible values are
READY_FOR_DEPLOYMENT
,DEPLOYING
,ROLLING_BACK
orROLLED_BACK
.- Mapping[str, str]
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- Mapping[str, str]
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- application
Id String AppConfig application ID. Must be between 4 and 7 characters in length.
- arn String
ARN of the AppConfig Environment.
- description String
Description of the environment. Can be at most 1024 characters.
- environment
Id String AppConfig environment ID.
- monitors List<Property Map>
Set of Amazon CloudWatch alarms to monitor during the deployment process. Maximum of 5. See Monitor below for more details.
- name String
Name for the environment. Must be between 1 and 64 characters in length.
- state String
State of the environment. Possible values are
READY_FOR_DEPLOYMENT
,DEPLOYING
,ROLLING_BACK
orROLLED_BACK
.- Map<String>
Map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- Map<String>
Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
Supporting Types
EnvironmentMonitor, EnvironmentMonitorArgs
- Alarm
Arn string ARN of the Amazon CloudWatch alarm.
- Alarm
Role stringArn ARN of an IAM role for AWS AppConfig to monitor
alarm_arn
.
- Alarm
Arn string ARN of the Amazon CloudWatch alarm.
- Alarm
Role stringArn ARN of an IAM role for AWS AppConfig to monitor
alarm_arn
.
- alarm
Arn String ARN of the Amazon CloudWatch alarm.
- alarm
Role StringArn ARN of an IAM role for AWS AppConfig to monitor
alarm_arn
.
- alarm
Arn string ARN of the Amazon CloudWatch alarm.
- alarm
Role stringArn ARN of an IAM role for AWS AppConfig to monitor
alarm_arn
.
- alarm_
arn str ARN of the Amazon CloudWatch alarm.
- alarm_
role_ strarn ARN of an IAM role for AWS AppConfig to monitor
alarm_arn
.
- alarm
Arn String ARN of the Amazon CloudWatch alarm.
- alarm
Role StringArn ARN of an IAM role for AWS AppConfig to monitor
alarm_arn
.
Import
Using pulumi import
, import AppConfig Environments using the environment ID and application ID separated by a colon (:
). For example:
$ pulumi import aws:appconfig/environment:Environment example 71abcde:11xxxxx
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.