aws.appconfig.Environment
Explore with Pulumi AI
Provides an AppConfig Environment resource for an aws.appconfig.Application
resource. One or more environments can be defined for an application.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleApplication = new aws.appconfig.Application("example", {
name: "example-application-tf",
description: "Example AppConfig Application",
tags: {
Type: "AppConfig Application",
},
});
const example = new aws.appconfig.Environment("example", {
name: "example-environment-tf",
description: "Example AppConfig Environment",
applicationId: exampleApplication.id,
monitors: [{
alarmArn: exampleAwsCloudwatchMetricAlarm.arn,
alarmRoleArn: exampleAwsIamRole.arn,
}],
tags: {
Type: "AppConfig Environment",
},
});
import pulumi
import pulumi_aws as aws
example_application = aws.appconfig.Application("example",
name="example-application-tf",
description="Example AppConfig Application",
tags={
"Type": "AppConfig Application",
})
example = aws.appconfig.Environment("example",
name="example-environment-tf",
description="Example AppConfig Environment",
application_id=example_application.id,
monitors=[{
"alarm_arn": example_aws_cloudwatch_metric_alarm["arn"],
"alarm_role_arn": example_aws_iam_role["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, "example", &appconfig.ApplicationArgs{
Name: pulumi.String("example-application-tf"),
Description: pulumi.String("Example AppConfig Application"),
Tags: pulumi.StringMap{
"Type": pulumi.String("AppConfig Application"),
},
})
if err != nil {
return err
}
_, err = appconfig.NewEnvironment(ctx, "example", &appconfig.EnvironmentArgs{
Name: pulumi.String("example-environment-tf"),
Description: pulumi.String("Example AppConfig Environment"),
ApplicationId: exampleApplication.ID(),
Monitors: appconfig.EnvironmentMonitorArray{
&appconfig.EnvironmentMonitorArgs{
AlarmArn: pulumi.Any(exampleAwsCloudwatchMetricAlarm.Arn),
AlarmRoleArn: pulumi.Any(exampleAwsIamRole.Arn),
},
},
Tags: pulumi.StringMap{
"Type": pulumi.String("AppConfig Environment"),
},
})
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 exampleApplication = new Aws.AppConfig.Application("example", new()
{
Name = "example-application-tf",
Description = "Example AppConfig Application",
Tags =
{
{ "Type", "AppConfig Application" },
},
});
var example = new Aws.AppConfig.Environment("example", new()
{
Name = "example-environment-tf",
Description = "Example AppConfig Environment",
ApplicationId = exampleApplication.Id,
Monitors = new[]
{
new Aws.AppConfig.Inputs.EnvironmentMonitorArgs
{
AlarmArn = exampleAwsCloudwatchMetricAlarm.Arn,
AlarmRoleArn = exampleAwsIamRole.Arn,
},
},
Tags =
{
{ "Type", "AppConfig Environment" },
},
});
});
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()
.name("example-application-tf")
.description("Example AppConfig Application")
.tags(Map.of("Type", "AppConfig Application"))
.build());
var example = new Environment("example", EnvironmentArgs.builder()
.name("example-environment-tf")
.description("Example AppConfig Environment")
.applicationId(exampleApplication.id())
.monitors(EnvironmentMonitorArgs.builder()
.alarmArn(exampleAwsCloudwatchMetricAlarm.arn())
.alarmRoleArn(exampleAwsIamRole.arn())
.build())
.tags(Map.of("Type", "AppConfig Environment"))
.build());
}
}
resources:
example:
type: aws:appconfig:Environment
properties:
name: example-environment-tf
description: Example AppConfig Environment
applicationId: ${exampleApplication.id}
monitors:
- alarmArn: ${exampleAwsCloudwatchMetricAlarm.arn}
alarmRoleArn: ${exampleAwsIamRole.arn}
tags:
Type: AppConfig Environment
exampleApplication:
type: aws:appconfig:Application
name: example
properties:
name: example-application-tf
description: Example AppConfig Application
tags:
Type: AppConfig Application
Create Environment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Environment(name: string, args: EnvironmentArgs, opts?: CustomResourceOptions);
@overload
def Environment(resource_name: str,
args: EnvironmentArgs,
opts: Optional[ResourceOptions] = None)
@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)
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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var environmentResource = new Aws.AppConfig.Environment("environmentResource", new()
{
ApplicationId = "string",
Description = "string",
Monitors = new[]
{
new Aws.AppConfig.Inputs.EnvironmentMonitorArgs
{
AlarmArn = "string",
AlarmRoleArn = "string",
},
},
Name = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := appconfig.NewEnvironment(ctx, "environmentResource", &appconfig.EnvironmentArgs{
ApplicationId: pulumi.String("string"),
Description: pulumi.String("string"),
Monitors: appconfig.EnvironmentMonitorArray{
&appconfig.EnvironmentMonitorArgs{
AlarmArn: pulumi.String("string"),
AlarmRoleArn: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var environmentResource = new Environment("environmentResource", EnvironmentArgs.builder()
.applicationId("string")
.description("string")
.monitors(EnvironmentMonitorArgs.builder()
.alarmArn("string")
.alarmRoleArn("string")
.build())
.name("string")
.tags(Map.of("string", "string"))
.build());
environment_resource = aws.appconfig.Environment("environmentResource",
application_id="string",
description="string",
monitors=[{
"alarm_arn": "string",
"alarm_role_arn": "string",
}],
name="string",
tags={
"string": "string",
})
const environmentResource = new aws.appconfig.Environment("environmentResource", {
applicationId: "string",
description: "string",
monitors: [{
alarmArn: "string",
alarmRoleArn: "string",
}],
name: "string",
tags: {
string: "string",
},
});
type: aws:appconfig:Environment
properties:
applicationId: string
description: string
monitors:
- alarmArn: string
alarmRoleArn: string
name: string
tags:
string: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
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.
- 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.
- 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.
- 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.
- 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.
- 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.
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.
- 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.
- 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.
- 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.
- 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.
- 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.
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
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.