Skip to content

Conversation

@alexott
Copy link
Contributor

@alexott alexott commented Oct 22, 2025

Changes

This change makes the account_id field optional for all MWS resources, allowing it to be specified either in the resource configuration or in the provider configuration block.

Resources updated:

  • mws_customer_managed_keys
  • mws_log_delivery
  • mws_networks
  • mws_private_access_settings
  • mws_storage_configurations
  • mws_vpc_endpoint
  • mws_workspaces

Changes include:

  • Updated struct field tags to make account_id optional and computed
  • Added logic in Create functions to use provider's account_id when not specified in resource
  • Added logic in Update functions (where applicable) to use provider's account_id
  • Added comprehensive test coverage for each resource to ensure:
    • Resources can be created with account_id only in provider config
    • Resource IDs remain consistent regardless of where account_id is specified
    • Appropriate errors are returned when account_id is missing from both resource and provider

This change follows the same pattern as the mws_workspaces resource and ensures backward compatibility with existing configurations.

Tests

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • using Go SDK
  • using TF Plugin Framework
  • has entry in NEXT_CHANGELOG.md file

This change makes the `account_id` field optional for all MWS resources, allowing it to be specified either in the resource configuration or in the provider configuration block.

Resources updated:
- mws_customer_managed_keys
- mws_log_delivery
- mws_networks
- mws_private_access_settings
- mws_storage_configurations
- mws_vpc_endpoint

Changes include:
- Updated struct field tags to make account_id optional and computed
- Added logic in Create functions to use provider's account_id when not specified in resource
- Added logic in Update functions (where applicable) to use provider's account_id
- Added comprehensive test coverage for each resource to ensure:
  * Resources can be created with account_id only in provider config
  * Resource IDs remain consistent regardless of where account_id is specified
  * Appropriate errors are returned when account_id is missing from both resource and provider

This change follows the same pattern as the mws_workspaces resource and ensures backward compatibility with existing configurations.
@alexott alexott requested review from a team as code owners October 22, 2025 11:43
@alexott alexott requested review from tanmay-db and removed request for a team October 22, 2025 11:43
@alexott alexott temporarily deployed to test-trigger-is October 22, 2025 11:43 — with GitHub Actions Inactive
@github-actions
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/terraform

Inputs:

  • PR number: 5133
  • Commit SHA: a12b37acde43f9e15b9eade7e8f7ac950e2ee09e

Checks will be approved automatically on success.

@alexott alexott temporarily deployed to test-trigger-is October 22, 2025 11:44 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant