Skip to content

Commit

Permalink
feat(cloudformation): Add env var for default CFN role ARN (#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
LaikaN57 authored Jan 13, 2025
1 parent 7ad3855 commit e7d1745
Show file tree
Hide file tree
Showing 40 changed files with 591 additions and 945 deletions.
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ BUILD_DIRS = bin .build build include lib lib64 man share package *.egg dist *.e

DRY ?= true
ifneq ($(DRY),false)
PYBLACK_OPTS := --diff --check
PYBLACK_OPTS := --diff --check
endif

.PHONY: build
Expand Down Expand Up @@ -63,7 +63,3 @@ $(VENV_DIR): requirements.txt requirements.test.txt
$(PYTHON) -m pip install -r requirements.test.txt
$(PYTHON) -m pip install -r requirements.txt
touch $(VENV_DIR)




13 changes: 0 additions & 13 deletions kingpin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +0,0 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Copyright 2018 Nextdoor.com, Inc
13 changes: 0 additions & 13 deletions kingpin/actors/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +0,0 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Copyright 2018 Nextdoor.com, Inc
13 changes: 0 additions & 13 deletions kingpin/actors/aws/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +0,0 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Copyright 2018 Nextdoor.com, Inc
39 changes: 12 additions & 27 deletions kingpin/actors/aws/base.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Copyright 2018 Nextdoor.com, Inc

"""
:mod:`kingpin.actors.aws.base`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -24,17 +10,18 @@
**Required Environment Variables**
.. note::
These can be skipped only if you have a ``.aws/credentials`` file in place.
These can be skipped only if you have a ``.aws/credentials`` file in place.
:AWS_ACCESS_KEY_ID:
Your AWS access key
Your AWS access key
:AWS_SECRET_ACCESS_KEY:
Your AWS secret
Your AWS secret
:AWS_SESSION_TOKEN:
Your AWS session token
Only needed if you are using temporary access credentials
Your AWS session token. Only needed if you are using temporary access
credentials
"""

import logging
Expand All @@ -56,7 +43,7 @@

log = logging.getLogger(__name__)

__author__ = "Mikhail Simin <mikhail@nextdoor.com>"
__author__ = "Matt Wise <matt@nextdoor.com>"

EXECUTOR = concurrent.futures.ThreadPoolExecutor(10)

Expand Down Expand Up @@ -188,16 +175,14 @@ def _parse_policy_json(self, policy):
"""Parse a single JSON file into an Amazon policy.
Validates that the policy document can be parsed, strips out any
comments, and fills in any environmental tokens. Returns a dictionary
of the contents.
Returns None if the input is None.
comments, and fills in any environmental tokens. Returns a dictionary of
the contents.
args:
Args:
policy: The Policy JSON file to read.
returns:
A dictionary of the parsed policy.
Returns:
A dictionary of the parsed policy. None if the input is None.
"""
if policy is None:
return None
Expand Down
Loading

0 comments on commit e7d1745

Please sign in to comment.