Solved

IaC:lab1


While doing IaC lab 1, the guide mentions this:


In addition to deploying a Controller in AWS, Sandbox Starter Tool will also take care of onboarding your AWS account into the Controller. In the next section, you will learn how to get the information for onboarding your Azure account. The Terraform code will take care of the onboarding process.


 


In the Aviatrix controller, under access account, the AWS account is not onboarded.


 


In the forked repo (ace-iac-day-zero), the main.tf does is not referencing the AWS account anywhere in the code.


 


Keep getting the following error:


Error: failed to create a new Aviatrix Transit VPC: Rest API create_custom_vpc Get failed: Credentials not found for cloud type 1 in account aws-account. Please check the account name.


with module.aws_transit_1.aviatrix_vpc.default


on .terraform/modules/aws_transit_1/main.tf line 2, in resource "aviatrix_vpc" "default":


resource "aviatrix_vpc" "default" {

 


Error: failed to create a new VPC: Rest API create_custom_vpc Get failed: Credentials not found for cloud type 1 in account aws-account. Please check the account name.


with module.aws_spoke_1.aviatrix_vpc.default[0]


on .terraform/modules/aws_spoke_1/main.tf line 2, in resource "aviatrix_vpc" "default":


resource "aviatrix_vpc" "default" {

 


Can you please help?


Thanks!

icon

Best answer by bayupw 2 March 2022, 09:00

View original

11 replies

Hi Parry,


If you deployed the controller via Sandbox Starter Toolkit https://community.aviatrix.com/t/g9hx9jh/aviatrix-sandbox-starter-tool-spin-up-cloud-networks-in-minutes, the tool would onboard the AWS account using that name 'aws-account' as per screenshot below:



Did you deploy the controller via Sandbox Starter Tool or using other method?


Thanks,


Bayu

Hi Bayu,


 


Thanks for the prompt support and help.  I deployed SST with Terraform, but in the lab 1 instructions it says to stop after the controller and public IP are created.


 


I think you have to complete the setup  rather than stopping there.  

Userlevel 2
Badge +1

parry dhillon Stopping there is all you need. Based on another of your posts it seems you've gotten past this issue. Let me know if there's anything else I can help with.

The thing is the first few times, my AWS account was not onboarded when stopping there.  When I did it a subsequent time, I waited the 15 mints and then did get the email stating my AWS account was onboarded.  Thanks John Smoker .

Bayu Wibowo said:

Hi Parry,
If you deployed the controller via Sandbox Starter Toolkit
https://community.aviatrix.com/t/g9hx9jh/aviatrix-sandbox-starter-tool-spin-up-cloud-networks-in-minutes mithe tool would onboard the AWS account using that name 'aws-account' as per screenshot below:

 Thank you for the helpful link.

I am having the same problem ( Create Failed)
module.aws_transit_1.aviatrix_vpc.default
module.aws_spoke_1.aviatrix_vpc.default[0]
I have tried so many things and still not working. I see AWS was onboarded on the controller but I can't finish running lab 1. I have re-created access and re-did the policies but still not working

Error: failed to create a new VPC: rest API create_custom_vpc Post failed: Credentials not found for cloud type 1 in account

Userlevel 2
Badge +1

Qousai Edelbi That sounds like either your aws account didn't get onboarded to the controller, or it's not named 'aws-account' (which the underlying terraform expects. As Bayu noted above, your access accounts should look similar to this:


Badge

John Smoker It does show aws-account and the status is online. I will look around. This is my sandbox account and I do a lot of testing. I will keep checking and possibly run it on a new sandbox account 

Badge

I was able to find the issue and it is related to IAM policy that I had. I lift the restrictions to test and it worked 

Userlevel 2
Badge +1

Qousai Edelbi Good to hear. Thanks for posting your resolution so others may benefit.

Reply