-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Support for account settings flags #10168
Comments
The settings page shows 5 things to enable the above example was missing this one - containerInsights. |
imho treating enabled as a bool would be better. |
@geota I was wondering about that — it seems like it's mostly a question of how much Terraform wants to try to normalize on top of the underlying API. |
Its worth noting the following points from the AWS documentation;
Obviously appreciate that there will be people with existing workloads that fall outside of the above points. In short - from 1st January 2020 whether you have opted out or not yet opted out will switched to the new extended ARN format, not sure if there is much of a use case here considering its going to be enabled by default, and given a good work-around exists using local-exec resource for what effectively is a one time action. |
@VR6Pete Note that I was specifically requesting a general mechanism: while certain flags become moot over time, I doubt that AWS will discontinue future use of opt-in flags and the syntax I suggested would be future-proof until they change the API types. |
Worth noting that there doesn't seem to be a plan to enable "Container Insights" or "AWSVPC trunking" by default, so it would still be worth it to have this resource for those settings. |
While creating an ECS service in newly created AWS account, I received the following error:
On Jan 14 2020 AWS back tracked on this decision. AWS post is here. Is there any straight forward Terraform way to enable this options? |
Yeah, looking for the same functionality and agree I think it would be future proof as there will be similar things that AWS / ECS will enable through similar settings. Important to note, AWS still hasn't done anything about this since their message in January (from the above linked blog post):
|
I tried to implement It would be nice AWS will kindly provide |
@Tensho I also had a go at it and gave up after facing the same problem. Default account settings are essentially settings for the root user. A user with admin privileges can set them, but cannot read back or delete. That only gives us 2 out of 4 CRUD operations required for implementing a resource (and no way of implementing a reliable data source either). It should still be possible to implement |
Is there an open request with Amazon to improve this API? |
Hi, I've created a resource as outlined above, I think there's a requirement for another resource to manage the user/role level interaction. This resource turns ECS account default settings on at the root level and this is done per region. The tests I've created & ran, test for each possible setting being enabled and the principal arn being returned as root. I did try a couple of examples with the AWS CLI and I think there's a bug in there or a misinterpretation.
|
From my experiments with AWS CLI under non-root admin user: |
Hi @sergei-ivanov, I've dug a little deeper into this & I get what you're saying. However I feel there's still two use cases and both need to be addressed with different resources and perhaps more/better documentation around those use cases. Maybe the code can handle the fact that the principal ARN as already set a value other than root on PutAccountSettingDefault if this gets returned in the response. The PutAccountSettingDefault was designed for a one of use case, so that you didn't need to log in as the root account to |
The ECS ListAccountSettings API allows checking it for the root user, could that be used for getting the account default? https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListAccountSettings.html#API_ListAccountSettings_RequestSyntax |
Hi all 👋 Just letting you know that this is issue is featured on this quarters roadmap. If a PR exists to close the issue a maintainer will review and either make changes directly, or work with the original author to get the contribution merged. If you have written a PR to resolve the issue please ensure the "Allow edits from maintainers" box is checked. Thanks for your patience and we are looking forward to getting this merged soon! |
This functionality has been released in v3.68.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Description
There are several new AWS features for ECS which depend on settings being enabled. I have a workaround for the default running local-exec but it'd be nice if there was a way to do this with the usual Terraform niceties such as change detection:
New or Affected Resource(s)
Potential Terraform Configuration
It'd be nice if something like this could work:
References
The text was updated successfully, but these errors were encountered: