Skip to content

Unable to migrate from datadog.aws.Integration to datadog.aws.IntegrationAccountΒ #815

@JonKusz

Description

@JonKusz

Describe what happened

When attempting to migrate an existing Datadog AWS integration from the deprecated datadog.aws.Integration to the new datadog.aws.IntegrationAccount resource via an import operation, I am running into the following (some IDs and names redacted).

pulumi import datadog:aws/integrationAccount:IntegrationAccount datadog-aws-integration-account 00000000-0000-0000-0000-000000000000

     Type                               Name                             Plan       Info
     pulumi:pulumi:Stack                redacted                       1 error
 =   └─ datadog:aws:IntegrationAccount  datadog-aws-integration-account  import     1 error

Diagnostics:
  datadog:aws:IntegrationAccount (datadog-aws-integration-account):
    error: Preview failed: Missing Attribute Configuration: Exactly one of these attributes must be configured: [logs_config.lambda_forwarder]

Which is unexpected, because my resource definition is as follows.

export const datadogAwsIntegrationAccount = new datadog.aws.IntegrationAccount(
  'datadog-aws-integration-account',
  {
    awsAccountId: '000000000000',
    awsPartition: 'aws',

    authConfig: {
      awsAuthConfigRole: {
        roleName: 'redacted',
      },
    },

    awsRegions: {
      includeOnlies: ['us-east-1', 'us-east-2', 'us-west-1', 'us-west-2'],
    },

    logsConfig: {
      lambdaForwarder: {},
    },

    metricsConfig: {
      namespaceFilters: {},
      tagFilters: [
        {
          namespace: 'AWS/EC2',
          tags: ['redacted'],
        },
      ],
    },

    resourcesConfig: {
      cloudSecurityPostureManagementCollection: false,
      extendedCollection: false,
    },

    tracesConfig: {
      xrayServices: {},
    },
  }
);

I have an appropriately defined logsConfig property as outlined in the resource's documentation here. Im not sure if this is a misconfiguration on my side, or an actual bug, so figured Id report it.

Sample program

See issue description.

Log output

No response

Affected Resource(s)

No response

Output of pulumi about

CLI          
Version      3.157.0
Go Version   go1.24.1
Go Compiler  gc

Plugins
KIND      NAME     VERSION
resource  aws      6.24.0
resource  awsx     2.5.0
resource  datadog  4.46.0
resource  docker   4.5.1
resource  docker   3.6.1
language  nodejs   3.157.0

Host     
OS       darwin
Version  15.3.2
Arch     arm64

This project is written in nodejs: executable='/Users/<redacted>/.nvm/versions/node/v20.18.1/bin/node' version='v20.18.1'

Current Stack: <redacted>

<redacted>

Found no pending operations associated with <redacted>

Backend        
Name           pulumi.com
URL            <redacted>
User           <redacted>
Organizations  <redacted>
Token type     <redacted>

Dependencies:
NAME             VERSION
@pulumi/aws      6.24.0
@pulumi/awsx     2.5.0
@pulumi/datadog  4.46.0
@pulumi/pulumi   3.157.0
@types/node      18.19.21

Additional context

No response

Contributing

Vote on this issue by adding a πŸ‘ reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/importAn issue related to `pulumi import` or the import resource option.kind/bugSome behavior is incorrect or out of spec

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions