Add AWS AMI Resource and Data Source Support - #94
Draft
bshutterkion wants to merge 5 commits into
Draft
Conversation
…mission mappings Updated the description for `user_group_ids` and `user_ids` fields across multiple resource mappings to remove the inaccurate instruction that IDs must be provided in numerical order. The affected files are: - `resource_funding_source_permission_mapping.go` - `resource_ou_permission_mapping.go` - `resource_project_permission_mapping.go`
- **Docs**: - Created `aws_ami.md` documentation under `data-sources` and `resources` directories. - Added example usage for `kion_aws_ami` data source and resource. - Included schema details for both data source and resource. - **Examples**: - Added example Terraform configurations for `kion_aws_ami` data source and resource in `examples/data-sources/kion_aws_ami` and `examples/resources/kion_aws_ami`. - **Provider**: - Implemented `kion_aws_ami` data source and resource in Go. - Registered `kion_aws_ami` in `Provider`'s `ResourcesMap` and `DataSourcesMap`. - Implemented CRUD operations for `kion_aws_ami` resource.
…include additional fields for expiration and ownership details - Added new read-only attributes to the `aws_ami` data source: `account_id`, `aws_ami_id`, `description`, `expires_at`, `name`, `owner_user_group_ids`, `owner_user_ids`, `region`, `sync_deprecation`, `sync_tags`, and `unavailable_in_aws`. - Updated the AWS AMI resource example and schema to include new optional fields for expiration alerts and warnings (`expiration_alert_number`, `expiration_alert_unit`, `expiration_notify`, `expiration_warning_number`, `expiration_warning_unit`). - Added new nullable handling for `expires_at` and related fields. - Refactored code to handle and log JSON payloads for AMI creation and updates.
…omization and error handling - Added `CustomizeDiff` function to ensure at least one of the fields `owner_user_group_ids` or `owner_user_ids` is present during the diff operation. - Improved error handling and ID reset logic in `resourceAwsAmiDelete` function, replacing direct diagnostics appending with `hc.HandleError` and `hc.SafeSet`.
- Corrected the typo in the comment for `NullTime` struct from "JSON marshalling" to "JSON marshaling" in `helper.go`.
codybuell
approved these changes
Oct 1, 2024
bshutterkion
marked this pull request as draft
October 1, 2024 15:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added
kion_aws_amidata source to fetch AWS AMI information, including region, name, and optional regex matching filters.kion_aws_amiresource to manage AWS AMIs within Kion, supporting fields such asaccount_id,aws_ami_id,name,region, and optional fields for synchronization and ownership settings.Documentation
kion_aws_amidata source and resource, including example usage, schema details, and nested schemas for filters and lists.kion_aws_amidata source and resource.