* pkg/destroy/aws/ec2helpers.go
** the bulk of the changes are to the ec2helpers file. All of the sdk v1 imports
are removed except for session as this one is engrained too many files currently.
pkg/destroy/aws/aws.go
** Add a client for ELB ELBV2 and IAM to the Cluster Removal Struct. Even though
these changes are mainly to ec2helpers, the other clients were required in for
certain operations.
** The rest of the file updates are alter ARN import to come from aws sdk v2.
* pkg/destroy/aws/iamhelpers.go
** Remove/Change all imports from AWS sdk v1 to v2.
pkg/destroy/aws/errors.go
pkg/destroy/aws/ec2helpers.go
** Remove the Error checking/formatting function from ec2helpers and put the function
in the errors.go file.
* pkg/destroy/aws/elbhelpers.go
** Remove all SDK v1 imports from elb helpers.
* Add reference to correct HandleErrorCode function.
* pkg/destroy/aws/aws.go
** Update Route53, s3, and efs services to sdk v2. This is slowly removing the
requirement for aws session.
* ** Vendor updates for S3 and EFS services.
** This caused updates to other packages such as aws/config, credentials, stscreds, and
a list of aws internal packages.
* Clean up references and use the exported config creator to create new clients in destroyer.
* ** Migrate the use of resource tagging api to the sdk V2.
pkg/destroy/aws:
** Alter the function name from HandleErrorCode to handleErrorCode. The initial thought was that
this function could be used in other areas of the code, but it will remain in destroy for now.
pkg/destroy/aws/shared.go:
** Remove the session import and uses in the file.
* Fix references to HandleErrorCode.
* kg/destroy/aws/aws.go:
** Remove session from the imports. Added the agent handler to the configurations.
* Fix package updates for vendoring.
* Use the correct private and public zone clients.
Set a Destroy User Agent.
Cleanup pointer references to use the aws sdk.
* The ListUsers API call does not return tags for the IAM users in the
response. There is a separate call ListUserTags to fetch its tag for
checking in the installer code.
* rebase: fix other imports after rebase
* revert: use GetRole/GetUser to fetch tags
An older commit uses ListRoleTags/ListUserTags in order to save
bandwidth by fetching only tags. However, the minimal permission
required for the installer does not have permission iam:ListUserTags or
iam:ListRoleTags, thus causing the deprovisioning to skip users and
roles. This is part of the reasons for previous CI leaks.
This commit reverts the optimisation idea to just user GetRole/GetUser,
which should have sufficient minimal permission policy.
---------
Co-authored-by: barbacbd <barbacbd@gmail.com>
Update to the assisted-service at commit
a40422bdea617f16cbdb724d53619ca74773be45.
This repo now contains multiple go modules, so we have to add overrides
for the internal references to the api and models modules.
* Replace terraform modules with github.com/hashicorp/terraform-exec.
* Remove all terraform providers.
* Remove all unneeded replaces.
* Tidy up the replace stanzas so that it is more clear why each replace is needed.
* Remove and re-create all indirect requires to clean up ones that are
no longer needed.
This is to address the "NoSuchBucket: The specified bucket does not exist"
error as explained in https://bugzilla.redhat.com/show_bug.cgi?id=1759617 and
many other similar bugs. This bug has been "fixed" several times over the
years, yet it continues to rear its ugly self. The ultimate problem is a race
condition with S3 eventual consistency. As described in the bug above, the
bucket does not yet exist when trying to reference tags. The openshift fork
that this commit references, contains an upstream patch as described in
https://github.com/terraform-providers/terraform-provider-aws/pull/13009 that
should address this issue.
will use pieces from the repo for credential validation
put some dummy imports in pkg/asset/installconfig/aws/permissions.go
then run: dep ensure (version 0.5.0)
And similar, to catch up with the previous commit. Generated with:
$ dep ensure
using:
$ dep version
dep:
version : v0.5.0
build date :
git hash : 22125cf
go version : go1.10.3
go compiler : gc
platform : linux/amd64
features : ImportDuringSolve=false
Generated with:
$ rm -rf "$(go env GOPATH)/pkg/dep/sources"
# to avoid errors like "Unable to update checked out version: fatal: reference is not a tree"
# possibly [1]
$ dep ensure -update
using:
$ dep version
dep:
version : v0.5.0
build date :
git hash : 22125cf
go version : go1.10.3
go compiler : gc
platform : linux/amd64
features : ImportDuringSolve=false
I haven't reviewed all of these changes, but I want this to pull in
openshift/hive@b1cad987 (contrib/pkg/awstagdeprovision: Allow for OR
filters, 2018-10-18, openshift/hive#47).
[1]: https://github.com/golang/dep/issues/928#issuecomment-358349626
Generated with:
$ glide remove github.com/AlecAivazis/survey
$ glide get --strip-vendor gopkg.in/AlecAivazis/survey
[INFO]Preparing to install 1 package.
[INFO]Attempting to get package gopkg.in/AlecAivazis/survey.v1
[INFO]--> Gathering release information for gopkg.in/AlecAivazis/survey.v1
[INFO]The package gopkg.in/AlecAivazis/survey.v1 appears to have Semantic Version releases (http://semver.org).
[INFO]The latest release is v1.6.2. You are currently not using a release. Would you like
[INFO]to use this release? Yes (Y) or No (N)
y
[INFO]The package gopkg.in/AlecAivazis/survey.v1 appears to use semantic versions (http://semver.org).
[INFO]Would you like to track the latest minor or patch releases (major.minor.patch)?
[INFO]The choices are:
[INFO] - Tracking minor version releases would use '>= 1.6.2, < 2.0.0' ('^1.6.2')
[INFO] - Tracking patch version releases would use '>= 1.6.2, < 1.7.0' ('~1.6.2')
[INFO] - Skip using ranges
[INFO]For more information on Glide versions and ranges see https://glide.sh/docs/versions
[INFO]Minor (M), Patch (P), or Skip Ranges (S)?
m
[INFO]--> Adding gopkg.in/AlecAivazis/survey.v1 to your configuration with the version ^1.6.2
...
$ glide-vc --use-lock-file --no-tests --only-code
$ git checkout HEAD -- vendor/github.com/shurcooL/httpfs
using:
$ glide --version
glide version 0.13.2-dev
$ (cd $GOPATH/src/github.com/Masterminds/glide && git describe)
v0.13.1-7-g3e13fd1
$ (cd $GOPATH/src/github.com/sgotti/glide-vc && git describe)
v0.1.0-2-g6ddf6ee
The httpfs works around our busted vfsutil vendor, see
a8cce08b (vendor: Add shurcooL/httpfs/vfsutil, 2018-09-26, #340).
The formatting change unwinds ff9e5479 (*: format all yaml files,
2018-09-27, #342), but it doesn't seem to be worth fighting Glide on
this front.