-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Unauthorized error with retrieving the client configuration; cannot get around the error and stuck with resources #87
Comments
@laffey Just for you and future travellers. This module uses two providers. The official Your attitude could be better! You are after all using a free module from their opinionated set of modules for their accelerators. Because this module also requires the So you probably have something like: provider "aws" {
region = "eu-west-1"
assume_role {
role_arn = "arn:aws:iam::1111111111:role/some_role"
}
}
module "this_module" {
source = "cloudposse/ec2-client-vpn/aws"
# removed for brevity
} And you need to update your config to look something like: provider "aws" {
region = "eu-west-1"
assume_role {
role_arn = "arn:aws:iam::1111111111:role/some_role"
}
}
provider "awsutils" {
region = "eu-west-1"
assume_role {
role_arn = "arn:aws:iam::1111111111:role/some_role"
}
}
module "this_module" {
source = "cloudposse/ec2-client-vpn/aws"
# removed for brevity
} You probably could have figured that out in the time it took to open this salty issue |
Thanks @conzy The reason why the additional provider is needed is because the upstream aws provider cannot export the aws client vpn configuration so the cloudposse/awsutils provider is used instead For reference, there is also an examples directory of how to use each module which contains the defined providers terraform-aws-ec2-client-vpn/examples/complete/main.tf Lines 1 to 7 in a777f96
And the auto generated required providers section for each module https://github.com/cloudposse/terraform-aws-ec2-client-vpn?tab=readme-ov-file#providers We can probably go one step further and add the required providers to the versions.tf so it's more obvious when doing an init/plan step Edit: nvm, the req provider is already set terraform-aws-ec2-client-vpn/versions.tf Lines 1 to 12 in a777f96
|
Describe the Bug
You all should remove this from the repository. It doesn't work and needs lots of help. Waste of my time.
I can't even destroy the resources because of an unauthorized error, and I am using privileged aws access, so there is no lack of authorization.
Error: UnauthorizedOperation: You are not authorized to perform this operation....
with module.vpn.data.awsutils_ec2_client_vpn_export_client_config.default[0],
│ on .terraform/modules/vpn/main.tf line 264, in data "awsutils_ec2_client_vpn_export_client_config" "default":
│ 264: data "awsutils_ec2_client_vpn_export_client_config" "default" {
Expected Behavior
Error after all resources created. Now I cannot delete resources.
Steps to Reproduce
terraform apply.
Test your own code...
Screenshots
No response
Environment
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: