Use this resource to link an AWS EU Sovereign account to New Relic.
Prerequisite
Setup is required in AWS EU Sovereign for this resource to work properly. To link an AWS EU Sovereign account to New Relic, you need an AWS EU Sovereign Cloud account.
Using a metric stream to New Relic is the only supported method for AWS EU Sovereign Cloud to get metrics into New Relic for the majority of AWS services. Follow the steps outlined here to set up a metric stream.
To pull data from AWS EU Sovereign for services not supported by CloudWatch Metric Streams (Billing, CloudTrail and X-Ray), complete the steps outlined here.
Example Usage
You can also use the full example, including the AWS set up, found in our guides.
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.cloud.AwsEuSovereignLinkAccount("foo", {
accountId: "1234567",
name: "My New Relic - AWS EU Sovereign Linked Account",
metricCollectionMode: "PUSH",
arn: "arn:aws-eusc:iam::123456789012:role/NewRelicInfrastructure-Integrations",
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.cloud.AwsEuSovereignLinkAccount("foo",
account_id="1234567",
name="My New Relic - AWS EU Sovereign Linked Account",
metric_collection_mode="PUSH",
arn="arn:aws-eusc:iam::123456789012:role/NewRelicInfrastructure-Integrations")
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic/cloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloud.NewAwsEuSovereignLinkAccount(ctx, "foo", &cloud.AwsEuSovereignLinkAccountArgs{
AccountId: pulumi.String("1234567"),
Name: pulumi.String("My New Relic - AWS EU Sovereign Linked Account"),
MetricCollectionMode: pulumi.String("PUSH"),
Arn: pulumi.String("arn:aws-eusc:iam::123456789012:role/NewRelicInfrastructure-Integrations"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = new NewRelic.Cloud.AwsEuSovereignLinkAccount("foo", new()
{
AccountId = "1234567",
Name = "My New Relic - AWS EU Sovereign Linked Account",
MetricCollectionMode = "PUSH",
Arn = "arn:aws-eusc:iam::123456789012:role/NewRelicInfrastructure-Integrations",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.cloud.AwsEuSovereignLinkAccount;
import com.pulumi.newrelic.cloud.AwsEuSovereignLinkAccountArgs;
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 foo = new AwsEuSovereignLinkAccount("foo", AwsEuSovereignLinkAccountArgs.builder()
.accountId("1234567")
.name("My New Relic - AWS EU Sovereign Linked Account")
.metricCollectionMode("PUSH")
.arn("arn:aws-eusc:iam::123456789012:role/NewRelicInfrastructure-Integrations")
.build());
}
}
resources:
foo:
type: newrelic:cloud:AwsEuSovereignLinkAccount
properties:
accountId: 1.234567e+06
name: My New Relic - AWS EU Sovereign Linked Account
metricCollectionMode: PUSH
arn: arn:aws-eusc:iam::123456789012:role/NewRelicInfrastructure-Integrations
Create AwsEuSovereignLinkAccount Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AwsEuSovereignLinkAccount(name: string, args: AwsEuSovereignLinkAccountArgs, opts?: CustomResourceOptions);@overload
def AwsEuSovereignLinkAccount(resource_name: str,
args: AwsEuSovereignLinkAccountArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AwsEuSovereignLinkAccount(resource_name: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
account_id: Optional[str] = None,
metric_collection_mode: Optional[str] = None,
name: Optional[str] = None)func NewAwsEuSovereignLinkAccount(ctx *Context, name string, args AwsEuSovereignLinkAccountArgs, opts ...ResourceOption) (*AwsEuSovereignLinkAccount, error)public AwsEuSovereignLinkAccount(string name, AwsEuSovereignLinkAccountArgs args, CustomResourceOptions? opts = null)
public AwsEuSovereignLinkAccount(String name, AwsEuSovereignLinkAccountArgs args)
public AwsEuSovereignLinkAccount(String name, AwsEuSovereignLinkAccountArgs args, CustomResourceOptions options)
type: newrelic:cloud:AwsEuSovereignLinkAccount
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 AwsEuSovereignLinkAccountArgs
- 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 AwsEuSovereignLinkAccountArgs
- 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 AwsEuSovereignLinkAccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AwsEuSovereignLinkAccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AwsEuSovereignLinkAccountArgs
- 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 awsEuSovereignLinkAccountResource = new NewRelic.Cloud.AwsEuSovereignLinkAccount("awsEuSovereignLinkAccountResource", new()
{
Arn = "string",
AccountId = "string",
MetricCollectionMode = "string",
Name = "string",
});
example, err := cloud.NewAwsEuSovereignLinkAccount(ctx, "awsEuSovereignLinkAccountResource", &cloud.AwsEuSovereignLinkAccountArgs{
Arn: pulumi.String("string"),
AccountId: pulumi.String("string"),
MetricCollectionMode: pulumi.String("string"),
Name: pulumi.String("string"),
})
var awsEuSovereignLinkAccountResource = new AwsEuSovereignLinkAccount("awsEuSovereignLinkAccountResource", AwsEuSovereignLinkAccountArgs.builder()
.arn("string")
.accountId("string")
.metricCollectionMode("string")
.name("string")
.build());
aws_eu_sovereign_link_account_resource = newrelic.cloud.AwsEuSovereignLinkAccount("awsEuSovereignLinkAccountResource",
arn="string",
account_id="string",
metric_collection_mode="string",
name="string")
const awsEuSovereignLinkAccountResource = new newrelic.cloud.AwsEuSovereignLinkAccount("awsEuSovereignLinkAccountResource", {
arn: "string",
accountId: "string",
metricCollectionMode: "string",
name: "string",
});
type: newrelic:cloud:AwsEuSovereignLinkAccount
properties:
accountId: string
arn: string
metricCollectionMode: string
name: string
AwsEuSovereignLinkAccount 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 AwsEuSovereignLinkAccount resource accepts the following input properties:
- Arn string
- The Amazon Resource Name (ARN) of the IAM role.
- Account
Id string - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID, if not specified in the configuration. - Metric
Collection stringMode - How metrics will be collected. Use
PUSHfor metric stream,PULLfor API polling of the 3 services not supported by metric streams (Billing, CloudTrail and X-Ray), orBOTHfor both methods. Defaults toPUSH, if not specified in the configuration. - Name string
The name/identifier of the AWS EU Sovereign - New Relic 'linked' account.
WARNING: Updating any of the aforementioned attributes (except
name) of anewrelic.cloud.AwsEuSovereignLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.NOTE: This resource requires the New Relic provider to be configured with
region = "EU"or theNEW_RELIC_REGION=EUenvironment variable.
- Arn string
- The Amazon Resource Name (ARN) of the IAM role.
- Account
Id string - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID, if not specified in the configuration. - Metric
Collection stringMode - How metrics will be collected. Use
PUSHfor metric stream,PULLfor API polling of the 3 services not supported by metric streams (Billing, CloudTrail and X-Ray), orBOTHfor both methods. Defaults toPUSH, if not specified in the configuration. - Name string
The name/identifier of the AWS EU Sovereign - New Relic 'linked' account.
WARNING: Updating any of the aforementioned attributes (except
name) of anewrelic.cloud.AwsEuSovereignLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.NOTE: This resource requires the New Relic provider to be configured with
region = "EU"or theNEW_RELIC_REGION=EUenvironment variable.
- arn String
- The Amazon Resource Name (ARN) of the IAM role.
- account
Id String - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID, if not specified in the configuration. - metric
Collection StringMode - How metrics will be collected. Use
PUSHfor metric stream,PULLfor API polling of the 3 services not supported by metric streams (Billing, CloudTrail and X-Ray), orBOTHfor both methods. Defaults toPUSH, if not specified in the configuration. - name String
The name/identifier of the AWS EU Sovereign - New Relic 'linked' account.
WARNING: Updating any of the aforementioned attributes (except
name) of anewrelic.cloud.AwsEuSovereignLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.NOTE: This resource requires the New Relic provider to be configured with
region = "EU"or theNEW_RELIC_REGION=EUenvironment variable.
- arn string
- The Amazon Resource Name (ARN) of the IAM role.
- account
Id string - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID, if not specified in the configuration. - metric
Collection stringMode - How metrics will be collected. Use
PUSHfor metric stream,PULLfor API polling of the 3 services not supported by metric streams (Billing, CloudTrail and X-Ray), orBOTHfor both methods. Defaults toPUSH, if not specified in the configuration. - name string
The name/identifier of the AWS EU Sovereign - New Relic 'linked' account.
WARNING: Updating any of the aforementioned attributes (except
name) of anewrelic.cloud.AwsEuSovereignLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.NOTE: This resource requires the New Relic provider to be configured with
region = "EU"or theNEW_RELIC_REGION=EUenvironment variable.
- arn str
- The Amazon Resource Name (ARN) of the IAM role.
- account_
id str - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID, if not specified in the configuration. - metric_
collection_ strmode - How metrics will be collected. Use
PUSHfor metric stream,PULLfor API polling of the 3 services not supported by metric streams (Billing, CloudTrail and X-Ray), orBOTHfor both methods. Defaults toPUSH, if not specified in the configuration. - name str
The name/identifier of the AWS EU Sovereign - New Relic 'linked' account.
WARNING: Updating any of the aforementioned attributes (except
name) of anewrelic.cloud.AwsEuSovereignLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.NOTE: This resource requires the New Relic provider to be configured with
region = "EU"or theNEW_RELIC_REGION=EUenvironment variable.
- arn String
- The Amazon Resource Name (ARN) of the IAM role.
- account
Id String - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID, if not specified in the configuration. - metric
Collection StringMode - How metrics will be collected. Use
PUSHfor metric stream,PULLfor API polling of the 3 services not supported by metric streams (Billing, CloudTrail and X-Ray), orBOTHfor both methods. Defaults toPUSH, if not specified in the configuration. - name String
The name/identifier of the AWS EU Sovereign - New Relic 'linked' account.
WARNING: Updating any of the aforementioned attributes (except
name) of anewrelic.cloud.AwsEuSovereignLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.NOTE: This resource requires the New Relic provider to be configured with
region = "EU"or theNEW_RELIC_REGION=EUenvironment variable.
Outputs
All input properties are implicitly available as output properties. Additionally, the AwsEuSovereignLinkAccount resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing AwsEuSovereignLinkAccount Resource
Get an existing AwsEuSovereignLinkAccount 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?: AwsEuSovereignLinkAccountState, opts?: CustomResourceOptions): AwsEuSovereignLinkAccount@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
arn: Optional[str] = None,
metric_collection_mode: Optional[str] = None,
name: Optional[str] = None) -> AwsEuSovereignLinkAccountfunc GetAwsEuSovereignLinkAccount(ctx *Context, name string, id IDInput, state *AwsEuSovereignLinkAccountState, opts ...ResourceOption) (*AwsEuSovereignLinkAccount, error)public static AwsEuSovereignLinkAccount Get(string name, Input<string> id, AwsEuSovereignLinkAccountState? state, CustomResourceOptions? opts = null)public static AwsEuSovereignLinkAccount get(String name, Output<String> id, AwsEuSovereignLinkAccountState state, CustomResourceOptions options)resources: _: type: newrelic:cloud:AwsEuSovereignLinkAccount get: id: ${id}- 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.
- Account
Id string - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID, if not specified in the configuration. - Arn string
- The Amazon Resource Name (ARN) of the IAM role.
- Metric
Collection stringMode - How metrics will be collected. Use
PUSHfor metric stream,PULLfor API polling of the 3 services not supported by metric streams (Billing, CloudTrail and X-Ray), orBOTHfor both methods. Defaults toPUSH, if not specified in the configuration. - Name string
The name/identifier of the AWS EU Sovereign - New Relic 'linked' account.
WARNING: Updating any of the aforementioned attributes (except
name) of anewrelic.cloud.AwsEuSovereignLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.NOTE: This resource requires the New Relic provider to be configured with
region = "EU"or theNEW_RELIC_REGION=EUenvironment variable.
- Account
Id string - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID, if not specified in the configuration. - Arn string
- The Amazon Resource Name (ARN) of the IAM role.
- Metric
Collection stringMode - How metrics will be collected. Use
PUSHfor metric stream,PULLfor API polling of the 3 services not supported by metric streams (Billing, CloudTrail and X-Ray), orBOTHfor both methods. Defaults toPUSH, if not specified in the configuration. - Name string
The name/identifier of the AWS EU Sovereign - New Relic 'linked' account.
WARNING: Updating any of the aforementioned attributes (except
name) of anewrelic.cloud.AwsEuSovereignLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.NOTE: This resource requires the New Relic provider to be configured with
region = "EU"or theNEW_RELIC_REGION=EUenvironment variable.
- account
Id String - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID, if not specified in the configuration. - arn String
- The Amazon Resource Name (ARN) of the IAM role.
- metric
Collection StringMode - How metrics will be collected. Use
PUSHfor metric stream,PULLfor API polling of the 3 services not supported by metric streams (Billing, CloudTrail and X-Ray), orBOTHfor both methods. Defaults toPUSH, if not specified in the configuration. - name String
The name/identifier of the AWS EU Sovereign - New Relic 'linked' account.
WARNING: Updating any of the aforementioned attributes (except
name) of anewrelic.cloud.AwsEuSovereignLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.NOTE: This resource requires the New Relic provider to be configured with
region = "EU"or theNEW_RELIC_REGION=EUenvironment variable.
- account
Id string - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID, if not specified in the configuration. - arn string
- The Amazon Resource Name (ARN) of the IAM role.
- metric
Collection stringMode - How metrics will be collected. Use
PUSHfor metric stream,PULLfor API polling of the 3 services not supported by metric streams (Billing, CloudTrail and X-Ray), orBOTHfor both methods. Defaults toPUSH, if not specified in the configuration. - name string
The name/identifier of the AWS EU Sovereign - New Relic 'linked' account.
WARNING: Updating any of the aforementioned attributes (except
name) of anewrelic.cloud.AwsEuSovereignLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.NOTE: This resource requires the New Relic provider to be configured with
region = "EU"or theNEW_RELIC_REGION=EUenvironment variable.
- account_
id str - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID, if not specified in the configuration. - arn str
- The Amazon Resource Name (ARN) of the IAM role.
- metric_
collection_ strmode - How metrics will be collected. Use
PUSHfor metric stream,PULLfor API polling of the 3 services not supported by metric streams (Billing, CloudTrail and X-Ray), orBOTHfor both methods. Defaults toPUSH, if not specified in the configuration. - name str
The name/identifier of the AWS EU Sovereign - New Relic 'linked' account.
WARNING: Updating any of the aforementioned attributes (except
name) of anewrelic.cloud.AwsEuSovereignLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.NOTE: This resource requires the New Relic provider to be configured with
region = "EU"or theNEW_RELIC_REGION=EUenvironment variable.
- account
Id String - The New Relic account ID to operate on. This allows the user to override the
account_idattribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID, if not specified in the configuration. - arn String
- The Amazon Resource Name (ARN) of the IAM role.
- metric
Collection StringMode - How metrics will be collected. Use
PUSHfor metric stream,PULLfor API polling of the 3 services not supported by metric streams (Billing, CloudTrail and X-Ray), orBOTHfor both methods. Defaults toPUSH, if not specified in the configuration. - name String
The name/identifier of the AWS EU Sovereign - New Relic 'linked' account.
WARNING: Updating any of the aforementioned attributes (except
name) of anewrelic.cloud.AwsEuSovereignLinkAccountresource that has been applied would force a replacement of the resource (destruction of the resource, followed by the creation of a new resource). Please carefully review the output ofpulumi preview, which would clearly indicate a replacement of this resource, before performing apulumi up.NOTE: This resource requires the New Relic provider to be configured with
region = "EU"or theNEW_RELIC_REGION=EUenvironment variable.
Import
Linked AWS EU Sovereign accounts can be imported using the id, e.g.
$ terraform import newrelic_cloud_aws_eu_sovereign_link_account.foo <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- New Relic pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
newrelicTerraform Provider.
