-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[site24x7_amazon_monitor] Cannot import existing monitors #319
Comments
@bryanhorstmann The External ID can remain static for a while when fetching the data source. However, please note that a single External ID can only be used for one AWS monitor when creating monitors in Site24x7. If you need to create multiple AWS monitors in bulk, please ensure that you fetch a unique External ID for each respective monitor. Thanks, |
Hi @VinothDarwin-ZC , It does not appear to remain static though. Running two plans directly after each other generates a new external id which means the external id associated with the monitor updates on each plan/apply. I am retrieving one per account using the
|
@bryanhorstmann You can create multiple External IDs using the data sources, create the Role ARN separately, and then proceed to apply or create the AWS monitor in Site24x7. Please note that the External ID cannot be static across multiple AWS monitors. The purpose of the External ID is to enhance security for the Role ARN in AWS. Each Role ARN should have a unique External ID associated with it to maintain security integrity. Thanks, |
Hi @VinothDarwin-ZC , I appreciate that feedback and while in theory that works, it goes against the basic idea of Terraform. If I ever run another plan / apply in the module where the monitor is created, then it will create a new External ID and update my monitor and stop the IAM role from working. Once the value is retrieved and set it needs to remain static. |
I have an existing Site24x7 estate I'm trying to import into Terraform. I've hit a blocker on my first resource type.
When trying to import existing AWS Monitors (using the monitor id as guess) I get the following error:
This is unfortunate, but I decide to create new
site24x7_amazon_monitor
resources instead and I'll remove my existing ones. I follow the example on https://registry.terraform.io/providers/site24x7/site24x7/latest/docs/resources/amazon_monitor but have another issue. The output forsite24x7_aws_external_id
data source updates on each plan. Its not static.This is blocker for me, as all our AWS IAM roles are created separately. I need to retrieve the external ID here and then update my IAM role in another repo.
Here is my terraform code to reproduce this:
Is it possible to retrieve a static value for the external id?
The text was updated successfully, but these errors were encountered: