App-FargateStack

 view release on metacpan or  search on metacpan

bin/app-FargateStack-checker-docker  view on Meta::CPAN

#!/bin/bash
#-*- mode: sh; -*-

if ! [ -e $HOME/.aws/credentials ]; then
    echo "ERROR: no credentials file found!";
    exit 1;
fi

docker run --rm -it \
   --user $(id -u):$(id -g) \
   -v $HOME/.aws:$HOME/.aws \
   -e HOME=$HOME \
   -e AWS_PROFILE="$AWS_PROFILE" \
   app-fargatestack \
   /bin/bash -c  "app-FargateStack-checker $*"

bin/app-FargateStack-docker  view on Meta::CPAN

#!/bin/bash
#-*- mode: sh; -*-

if ! [ -e $HOME/.aws/credentials ]; then
    echo "ERROR: no credentials file found!";
    exit 1;
fi

command=${1:-help};
shift;

docker run --rm -it \
   --user $(id -u):$(id -g) \
   -v $(pwd):/work \
   -v $HOME/.aws:$HOME/.aws \

lib/App/FargateStack/Checker.pm  view on Meta::CPAN


caller or __PACKAGE__->main();

########################################################################
sub check_fargate_env {
########################################################################
  my ($self) = @_;

  my @rows;

  push @rows, check( $self, \&check_credentials );
  push @rows, check( $self, \&check_service_linked_roles );
  push @rows, check( $self, \&check_vpc_and_subnets );
  push @rows, check( $self, \&check_egress );
  push @rows, check( $self, \&check_ecs_permissions );
  push @rows, check( $self, \&check_elbv2_permissions );
  push @rows, check( $self, \&check_logs_permissions );
  push @rows, check( $self, \&check_ecr_access );
  push @rows, check( $self, \&check_events_permissions );
  push @rows, check( $self, \&check_passrole );

lib/App/FargateStack/Checker.pm  view on Meta::CPAN

  my ( $ok, $buses, $err ) = try_aws( sub { $events->command( 'list-event-buses' => [ '--query' => 'EventBuses[].Name' ] ) } );

  if ( !$ok ) {
    return row_fail( 'Events perms', 'Cannot list event buses' );
  }

  return row_ok( 'Events perms', 'Describe OK' );
}

########################################################################
sub check_credentials {
########################################################################
  my ($opt) = @_;

  my $sts = new_client( 'App::STS', $opt );

  my ( $ok, $out, $err ) = try_aws( sub { $sts->get_caller_identity() } );

  if ( !$ok || !$out ) {
    return row_fail( 'Credentials', 'Cannot call STS GetCallerIdentity' );
  }

lib/App/FargateStack/Checker.pm  view on Meta::CPAN


No resources are created or modified. Intended as a fast “can I deploy here?”
probe for humans and CI.

=head2 Options

=over 4

=item B<--profile> I<STR>

AWS config/credentials profile to use. Defaults to C<$ENV{AWS_PROFILE}> or the
SDK’s default behavior if unset.

=item B<--region> I<STR>

AWS region to target (e.g. C<us-east-1>). Defaults to C<$ENV{AWS_REGION}> if set.

=item B<--dns> | B<--no-dns>

Enable or disable Route 53 checks. Default: B<enabled>.
Use B<--no-dns> (or B<--nodns>) to skip DNS checks.



( run in 1.977 second using v1.01-cache-2.11-cpan-140bd7fdf52 )