newrelic.cloud.AwsGovcloudLinkAccount
Explore with Pulumi AI
IMPORTANT! This resource is in alpha state, and could still contain issues and missing functionality. If you encounter any issue please create a ticket on Github with all the required information.
Use this resource to link an AWSGovCloud account to New Relic.
Prerequisite
Obtain the AwsGovCloud account designed to address the specific regulatory needs of United States (federal, state, and local agencies), education institutions, and the supporting ecosystem.
It is an isolated AWS region designed to host sensitive data and regulated workloads in the cloud, helping customers support their US government compliance requirements.
To pull data from AWSGovCloud, complete the steps outlined here.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.cloud.AwsGovcloudLinkAccount("foo", {
accountId: "The New Relic account ID where you want to link the AWS GovCloud account",
accessKeyId: "access-key-id of aws govcloud account",
awsAccountId: "aws govcloud account id",
metricCollectionMode: "PULL",
name: "account name",
secretAccessKey: "secret access key of the aws govcloud account",
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.cloud.AwsGovcloudLinkAccount("foo",
account_id="The New Relic account ID where you want to link the AWS GovCloud account",
access_key_id="access-key-id of aws govcloud account",
aws_account_id="aws govcloud account id",
metric_collection_mode="PULL",
name="account name",
secret_access_key="secret access key of the aws govcloud account")
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.NewAwsGovcloudLinkAccount(ctx, "foo", &cloud.AwsGovcloudLinkAccountArgs{
AccountId: pulumi.String("The New Relic account ID where you want to link the AWS GovCloud account"),
AccessKeyId: pulumi.String("access-key-id of aws govcloud account"),
AwsAccountId: pulumi.String("aws govcloud account id"),
MetricCollectionMode: pulumi.String("PULL"),
Name: pulumi.String("account name"),
SecretAccessKey: pulumi.String("secret access key of the aws govcloud account"),
})
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.AwsGovcloudLinkAccount("foo", new()
{
AccountId = "The New Relic account ID where you want to link the AWS GovCloud account",
AccessKeyId = "access-key-id of aws govcloud account",
AwsAccountId = "aws govcloud account id",
MetricCollectionMode = "PULL",
Name = "account name",
SecretAccessKey = "secret access key of the aws govcloud account",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.cloud.AwsGovcloudLinkAccount;
import com.pulumi.newrelic.cloud.AwsGovcloudLinkAccountArgs;
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 AwsGovcloudLinkAccount("foo", AwsGovcloudLinkAccountArgs.builder()
.accountId("The New Relic account ID where you want to link the AWS GovCloud account")
.accessKeyId("access-key-id of aws govcloud account")
.awsAccountId("aws govcloud account id")
.metricCollectionMode("PULL")
.name("account name")
.secretAccessKey("secret access key of the aws govcloud account")
.build());
}
}
resources:
foo:
type: newrelic:cloud:AwsGovcloudLinkAccount
properties:
accountId: The New Relic account ID where you want to link the AWS GovCloud account
accessKeyId: access-key-id of aws govcloud account
awsAccountId: aws govcloud account id
metricCollectionMode: PULL
name: account name
secretAccessKey: secret access key of the aws govcloud account
Create AwsGovcloudLinkAccount Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AwsGovcloudLinkAccount(name: string, args: AwsGovcloudLinkAccountArgs, opts?: CustomResourceOptions);
@overload
def AwsGovcloudLinkAccount(resource_name: str,
args: AwsGovcloudLinkAccountArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AwsGovcloudLinkAccount(resource_name: str,
opts: Optional[ResourceOptions] = None,
access_key_id: Optional[str] = None,
aws_account_id: Optional[str] = None,
secret_access_key: Optional[str] = None,
account_id: Optional[str] = None,
metric_collection_mode: Optional[str] = None,
name: Optional[str] = None)
func NewAwsGovcloudLinkAccount(ctx *Context, name string, args AwsGovcloudLinkAccountArgs, opts ...ResourceOption) (*AwsGovcloudLinkAccount, error)
public AwsGovcloudLinkAccount(string name, AwsGovcloudLinkAccountArgs args, CustomResourceOptions? opts = null)
public AwsGovcloudLinkAccount(String name, AwsGovcloudLinkAccountArgs args)
public AwsGovcloudLinkAccount(String name, AwsGovcloudLinkAccountArgs args, CustomResourceOptions options)
type: newrelic:cloud:AwsGovcloudLinkAccount
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 AwsGovcloudLinkAccountArgs
- 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 AwsGovcloudLinkAccountArgs
- 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 AwsGovcloudLinkAccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AwsGovcloudLinkAccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AwsGovcloudLinkAccountArgs
- 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 awsGovcloudLinkAccountResource = new NewRelic.Cloud.AwsGovcloudLinkAccount("awsGovcloudLinkAccountResource", new()
{
AccessKeyId = "string",
AwsAccountId = "string",
SecretAccessKey = "string",
AccountId = "string",
MetricCollectionMode = "string",
Name = "string",
});
example, err := cloud.NewAwsGovcloudLinkAccount(ctx, "awsGovcloudLinkAccountResource", &cloud.AwsGovcloudLinkAccountArgs{
AccessKeyId: pulumi.String("string"),
AwsAccountId: pulumi.String("string"),
SecretAccessKey: pulumi.String("string"),
AccountId: pulumi.String("string"),
MetricCollectionMode: pulumi.String("string"),
Name: pulumi.String("string"),
})
var awsGovcloudLinkAccountResource = new AwsGovcloudLinkAccount("awsGovcloudLinkAccountResource", AwsGovcloudLinkAccountArgs.builder()
.accessKeyId("string")
.awsAccountId("string")
.secretAccessKey("string")
.accountId("string")
.metricCollectionMode("string")
.name("string")
.build());
aws_govcloud_link_account_resource = newrelic.cloud.AwsGovcloudLinkAccount("awsGovcloudLinkAccountResource",
access_key_id="string",
aws_account_id="string",
secret_access_key="string",
account_id="string",
metric_collection_mode="string",
name="string")
const awsGovcloudLinkAccountResource = new newrelic.cloud.AwsGovcloudLinkAccount("awsGovcloudLinkAccountResource", {
accessKeyId: "string",
awsAccountId: "string",
secretAccessKey: "string",
accountId: "string",
metricCollectionMode: "string",
name: "string",
});
type: newrelic:cloud:AwsGovcloudLinkAccount
properties:
accessKeyId: string
accountId: string
awsAccountId: string
metricCollectionMode: string
name: string
secretAccessKey: string
AwsGovcloudLinkAccount 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 AwsGovcloudLinkAccount resource accepts the following input properties:
- Access
Key stringId - The access key of the AwsGovCloud.
- Aws
Account stringId - The AwsGovCloud account ID.
- Secret
Access stringKey - The secret key of the AwsGovCloud.
- Account
Id string - The New Relic account ID to operate on. This allows the user to override the
account_id
attribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID
. - Metric
Collection stringMode - How metrics will be collected. Use
PUSH
for a metric stream orPULL
to integrate with individual services. - Name string
- The linked account name
- Access
Key stringId - The access key of the AwsGovCloud.
- Aws
Account stringId - The AwsGovCloud account ID.
- Secret
Access stringKey - The secret key of the AwsGovCloud.
- Account
Id string - The New Relic account ID to operate on. This allows the user to override the
account_id
attribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID
. - Metric
Collection stringMode - How metrics will be collected. Use
PUSH
for a metric stream orPULL
to integrate with individual services. - Name string
- The linked account name
- access
Key StringId - The access key of the AwsGovCloud.
- aws
Account StringId - The AwsGovCloud account ID.
- secret
Access StringKey - The secret key of the AwsGovCloud.
- account
Id String - The New Relic account ID to operate on. This allows the user to override the
account_id
attribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID
. - metric
Collection StringMode - How metrics will be collected. Use
PUSH
for a metric stream orPULL
to integrate with individual services. - name String
- The linked account name
- access
Key stringId - The access key of the AwsGovCloud.
- aws
Account stringId - The AwsGovCloud account ID.
- secret
Access stringKey - The secret key of the AwsGovCloud.
- account
Id string - The New Relic account ID to operate on. This allows the user to override the
account_id
attribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID
. - metric
Collection stringMode - How metrics will be collected. Use
PUSH
for a metric stream orPULL
to integrate with individual services. - name string
- The linked account name
- access_
key_ strid - The access key of the AwsGovCloud.
- aws_
account_ strid - The AwsGovCloud account ID.
- secret_
access_ strkey - The secret key of the AwsGovCloud.
- account_
id str - The New Relic account ID to operate on. This allows the user to override the
account_id
attribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID
. - metric_
collection_ strmode - How metrics will be collected. Use
PUSH
for a metric stream orPULL
to integrate with individual services. - name str
- The linked account name
- access
Key StringId - The access key of the AwsGovCloud.
- aws
Account StringId - The AwsGovCloud account ID.
- secret
Access StringKey - The secret key of the AwsGovCloud.
- account
Id String - The New Relic account ID to operate on. This allows the user to override the
account_id
attribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID
. - metric
Collection StringMode - How metrics will be collected. Use
PUSH
for a metric stream orPULL
to integrate with individual services. - name String
- The linked account name
Outputs
All input properties are implicitly available as output properties. Additionally, the AwsGovcloudLinkAccount 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 AwsGovcloudLinkAccount Resource
Get an existing AwsGovcloudLinkAccount 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?: AwsGovcloudLinkAccountState, opts?: CustomResourceOptions): AwsGovcloudLinkAccount
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_key_id: Optional[str] = None,
account_id: Optional[str] = None,
aws_account_id: Optional[str] = None,
metric_collection_mode: Optional[str] = None,
name: Optional[str] = None,
secret_access_key: Optional[str] = None) -> AwsGovcloudLinkAccount
func GetAwsGovcloudLinkAccount(ctx *Context, name string, id IDInput, state *AwsGovcloudLinkAccountState, opts ...ResourceOption) (*AwsGovcloudLinkAccount, error)
public static AwsGovcloudLinkAccount Get(string name, Input<string> id, AwsGovcloudLinkAccountState? state, CustomResourceOptions? opts = null)
public static AwsGovcloudLinkAccount get(String name, Output<String> id, AwsGovcloudLinkAccountState 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.
- Access
Key stringId - The access key of the AwsGovCloud.
- Account
Id string - The New Relic account ID to operate on. This allows the user to override the
account_id
attribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID
. - Aws
Account stringId - The AwsGovCloud account ID.
- Metric
Collection stringMode - How metrics will be collected. Use
PUSH
for a metric stream orPULL
to integrate with individual services. - Name string
- The linked account name
- Secret
Access stringKey - The secret key of the AwsGovCloud.
- Access
Key stringId - The access key of the AwsGovCloud.
- Account
Id string - The New Relic account ID to operate on. This allows the user to override the
account_id
attribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID
. - Aws
Account stringId - The AwsGovCloud account ID.
- Metric
Collection stringMode - How metrics will be collected. Use
PUSH
for a metric stream orPULL
to integrate with individual services. - Name string
- The linked account name
- Secret
Access stringKey - The secret key of the AwsGovCloud.
- access
Key StringId - The access key of the AwsGovCloud.
- account
Id String - The New Relic account ID to operate on. This allows the user to override the
account_id
attribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID
. - aws
Account StringId - The AwsGovCloud account ID.
- metric
Collection StringMode - How metrics will be collected. Use
PUSH
for a metric stream orPULL
to integrate with individual services. - name String
- The linked account name
- secret
Access StringKey - The secret key of the AwsGovCloud.
- access
Key stringId - The access key of the AwsGovCloud.
- account
Id string - The New Relic account ID to operate on. This allows the user to override the
account_id
attribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID
. - aws
Account stringId - The AwsGovCloud account ID.
- metric
Collection stringMode - How metrics will be collected. Use
PUSH
for a metric stream orPULL
to integrate with individual services. - name string
- The linked account name
- secret
Access stringKey - The secret key of the AwsGovCloud.
- access_
key_ strid - The access key of the AwsGovCloud.
- account_
id str - The New Relic account ID to operate on. This allows the user to override the
account_id
attribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID
. - aws_
account_ strid - The AwsGovCloud account ID.
- metric_
collection_ strmode - How metrics will be collected. Use
PUSH
for a metric stream orPULL
to integrate with individual services. - name str
- The linked account name
- secret_
access_ strkey - The secret key of the AwsGovCloud.
- access
Key StringId - The access key of the AwsGovCloud.
- account
Id String - The New Relic account ID to operate on. This allows the user to override the
account_id
attribute set on the provider. Defaults to the environment variableNEW_RELIC_ACCOUNT_ID
. - aws
Account StringId - The AwsGovCloud account ID.
- metric
Collection StringMode - How metrics will be collected. Use
PUSH
for a metric stream orPULL
to integrate with individual services. - name String
- The linked account name
- secret
Access StringKey - The secret key of the AwsGovCloud.
Import
Linked AWSGovCloud accounts can be imported using the id
, e.g.
bash
$ pulumi import newrelic:cloud/awsGovcloudLinkAccount:AwsGovcloudLinkAccount 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
newrelic
Terraform Provider.