Skip to content
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

Add support for enabling Enterprise Support for ADF Provisioned Accounts #232

Closed
StewartW opened this issue Jan 29, 2020 · 11 comments · Fixed by #329
Closed

Add support for enabling Enterprise Support for ADF Provisioned Accounts #232

StewartW opened this issue Jan 29, 2020 · 11 comments · Fixed by #329
Labels
enhancement New feature or request
Milestone

Comments

@StewartW
Copy link
Contributor

Use Case
When we provision new accounts at the moment - We use terraform to create the account and carry out a series of tasks. One of these is enabling Enterprise Support for the newly created account.

I think exposing a config option on the schema for accounts created via adf-accounts/*.yml would be a great feature for others and allow us to move closer to deprecating TF fully in favour of ADF.

@javydekoning
Copy link
Contributor

javydekoning commented Jan 31, 2020

In this case, I think we should support all support levels. Also, your approach only allows enabling the ES support level (not removing/downgrading it).

An alternative approach is running a Lambda in the master account, triggered on organization join/invite CloudTrail events.

Or use tags on accounts to determine the support level. Together with a Lambda that runs on a schedule.

@StewartW
Copy link
Contributor Author

Hey @javydekoning Thanks for the comments :)
As at the moment - Only account creation is supported via ADF - I'm not sure if there's a situation in which we would be removing Support from individual accounts

My understanding of the Support tiers (obviously, you're in a better position to understand them, so correct me if I'm wrong) is that it will work for both ES and Business tiers. I'm not sure how many people would use ADF with Developer Plans.

Likewise, I'm not sure (again, I'll defer to experience) how many customers downgrade their plans.

We have alternative approaches already, but I feel like this would be a good problem to solve for other / potential users as well?

@javydekoning
Copy link
Contributor

javydekoning commented Jan 31, 2020

It would be a great addition. However, if we build it 'as code' I'd like to see it serve both enabling and disabling. I would also prefer:

support_plan: 'basic|developer|business|enterprise'

Over:

enable_enterprise_support: True|False

Hence the Lambda might need some alterations. Hopefully in the future we can do this through API instead of via support case.

@StewartW
Copy link
Contributor Author

StewartW commented Jan 31, 2020

It would be a great addition. However, if we build it 'as code' I'd like to see it serve both enabling and disabling. I would also prefer:

support_plan: 'none|developer|business|enterprise'

Over:

enable_enterprise_support: True|False

Hence the Lambda might need some alterations. Hopefully in the future we can do this through API instead of via support case.

Yes, actually, I think you could be on to something there.

Totally agree, that the first example make's alot more sense. Happy to make those modifications.
I think that for now It might be as simple as doing a NOOP for the none|developer options for now (Perhaps some console output) explaining why it has no functionality and wrapping the current support request behind the business|enterprise options.

I think that would also give flexibility going forward for future iterations on this. Likewise, it would be good to move to an actual API, rather than the CreateCase API.

However, if we build it 'as code' I'd like to see it serve both enabling and disabling
Sorry, I forgot to ask in my original response.
I think we are both aligned on the enable|disable front
From your experience with customers, how do they tend to disable support for individual accounts. Here, I tend to find that support is enabled until the account is closed.

If we were to do something along the lines of

       support_session = Support(role_in_target_account)
       support_enabled = support_session.check_support_enabled()
       if support_enabled and account.support_plan is 'none':
           support_session.remove_support_subscription()

How would you feel about that?

The same logic could probably be extended to cover enabling support for accounts not created via ADF but I think the async process could result in complications.

@javydekoning
Copy link
Contributor

Instead of check_support_enabled you could use get_support_level. Then use set_support_level to enable/disable ES for now. It will give you a path forward should other options become available.

You could get the support level by running using the DescribeSeverityLevels API. You could deduce the support level based on the available severity levels. Just keep in mind that it would return HTTP400 when on Basic.

Not keen as to only logging to console for the unsupported methods. Pipelines would succeed, leading people to believe it was successful.

Only supporting support_plan: 'basic|enterprise' to start would allow you to continue with the current approach as well as provide a path forward should an API be available in the future.

I'll ask the team to have a look at this to see if they agree.

@sbkok
Copy link
Collaborator

sbkok commented Feb 2, 2020

I like these suggestions!
@StewartW Could you change the API the way @javydekoning mentioned? Starting with just support_plan: 'basic|enterprise' for now. Plus using the get_support_level API?

In case we ever support developer and business support: we need to ensure someone doesn't accidentally set developer or business, when in fact they are on enterprise support with their organization. Or am I missing a use case that would benefit from this?

@StewartW
Copy link
Contributor Author

StewartW commented Feb 4, 2020

If made the changes, let me know what you think of that approach.
I've kept it in the account creation path, rather than run it every time. However it is capable of identifying if it needs to do anything or not, there's just the small issue of what happens if it re-runs whilst waiting for the ticket to be actioned. Keeping it where it is circumvents this issue until such time there's a better API available for this sort of action.

@bundyfx bundyfx added the enhancement New feature or request label Feb 17, 2020
@bundyfx bundyfx added this to the v3.1.0 milestone Feb 17, 2020
@bundyfx
Copy link
Contributor

bundyfx commented Feb 17, 2020

Adding this one into 3.1 milestone, thanks again for your work @StewartW..

@javydekoning + @sbkok Are there any other changes you would like to see before we bring this into v3.1?..

@javydekoning
Copy link
Contributor

Reviewed, looks good! We just need to clearly set expectations.

The use-case here is activating Enterprise Support on account creation ONLY.
We do this by raising an automated support case. ADF will (and should) not trigger any support level change on updates. This functionality should only be used by customers whose Organizations Master account is already activated for Enterprise Support.

I suggest we put emphasis on that in the documentation.

@StewartW
Copy link
Contributor Author

I've added in some emphasis covering the use-case the the accounts readme file. Let me know what you think, if it's worded properly etc. :)

@sbkok
Copy link
Collaborator

sbkok commented Sep 10, 2020

Thanks for the patch @StewartW. It will be shipped in the next release of ADF.

@sbkok sbkok closed this as completed Sep 10, 2020
sbkok added a commit to sbkok/aws-deployment-framework that referenced this issue Feb 12, 2021
**Features 🏗**

* Adds Enterprise Support to account creation process awslabs#233, closes awslabs#232:
  * ADF will raise a ticket to add the account to an existing AWS support subscription when an account is created. As a prerequisite, your organization master account must already have enterprise support activated.
* Adds nested deployment map support awslabs#266 and awslabs#328, closes awslabs#265:
  * This enables usage of sub directories within the deployment_maps folder.

**Fixes 🐞**

* Fixes specific role usage to be used in Build and Deploy only awslabs#295.
* Corrects removing pipelines anchor in docs awslabs#279.
* Fixes CI builds due to isort version mismatch awslabs#284.
* Fixes error handling of generate_params intrinsic upload function awslabs#277, closes awslabs#276.
* Fixes spec_inline attribute of CodeBuild in docs awslabs#289.
* Fixes provider spec_inline support of CodeBuild in awslabs#293.
* Fixes supported list of intrinsic upload path styles, enables usage of s3-url and s3-key-only awslabs#275, closes awslabs#299.
* Fixes create deployment account concurrency failure awslabs#287, closes awslabs#280.
* Fixes approval stage usage, by limiting specific role usage to Build and Deploy steps awslabs#295.
* Fixes yarnpkg GPG awslabs#313,  closes awslabs#325.
* Removes dependency on botocore.vendored.requests awslabs#326, closes awslabs#324.

**Improvements ✨**

* Improves docs on providers and their properties awslabs#274.
* Separates pipeline cleanup from input generation script awslabs#288.
* Upgrades Python from v3.7 to v3.8 awslabs#313.
* Upgrades CodeBuild image from "aws/codebuild/standard:2.0" to "aws/codebuild/standard:5.0" awslabs#313, closes awslabs#267, closes awslabs#300.
* Upgrades CDK from v1.32 to v1.88 awslabs#313, closes awslabs#292.
@sbkok sbkok mentioned this issue Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants